Package org.cometd.bayeux.server

Examples of org.cometd.bayeux.server.ServerSession


    }

    @Override
    public void run() {
      SessionManager manager = SessionManager.getInstance();
      ServerSession server = manager.getServerSession();

      this.client.deliver(server, "/service/session/join/siteid",
          this.siteId, null);
      this.client.deliver(server, "/service/session/join/roster",
          this.roster, null);
View Full Code Here


  @Override
  public void reply(Bot bot, String replyToken, Map<String, Object> obj) {

    log.fine("LocalTransport::reply");
    log.fine("reply data = " + obj);
    ServerSession client = this.clients.get(replyToken);

    if (client == null) {
      log.warning("LocalTransport::error " +
          "sending bot reply client not found");
      // TODO send error.
      return;
    }

    HashMap<String, Object> data = new HashMap<String, Object>();
    data.put("value", obj);
    data.put("topic", replyToken);
    data.put("error", false);

    log.fine("LocalTransport::reply");
    log.fine("payload = " + data);
    log.fine("replyToken = " + replyToken);

    client.deliver(this.server, "/service/bot/" + this.serviceName +
        "/response", data, null);
    this.clients.remove(replyToken);
  }
View Full Code Here

      log.severe("handler not found for sessionId = " + sessionId
          + " siteId = " + siteId);
      return;
    }

    ServerSession client = handler.getServerSessionFromSiteid(siteId);
    if (client != null) {
      log.info("ServerSession found about to call disconnect");
      client.disconnect();
    } else {
      log.severe("ServerSession not found from handler delegate sessionId = "
          + sessionId);
    }
  }
View Full Code Here

TOP

Related Classes of org.cometd.bayeux.server.ServerSession

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.