Package org.cometd.bayeux.server

Examples of org.cometd.bayeux.server.ServerChannel


   * Publishes a local op engine sync event to the /session/ID/sync/engine
   * bayeux channel.
   * @param sites context int array context vector for this site
   */
  public void postEngineSync(Integer[] sites) {
    ServerChannel sync = this.server.getChannel(this.syncEngineChannel);
   
    HashMap<String, Object> data = new HashMap<String, Object>();
    data.put("context", sites);
   
    // We publish *from* the LocalSession.
    sync.publish(this.sessionModerator.getLocalSession(), data, null);
  }
View Full Code Here


    }
  }

  /* Protected by modSyncSem. */
  private void flushModeratorQueue() {
    ServerChannel channel = this.server.getChannel(this.syncAppChannel);
    synchronized(this.modSyncQueue) {
      for (Object message: this.modSyncQueue)
        channel.publish(this.sessionModerator.getLocalSession(),
            message, null);
      this.modSyncQueue.clear();
    }
  }
View Full Code Here

   * @param topic Bots expect a unique token to know which request to reply to
   * @param params JSON encodable message.
   */
  public void postModeratorService(String service, String topic,
      Map<String, Object> params) {
    ServerChannel channel = this.getServiceRequestChannel(service);
    Map<String, Object> message = new HashMap<String, Object>();
    message.put("value", params);
    message.put("topic", topic);
    message.put("service", service);
    channel.publish(this.sessionModerator.getLocalSession(), message, null);
  }
View Full Code Here

TOP

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

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.