Examples of PingEvent


Examples of org.apache.stratos.messaging.event.ping.PingEvent

        // to detect a connection drop. Otherwise the subscriber will not
                // get reconnected after a connection drop.
        Thread.sleep(1000);
        testConnector.init(topicName);
                // A ping event is published to detect a session timeout
                EventPublisherPool.getPublisher(Constants.PING_TOPIC).publish(new PingEvent(), false);
      } catch (Exception e) {
        // Implies connection is not established
        // sleep for 30 sec and retry
        try {
          log.error(topicName + " topic health checker is failed and will try to subscribe again in 30 sec");
View Full Code Here

Examples of org.snmp4j.agent.agentx.event.PingEvent

          for (Iterator cit = getContexts().iterator(); cit.hasNext(); ) {
            OctetString context = (OctetString) cit.next();
            AgentXPingPDU ping = new AgentXPingPDU(context);
            ping.setSessionAttributes(session);
            ping.setTransactionID(getNextTransactionID());
            PingEvent pingEvent;
            try {
              AgentXResponseEvent resp =
                  agentX.send(ping, session.createAgentXTarget(),
                              session.getPeer().getTransport());
              pingEvent = new PingEvent(this, session,
                                        resp.getResponse());
            }
            catch (IOException ex) {
              pingEvent = new PingEvent(this, session, ex);
            }
            firePinged(pingEvent);
            if (LOGGER.isDebugEnabled()) {
              LOGGER.debug("Fired ping event " + pingEvent);
            }
            if (pingEvent.isCloseSession() || pingEvent.isResetSession()) {
              try {
                closeSession(session.getSessionID(),
                             AgentXProtocol.REASON_TIMEOUTS);
                if (pingEvent.isResetSession()) {
                  reopenSession(session);
                }
              }
              catch (IOException ex1) {
              }
View Full Code Here

Examples of org.spout.vanilla.event.player.network.PingEvent

    pingHash[lastRequestCount] = hash;
    lastRequestCount++;
    if (lastRequestCount >= pingTime.length) {
      lastRequestCount = 0;
    }
    player.getNetwork().callProtocolEvent(new PingEvent(hash));
  }
View Full Code Here

Examples of org.spout.vanilla.event.player.network.PingEvent

    }
  }

  @Override
  public void handleClient(ClientSession session, PlayerPingMessage message) {
    session.getPlayer().getNetwork().callProtocolEvent(new PingEvent(message.getPingId()), session.getPlayer());
  }
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.