Class EXoContinuationBayeux

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.cometd.server.BayeuxServerImpl
org.mortbay.cometd.continuation.EXoContinuationBayeux
org.exoplatform.chat.server.EXoContinuationBayeux
All Implemented Interfaces:
org.cometd.bayeux.Bayeux, org.cometd.bayeux.server.BayeuxServer, org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.Dumpable.DumpableContainer, org.eclipse.jetty.util.component.LifeCycle, org.picocontainer.Disposable

public class EXoContinuationBayeux extends org.mortbay.cometd.continuation.EXoContinuationBayeux
Created by The eXo Platform SAS.
Version:
$Id: $
Author:
Vitaly Parfonov
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException

    Nested classes/interfaces inherited from interface org.cometd.bayeux.Bayeux

    org.cometd.bayeux.Bayeux.BayeuxListener, org.cometd.bayeux.Bayeux.Validator

    Nested classes/interfaces inherited from interface org.cometd.bayeux.server.BayeuxServer

    org.cometd.bayeux.server.BayeuxServer.BayeuxServerListener, org.cometd.bayeux.server.BayeuxServer.ChannelListener, org.cometd.bayeux.server.BayeuxServer.Extension, org.cometd.bayeux.server.BayeuxServer.SessionListener, org.cometd.bayeux.server.BayeuxServer.SubscriptionListener

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container

    org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable

    org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

    org.eclipse.jetty.util.component.LifeCycle.Listener
  • Field Summary

    Fields inherited from class org.cometd.server.BayeuxServerImpl

    ALLOWED_TRANSPORTS_OPTION, BROADCAST_TO_PUBLISHER_OPTION, EXECUTOR_MAX_THREADS, SCHEDULER_THREADS, SWEEP_PERIOD_OPTION, TRANSPORTS_OPTION, VALIDATE_MESSAGE_FIELDS_OPTION

    Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    FAILED, STARTED, STARTING, STOPPED, STOPPING

    Fields inherited from interface org.cometd.bayeux.server.BayeuxServer

    ATTRIBUTE

    Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

    KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    EXoContinuationBayeux(org.exoplatform.chat.services.TokenService tokenService)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
     
    boolean
     
    boolean
    isSubscribed(String eXoID, String clientID)
     
    void
    sendBroadcastMessage(String channel, Object data, String msgId)
     
    void
    sendMessage(String eXoID, String channel, Object data, String id)
    Send data to a individual client.
    void
    setCloudIDSeparator(String cloudIDSeparator)
     
    void
    setOort(org.cometd.oort.Oort oort)
     
    void
    setSeti(org.cometd.oort.Seti seti)
     

    Methods inherited from class org.mortbay.cometd.continuation.EXoContinuationBayeux

    getClientByEXoId, getCometdContextName, getConnectedUserIds, getServletConfig, getTimeout, newRemoteClient, setCometdContextName, setServletConfig, setTimeout

    Methods inherited from class org.cometd.server.BayeuxServerImpl

    addExtension, addListener, addServerSession, addTransport, createChannelIfAbsent, createReply, doStart, doStop, dump, error, execute, extendOutgoing, extendReply, findHttpTransport, freeze, getAllowedTransports, getChannel, getChannels, getExecutor, getExtensions, getJSONContext, getKnownTransportNames, getListeners, getName, getOption, getOption, getOption, getOptionNames, getOptions, getScheduler, getSecurityPolicy, getSession, getSessions, getTransport, getTransports, handle, initializeJSONContext, initializeMetaChannels, initializeServerTransports, isBroadcastToPublisher, isDetailedDump, newChannelId, newLocalSession, newMessage, newMessage, newServerSession, publish, randomLong, removeExtension, removeListener, removeServerChannel, removeServerSession, removeSession, resolveLoop, schedule, setAllowedTransports, setAllowedTransports, setDetailedDump, setExecutor, setOption, setOptions, setScheduler, setSecurityPolicy, setTransports, setTransports, sweep, unknownSession, validateMessage

    Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle

    addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans

    Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.jetty.util.component.Container

    getCachedBeans, getEventListeners

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable

    dump, dumpSelf

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    isDumpable
  • Constructor Details

    • EXoContinuationBayeux

      public EXoContinuationBayeux(org.exoplatform.chat.services.TokenService tokenService)
      Default constructor.
  • Method Details

    • getUserToken

      public String getUserToken(String eXoId)
      Overrides:
      getUserToken in class org.mortbay.cometd.continuation.EXoContinuationBayeux
      Parameters:
      eXoId - the client id.
      Returns:
      token for client
    • isSubscribed

      public boolean isSubscribed(String eXoID, String clientID)
      Overrides:
      isSubscribed in class org.mortbay.cometd.continuation.EXoContinuationBayeux
    • isPresent

      public boolean isPresent(String eXoID)
      Overrides:
      isPresent in class org.mortbay.cometd.continuation.EXoContinuationBayeux
    • sendBroadcastMessage

      public void sendBroadcastMessage(String channel, Object data, String msgId)
      Overrides:
      sendBroadcastMessage in class org.mortbay.cometd.continuation.EXoContinuationBayeux
      Parameters:
      channel - the id of channel.
      data - the message
      msgId - the message id
    • sendMessage

      public void sendMessage(String eXoID, String channel, Object data, String id)
      Send data to a individual client. The data passed is sent to the client as the "data" member of a message with the given channel and id. The message is not published on the channel and is thus not broadcast to all channel subscribers. However to the target client, the message appears as if it was broadcast.

      Typcially this method is only required if a service method sends response(s) to channels other than the subscribed channel. If the response is to be sent to the subscribed channel, then the data can simply be returned from the subscription method.

      Overrides:
      sendMessage in class org.mortbay.cometd.continuation.EXoContinuationBayeux
      Parameters:
      eXoID - the id of target client
      channel - The id of channel the message is for
      data - The data of the message
      id - The id of the message (or null for a random id).
    • setSeti

      public void setSeti(org.cometd.oort.Seti seti)
      Overrides:
      setSeti in class org.mortbay.cometd.continuation.EXoContinuationBayeux
    • setOort

      public void setOort(org.cometd.oort.Oort oort)
      Overrides:
      setOort in class org.mortbay.cometd.continuation.EXoContinuationBayeux
    • setCloudIDSeparator

      public void setCloudIDSeparator(String cloudIDSeparator)
      Overrides:
      setCloudIDSeparator in class org.mortbay.cometd.continuation.EXoContinuationBayeux
    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.picocontainer.Disposable
      Overrides:
      dispose in class org.mortbay.cometd.continuation.EXoContinuationBayeux