Class ContinuationService
java.lang.Object
org.exoplatform.ws.frameworks.cometd.ContinuationService
Created by The eXo Platform SAS.
- Version:
- $Id: $
- Author:
- Vitaly Parfonov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.cometd.bayeux.server.ServerSessionorg.cometd.bayeux.server.ServerSessiongetClientByExoId(String exoId) Collection<org.cometd.bayeux.server.ServerSession>longgetUserToken(String eXoId) booleanhasChannel(String channel) booleanbooleanisSubscribe(String eXoId, String channel) Deprecated.voidsendBroadcastMessage(String channel, Object data) Send message to all client that listen channel.voidsendBroadcastMessage(String channel, Object data, String msgId) Send message to all client that listen channel.voidsendMessage(String eXoId, String channel, Object data) Send individual message to client.voidsendMessage(String eXoId, String channel, Object data, String id) Send individual message to client.
-
Constructor Details
-
ContinuationService
- Parameters:
bayeux-
-
-
Method Details
-
sendMessage
Send individual message to client.- Parameters:
eXoId- the user IDchannel- the channel you want to send the message. The client must listen to this channel to receive itdata- the data you want to send to the client
-
sendMessage
Send individual message to client.- Parameters:
eXoId- the user IDchannel- the channel you want to send the message. The client must listen to this channel to receive itdata- the data you want to send to the clientid- the id of message if you set null will be generate automatically
-
getClientByExoId
- Parameters:
exoId- the id of client (exoId).- Returns:
- Get client by eXoId.
-
getClient
- Parameters:
id- the id of client (cometd id)- Returns:
- Get client by id (id generated by cometd service).
-
getClients
- Returns:
- all registered client.
-
hasChannel
- Parameters:
channel- the channel id.- Returns:
- Return true if channel exist else false.
-
getTimeout
public long getTimeout()- Returns:
- timeout of client reconnect.
-
isSubscribe
Deprecated.UseisPresent(String)instead. One user can have multiple session, it doesn't make sense to check if he has subscribed for one channel. This method can only check for channel subscribing status in non-clustering environment.- Parameters:
eXoId- the client id (as eXoId).channel- the id of channel.- Returns:
- true if client subscribe to channel else false.
-
isPresent
-
sendBroadcastMessage
Send message to all client that listen channel.- Parameters:
channel- the id of channel that need send messagedata- that send
-
sendBroadcastMessage
Send message to all client that listen channel.- Parameters:
channel- the id of channel that need send messagedata- that sendmsgId- id of message
-
getUserToken
- Parameters:
eXoId- the client id (as eXoId).- Returns:
- Return userToken for the client.
-