Package jade.core

Examples of jade.core.Timer


        if (keepAliveTime > 0) {
            TimerDispatcher td = TimerDispatcher.getTimerDispatcher();
            if (kaTimer != null) {
                td.remove(kaTimer);
            }
            kaTimer = td.add(new Timer(System.currentTimeMillis() + keepAliveTime, this));
        }
    }
View Full Code Here


        if (connectionDropDownTime > 0) {
            TimerDispatcher td = TimerDispatcher.getTimerDispatcher();
            if (cdTimer != null) {
                td.remove(cdTimer);
            }
            cdTimer = td.add(new Timer(System.currentTimeMillis() + connectionDropDownTime, this));
        }
    }
View Full Code Here

    if (keepAliveTime > 0) {
      TimerDispatcher td = TimerDispatcher.getTimerDispatcher();
      if (kaTimer != null) {
        td.remove(kaTimer);
      }
      kaTimer = td.add(new Timer(System.currentTimeMillis()+keepAliveTime, this));
    }
  }
View Full Code Here

    if (connectionDropDownTime > 0) {
      TimerDispatcher td = TimerDispatcher.getTimerDispatcher();
      if (cdTimer != null) {
        td.remove(cdTimer);
      }
      cdTimer = td.add(new Timer(System.currentTimeMillis()+connectionDropDownTime, this));
    }
  }
View Full Code Here

      // Update the timer that triggers the delivery of a KEEP-ALIVE packet
      if (keepAliveTimer != null) {
        Runtime.instance().getTimerDispatcher().remove(keepAliveTimer);
      }
      long now = System.currentTimeMillis();
      keepAliveTimer = new Timer(now + keepAliveTime, new TimerListener() {
        public void doTimeOut(Timer t) {
          dispatchKeepAlive();
        }
      });
      keepAliveTimer = Runtime.instance().getTimerDispatcher().add(keepAliveTimer);
View Full Code Here

 
  // No need for synchronization as this is always executed within a synchronized block
  private void activateMaxDisconnectionTimer() {
    // Set the disconnection timer
    long now = System.currentTimeMillis();
    maxDisconnectionTimer = new Timer(now + maxDisconnectionTime, new TimerListener() {
      public void doTimeOut(Timer t) {
        synchronized (NIOHTTPBEDispatcher.this) {
          if (frontEndStatus != CONNECTED) {
            myLogger.log(Logger.WARNING, myID+" - Max disconnection timeout expired.");
            // The remote FrontEnd is probably down --> notify up.
View Full Code Here

    }

    private void activateMaxDisconnectionTimer(long timeout) {
      // Set the disconnection timer
      long now = System.currentTimeMillis();
      maxDisconnectionTimer = new Timer(now + timeout, this);
      maxDisconnectionTimer = Runtime.instance().getTimerDispatcher().add(maxDisconnectionTimer);
      if (myLogger.isLoggable(Logger.FINE)) {
        myLogger.log(Logger.FINE, "Disconnection timer activated.");
      }
    }
View Full Code Here

      if (kaTimeout > 0) {
        TimerDispatcher td = TimerDispatcher.getTimerDispatcher();
        if (kaTimer != null) {
          td.remove(kaTimer);
        }
        kaTimer = td.add(new Timer(System.currentTimeMillis() + kaTimeout, this));
      }
    }
View Full Code Here

TOP

Related Classes of jade.core.Timer

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.