Package org.exoplatform.chat.server
Class EXoContinuationBayeux
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- 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.LifeCycle,org.picocontainer.Disposable
public class EXoContinuationBayeux extends org.mortbay.cometd.continuation.EXoContinuationBayeuxCreated by The eXo Platform SAS.- Version:
- $Id: $
- Author:
- Vitaly Parfonov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEXoContinuationBayeux.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
-
-
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
-
-
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 voiddispose()StringgetUserToken(String eXoId)booleanisPresent(String eXoID)booleanisSubscribed(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, 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
-
-
-
-
Method Detail
-
getUserToken
public String getUserToken(String eXoId)
- Overrides:
getUserTokenin classorg.mortbay.cometd.continuation.EXoContinuationBayeux- Parameters:
eXoId- the client id.- Returns:
- token for client
-
isSubscribed
public boolean isSubscribed(String eXoID, String clientID)
- Overrides:
isSubscribedin classorg.mortbay.cometd.continuation.EXoContinuationBayeux
-
isPresent
public boolean isPresent(String eXoID)
- Overrides:
isPresentin classorg.mortbay.cometd.continuation.EXoContinuationBayeux
-
sendBroadcastMessage
public void sendBroadcastMessage(String channel, Object data, String msgId)
- Overrides:
sendBroadcastMessagein classorg.mortbay.cometd.continuation.EXoContinuationBayeux- Parameters:
channel- the id of channel.data- the messagemsgId- 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:
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
public void setCloudIDSeparator(String cloudIDSeparator)
- Overrides:
setCloudIDSeparatorin classorg.mortbay.cometd.continuation.EXoContinuationBayeux
-
dispose
public void dispose()
- Specified by:
disposein interfaceorg.picocontainer.Disposable- Overrides:
disposein classorg.mortbay.cometd.continuation.EXoContinuationBayeux
-
-