Class EXoContinuationBayeux

  • All Implemented Interfaces:
    org.cometd.bayeux.Bayeux, org.cometd.bayeux.server.BayeuxServer, 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  EXoContinuationBayeux.EXoSecurityPolicy  
      • Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
      • Nested classes/interfaces inherited from interface org.cometd.bayeux.Bayeux

        org.cometd.bayeux.Bayeux.BayeuxListener
      • 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.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, SWEEP_PERIOD_OPTION, TRANSPORTS_OPTION, VALIDATE_MESSAGE_FIELDS_OPTION
      • Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
      • Fields inherited from interface org.cometd.bayeux.server.BayeuxServer

        ATTRIBUTE
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()  
      String getUserToken​(String eXoId)  
      boolean isPresent​(String eXoID)  
      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, doPublish, doStart, doStop, dump, error, extendRecv, extendReply, extendSend, findHttpTransport, freeze, getAllowedTransports, getChannel, getChannels, getContext, getCurrentTransport, getExtensions, getKnownTransportNames, getListeners, getOption, getOption, getOption, getOptionNames, getOptions, getSecurityPolicy, getSession, getSessions, getTransport, getTransports, handle, initializeJSONContext, initializeMetaChannels, initializeServerTransports, isBroadcastToPublisher, newChannelId, newLocalSession, newMessage, newMessage, newServerSession, randomLong, removeExtension, removeListener, removeServerChannel, removeServerSession, schedule, setAllowedTransports, setAllowedTransports, setCurrentTransport, setOption, setOptions, setSecurityPolicy, setTransports, setTransports, sweep, unknownSession, validateMessage
      • Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

        addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
    • Constructor Detail

      • EXoContinuationBayeux

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

      • 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