Examples of Timeout


Examples of javax.ejb.Timeout

      super(finder);
   }
  
   public void process(ITimeoutTarget bean, Method method)
   {
      Timeout timeout = finder.getAnnotation(method, Timeout.class);
      if(timeout == null)
         return;
     
      NamedMethodMetaData timeoutMethod = new NamedMethodMetaData();
      timeoutMethod.setMethodName(method.getName());
View Full Code Here

Examples of javax.sip.Timeout

                sipStack.getStackLogger().logDebug(
                        "TransportError occured on " + transaction);
            }
            // Treat this like a timeout event. (Suggestion from Christophe).
            Object errorObject = transactionErrorEvent.getSource();
            Timeout timeout = Timeout.TRANSACTION;
            TimeoutEvent ev = null;

            if (errorObject instanceof SIPServerTransaction) {
                ev = new TimeoutEvent(this, (ServerTransaction) errorObject,
                        timeout);
            } else {
                SIPClientTransaction clientTx = (SIPClientTransaction) errorObject;
                Hop hop = clientTx.getNextHop();
                if ( sipStack.getRouter() instanceof RouterExt ) {
                    ((RouterExt) sipStack.getRouter()).transactionTimeout(hop);
                }
                ev = new TimeoutEvent(this, (ClientTransaction) errorObject,
                        timeout);
            }
            // Handling transport error like timeout
            this.handleEvent(ev, (SIPTransaction) errorObject);
        } else if (transactionErrorEvent.getErrorID() == SIPTransactionErrorEvent.TIMEOUT_ERROR) {
            // This is a timeout event.
            Object errorObject = transactionErrorEvent.getSource();
            Timeout timeout = Timeout.TRANSACTION;
            TimeoutEvent ev = null;

            if (errorObject instanceof SIPServerTransaction) {
                ev = new TimeoutEvent(this, (ServerTransaction) errorObject,
                        timeout);
            } else {
                SIPClientTransaction clientTx = (SIPClientTransaction) errorObject;
                Hop hop = clientTx.getNextHop();
                if ( sipStack.getRouter() instanceof RouterExt ) {
                    ((RouterExt) sipStack.getRouter()).transactionTimeout(hop);
                }

                ev = new TimeoutEvent(this, (ClientTransaction) errorObject,
                        timeout);
            }
            this.handleEvent(ev, (SIPTransaction) errorObject);

        } else if (transactionErrorEvent.getErrorID() == SIPTransactionErrorEvent.TIMEOUT_RETRANSMIT) {
            // This is a timeout retransmit event.
            // We should never get this if retransmit filter is
            // enabled (ie. in that case the stack should handle.
            // all retransmits.
            Object errorObject = transactionErrorEvent.getSource();
            Transaction tx = (Transaction) errorObject;

            if (tx.getDialog() != null)
                InternalErrorHandler.handleException("Unexpected event !",
                        this.sipStack.getStackLogger());

            Timeout timeout = Timeout.RETRANSMIT;
            TimeoutEvent ev = null;

            if (errorObject instanceof SIPServerTransaction) {
                ev = new TimeoutEvent(this, (ServerTransaction) errorObject,
                        timeout);
View Full Code Here

Examples of nexj.core.meta.workflow.Timeout

               {
                  throw new MetadataException("err.meta.workflow.multipleQueueTimers",
                     new Object[]{assignment.getName()});
               }

               Timeout timeout = new Timeout();

               timeout.setActivity(activity);
               timeout.setValue(m_helper.parse(XMLUtil.getReqStringAttr(eventElement, "value"),
                  false, activity.getFlow().getPosMap(), null, m_metadata.getGlobalEnvironment()));
               activity.addStep(timeout);

               Wait wait = new Wait(timeout);

               timeout.setNext(wait);
               activity.addStep(wait);

               m_bTimer = true;
            }
            else if (sElement.equals("ClassEvent"))
View Full Code Here

Examples of org.apache.etch.compiler.opt.Timeout

    Opt o = getOpt( "Timeout" );

    if (o == null)
      return 0;

    Timeout t = (Timeout) o;
    return t.timeout();
  }
View Full Code Here

Examples of org.apache.openejb.jee.Timeout

                             * @StatefulTimeout
                             */
                            if (sessionBean.getStatefulTimeout() == null) {
                                final StatefulTimeout annotation = getInheritableAnnotation(clazz, StatefulTimeout.class);
                                if(annotation != null) {
                                    final Timeout timeout = new Timeout();
                                    timeout.setTimeout(annotation.value());
                                    timeout.setUnit(annotation.unit());
                                    sessionBean.setStatefulTimeout(timeout);
                                }
                            }

                            /*
 
View Full Code Here

Examples of org.apache.openejb.jee.Timeout

                ContainerConcurrency concurrency = getContainerConcurrency(method);
                concurrency.setAccessTimeout(toTimeout(attribute));
            }

            private Timeout toTimeout(AccessTimeout annotation) {
                Timeout timeout = new Timeout();
                timeout.setTimeout(annotation.value());
                timeout.setUnit(annotation.unit());
                return timeout;
            }
View Full Code Here

Examples of org.deftserver.io.timeout.Timeout

  /**
   * Start the {@code PeriodicCallback}
   */
  public void start() {
    IOLoop.INSTANCE.addTimeout(
        new Timeout(
            System.currentTimeMillis() + period,
            new AsyncCallback() { @Override public void onCallback() { run(); }}
        )
    );
  }
View Full Code Here

Examples of org.deftserver.io.timeout.Timeout

    socket.close();
  }
 
  private void startTimeout() {
    logger.debug("start timeout...");
    timeout = new Timeout(
        System.currentTimeMillis() + TIMEOUT,
        new AsyncCallback() { public void onCallback() { onTimeout(); } }
    );
    IOLoop.INSTANCE.addTimeout(timeout);   
  }
View Full Code Here

Examples of org.deftserver.io.timeout.Timeout

      @Override public void onCallback() { latch.countDown(); }

    };

    Timeout t1 = new Timeout(now+1000, cb);
    Timeout t2 = new Timeout(now+1200, cb);
    Timeout t3 = new Timeout(now+1400, cb);
    Timeout t4 = new Timeout(now+1600, cb);
    Timeout t5 = new Timeout(now+1800, cb);
    IOLoop.INSTANCE.addTimeout(t1);
    IOLoop.INSTANCE.addTimeout(t2);
    IOLoop.INSTANCE.addTimeout(t3);
    IOLoop.INSTANCE.addTimeout(t4);
    IOLoop.INSTANCE.addTimeout(t5);
View Full Code Here

Examples of org.eclipse.jetty.util.thread.Timeout

    @Override
    protected void initialize(ServletContext context) {
        super.initialize(context);

        _tick = new Timer("AtmosphereContinuationBayeux-" + __id++, true);
        _timeout = new Timeout();

        _tick.schedule(new TimerTask() {
            @Override
            public void run() {
                _now = System.currentTimeMillis();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.