public class ContinuationService extends Object
| Constructor and Description |
|---|
ContinuationService(EXoContinuationBayeux bayeux) |
| Modifier and Type | Method and Description |
|---|---|
org.cometd.bayeux.server.ServerSession |
getClient(String id) |
org.cometd.bayeux.server.ServerSession |
getClientByExoId(String exoId) |
Collection<org.cometd.bayeux.server.ServerSession> |
getClients() |
long |
getTimeout() |
String |
getUserToken(String eXoId) |
boolean |
hasChannel(String channel) |
boolean |
isPresent(String eXoID) |
boolean |
isSubscribe(String eXoId,
String channel)
Deprecated.
|
void |
sendBroadcastMessage(String channel,
Object data)
Send message to all client that listen channel.
|
void |
sendBroadcastMessage(String channel,
Object data,
String msgId)
Send message to all client that listen channel.
|
void |
sendMessage(String eXoId,
String channel,
Object data)
Send individual message to client.
|
void |
sendMessage(String eXoId,
String channel,
Object data,
String id)
Send individual message to client.
|
public ContinuationService(EXoContinuationBayeux bayeux)
bayeux - public void sendMessage(String eXoId, String channel, Object data)
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 clientpublic void sendMessage(String eXoId, String channel, Object data, String id)
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 automaticallypublic org.cometd.bayeux.server.ServerSession getClientByExoId(String exoId)
exoId - the id of client (exoId).public org.cometd.bayeux.server.ServerSession getClient(String id)
id - the id of client (cometd id)public Collection<org.cometd.bayeux.server.ServerSession> getClients()
public boolean hasChannel(String channel)
channel - the channel id.public long getTimeout()
@Deprecated public boolean isSubscribe(String eXoId, String channel)
isPresent(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.eXoId - the client id (as eXoId).channel - the id of channel.public boolean isPresent(String eXoID)
public void sendBroadcastMessage(String channel, Object data)
channel - the id of channel that need send messagedata - that sendpublic void sendBroadcastMessage(String channel, Object data, String msgId)
channel - the id of channel that need send messagedata - that sendmsgId - id of messageCopyright © 2003–2019 eXo Platform SAS. All rights reserved.