Package org.exoplatform.chat.server
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 ClassesNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface org.cometd.bayeux.Bayeux
org.cometd.bayeux.Bayeux.BayeuxListener, org.cometd.bayeux.Bayeux.ValidatorNested 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.SubscriptionListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainerNested 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_OPTIONFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.cometd.bayeux.server.BayeuxServer
ATTRIBUTEFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
ConstructorsConstructorDescriptionEXoContinuationBayeux(org.exoplatform.chat.services.TokenService tokenService) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()getUserToken(String eXoId) booleanbooleanisSubscribed(String eXoID, String clientID) voidsendBroadcastMessage(String channel, Object data, String msgId) voidsendMessage(String eXoID, String channel, Object data, String id) Send data to a individual client.voidsetCloudIDSeparator(String cloudIDSeparator) voidsetOort(org.cometd.oort.Oort oort) voidsetSeti(org.cometd.oort.Seti seti) Methods inherited from class org.mortbay.cometd.continuation.EXoContinuationBayeux
getClientByEXoId, getCometdContextName, getConnectedUserIds, getServletConfig, getTimeout, newRemoteClient, setCometdContextName, setServletConfig, setTimeoutMethods 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, validateMessageMethods 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, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListenersMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dump, dumpSelfMethods 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
- Overrides:
getUserTokenin classorg.mortbay.cometd.continuation.EXoContinuationBayeux- Parameters:
eXoId- the client id.- Returns:
- token for client
-
isSubscribed
- Overrides:
isSubscribedin classorg.mortbay.cometd.continuation.EXoContinuationBayeux
-
isPresent
- Overrides:
isPresentin classorg.mortbay.cometd.continuation.EXoContinuationBayeux
-
sendBroadcastMessage
- Overrides:
sendBroadcastMessagein classorg.mortbay.cometd.continuation.EXoContinuationBayeux- Parameters:
channel- the id of channel.data- the messagemsgId- the message id
-
sendMessage
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:
sendMessagein classorg.mortbay.cometd.continuation.EXoContinuationBayeux- Parameters:
eXoID- the id of target clientchannel- The id of channel the message is fordata- The data of the messageid- The id of the message (or null for a random id).
-
setSeti
public void setSeti(org.cometd.oort.Seti seti) - Overrides:
setSetiin classorg.mortbay.cometd.continuation.EXoContinuationBayeux
-
setOort
public void setOort(org.cometd.oort.Oort oort) - Overrides:
setOortin classorg.mortbay.cometd.continuation.EXoContinuationBayeux
-
setCloudIDSeparator
- Overrides:
setCloudIDSeparatorin classorg.mortbay.cometd.continuation.EXoContinuationBayeux
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.picocontainer.Disposable- Overrides:
disposein classorg.mortbay.cometd.continuation.EXoContinuationBayeux
-