Package org.apache.ode.bpel.runtime.channels

Examples of org.apache.ode.bpel.runtime.channels.TimerResponseChannelListener


            Calendar now = Calendar.getInstance();

            if (now.before(_alarm)) {
                TimerResponseChannel trc = newChannel(TimerResponseChannel.class);
                getBpelRuntimeContext().registerTimer(trc,_alarm.getTime());
                object(false,new TimerResponseChannelListener(trc){
                    private static final long serialVersionUID = 1110683632756756017L;

                    public void onTimeout() {
                        // This is what we are waiting for, fire the activity
                        instance(new FIRE());
View Full Code Here


                        __log.debug("ActivityRecovery: Retrying activity " + _self.aId);
                    Date future = new Date(new Date().getTime() +
                        (failureHandling == null ? 0L : failureHandling.retryDelay * 1000));
                    final TimerResponseChannel timerChannel = newChannel(TimerResponseChannel.class);
                    getBpelRuntimeContext().registerTimer(timerChannel, future);
                    object(false, new TimerResponseChannelListener(timerChannel) {
                        private static final long serialVersionUID = -261911108068231376L;
                            public void onTimeout() {
                                ++_failure.retryCount;
                                startGuardedActivity();
                            }
View Full Code Here

            __log.debug("ActivityRecovery: Retrying invoke activity " + _self.aId);
        Date future = new Date(new Date().getTime() +
            (failureHandling == null ? 0L : failureHandling.retryDelay * 1000));
        final TimerResponseChannel timerChannel = newChannel(TimerResponseChannel.class);
        getBpelRuntimeContext().registerTimer(timerChannel, future);
        object(false, new TimerResponseChannelListener(timerChannel) {
          private static final long serialVersionUID = -261911108068231376L;
            public void onTimeout() {
                instance(INVOKE.this);
            }
            public void onCancel() {
                INVOKE.this.requireRecovery();
            }
        }.or(new TerminationChannelListener(_self.self) {
            private static final long serialVersionUID = -4416795170896911290L;

            public void terminate() {
                _self.parent.completed(null, CompensationHandler.emptySet());
                object(new TimerResponseChannelListener(timerChannel) {
                    private static final long serialVersionUID = 4822348066868313717L;
                    public void onTimeout() { }
                    public void onCancel() { }
                });
            }
View Full Code Here

                        __log.debug("ActivityRecovery: Retrying activity " + _self.aId);
                    Date future = new Date(new Date().getTime() +
                        (failureHandling == null ? 0L : failureHandling.retryDelay * 1000));
                    final TimerResponseChannel timerChannel = newChannel(TimerResponseChannel.class);
                    getBpelRuntimeContext().registerTimer(timerChannel, future);
                    object(false, new TimerResponseChannelListener(timerChannel) {
                        private static final long serialVersionUID = -261911108068231376L;
                            public void onTimeout() {
                                ++_failure.retryCount;
                                startGuardedActivity();
                            }
View Full Code Here

        if(dueDate.getTime() > System.currentTimeMillis()){
            final TimerResponseChannel timerChannel = newChannel(TimerResponseChannel.class);
            getBpelRuntimeContext().registerTimer(timerChannel, dueDate);

            object(false, new TimerResponseChannelListener(timerChannel){
                private static final long serialVersionUID = 3120518305645437327L;

                public void onTimeout() {
                    _self.parent.completed(null, CompensationHandler.emptySet());
                }

                public void onCancel() {
                    _self.parent.completed(null, CompensationHandler.emptySet());
                }
            }.or(new TerminationChannelListener(_self.self) {
                private static final long serialVersionUID = -2791243270691333946L;

                public void terminate() {
                    _self.parent.completed(null, CompensationHandler.emptySet());
                    object(new TimerResponseChannelListener(timerChannel) {
                        private static final long serialVersionUID = 677746737897792929L;

                        public void onTimeout() {
                            //ignore
                        }
View Full Code Here

            Calendar now = Calendar.getInstance();

            if (now.before(_alarm)) {
                TimerResponseChannel trc = newChannel(TimerResponseChannel.class);
                getBpelRuntimeContext().registerTimer(trc,_alarm.getTime());
                object(false,new TimerResponseChannelListener(trc){
                    private static final long serialVersionUID = 1110683632756756017L;

                    public void onTimeout() {
                        // This is what we are waiting for, fire the activity
                        instance(new FIRE());
View Full Code Here

                object(false, listeners);
            } else if (now.before(_alarm)) {
                TimerResponseChannel trc = newChannel(TimerResponseChannel.class);
                getBpelRuntimeContext().registerTimer(trc,_alarm.getTime());

                listeners.add(new TimerResponseChannelListener(trc){
                    private static final long serialVersionUID = 1110683632756756017L;

                    public void onTimeout() {
                        // This is what we are waiting for, fire the activity
                        instance(new FIRE());
View Full Code Here

                        __log.debug("ActivityRecovery: Retrying activity " + _self.aId);
                    Date future = new Date(new Date().getTime() +
                        (failureHandling == null ? 0L : failureHandling.retryDelay * 1000));
                    final TimerResponseChannel timerChannel = newChannel(TimerResponseChannel.class);
                    getBpelRuntimeContext().registerTimer(timerChannel, future);
                    object(false, new TimerResponseChannelListener(timerChannel) {
                        private static final long serialVersionUID = -261911108068231376L;
                            public void onTimeout() {
                                ++_failure.retryCount;
                                startGuardedActivity();
                            }
View Full Code Here

    if(dueDate.getTime() > System.currentTimeMillis()){
      final TimerResponseChannel timerChannel = newChannel(TimerResponseChannel.class);
      getBpelRuntimeContext().registerTimer(timerChannel, dueDate);
     
      object(false, new TimerResponseChannelListener(timerChannel){
         private static final long serialVersionUID = 3120518305645437327L;

         public void onTimeout() {
           _self.parent.completed(null, CompensationHandler.emptySet());
         }

        public void onCancel() {
          _self.parent.completed(null, CompensationHandler.emptySet());
        }
      }.or(new TerminationChannelListener(_self.self) {
        private static final long serialVersionUID = -2791243270691333946L;

        public void terminate() {
          _self.parent.completed(null, CompensationHandler.emptySet());
          object(new TimerResponseChannelListener(timerChannel) {
            private static final long serialVersionUID = 677746737897792929L;

            public void onTimeout() {
              //ignore
            }
View Full Code Here

            __log.debug("ActivityRecovery: Retrying invoke activity " + _self.aId);
        Date future = new Date(new Date().getTime() +
            (failureHandling == null ? 0L : failureHandling.retryDelay * 1000));
        final TimerResponseChannel timerChannel = newChannel(TimerResponseChannel.class);
        getBpelRuntimeContext().registerTimer(timerChannel, future);
        object(false, new TimerResponseChannelListener(timerChannel) {
          private static final long serialVersionUID = -261911108068231376L;
            public void onTimeout() {
                instance(INVOKE.this);
            }
            public void onCancel() {
                INVOKE.this.requireRecovery();
            }
        }.or(new TerminationChannelListener(_self.self) {
            private static final long serialVersionUID = -4416795170896911290L;

            public void terminate() {
                _self.parent.completed(null, CompensationHandler.emptySet());
                object(new TimerResponseChannelListener(timerChannel) {
                    private static final long serialVersionUID = 4822348066868313717L;
                    public void onTimeout() { }
                    public void onCancel() { }
                });
            }
View Full Code Here

TOP

Related Classes of org.apache.ode.bpel.runtime.channels.TimerResponseChannelListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.