org.mortbay.cometd.continuation
Class EXoContinuationBayeux

java.lang.Object
  extended by org.mortbay.cometd.MessagePool
      extended by org.mortbay.cometd.AbstractBayeux
          extended by org.mortbay.cometd.continuation.ContinuationBayeux
              extended by org.mortbay.cometd.continuation.EXoContinuationBayeux
All Implemented Interfaces:
dojox.cometd.Bayeux

public class EXoContinuationBayeux
extends org.mortbay.cometd.continuation.ContinuationBayeux

Created by The eXo Platform SAS.

Version:
$Id: $
Author:
Vitaly Parfonov

Nested Class Summary
static class EXoContinuationBayeux.EXoSecurityPolicy
           
 
Nested classes/interfaces inherited from class org.mortbay.cometd.AbstractBayeux
org.mortbay.cometd.AbstractBayeux.ConnectHandler, org.mortbay.cometd.AbstractBayeux.DefaultPolicy, org.mortbay.cometd.AbstractBayeux.DisconnectHandler, org.mortbay.cometd.AbstractBayeux.Handler, org.mortbay.cometd.AbstractBayeux.HandshakeHandler, org.mortbay.cometd.AbstractBayeux.MetaPublishHandler, org.mortbay.cometd.AbstractBayeux.PingHandler, org.mortbay.cometd.AbstractBayeux.PublishHandler, org.mortbay.cometd.AbstractBayeux.ServiceChannel, org.mortbay.cometd.AbstractBayeux.SubscribeHandler, org.mortbay.cometd.AbstractBayeux.UnsubscribeHandler
 
Field Summary
 
Fields inherited from class org.mortbay.cometd.AbstractBayeux
_advice, _adviceVersion, _browser2client, _directDeliver, _extensions, _initialized, _interval, _JSONCommented, _logLevel, _maxInterval, _metaPublishHandler, _multiFrameAdvice, _multiFrameInterval, _publishHandler, _request, _requestAvailable, _securityPolicy, _transports, _unknownAdvice, META_CLIENT_ID, META_CONNECT_ID, META_DISCONNECT_ID, META_HANDSHAKE_ID, META_ID, META_PING_ID, META_STATUS_ID, META_SUBSCRIBE_ID, META_UNSUBSCRIBE_ID
 
Fields inherited from interface dojox.cometd.Bayeux
ADVICE_FIELD, CHANNEL_FIELD, CLIENT_FIELD, CONNECTION_TYPE_FIELD, DATA_FIELD, DOJOX_COMETD_BAYEUX, ERROR_FIELD, EXT_FIELD, HANDSHAKE_RESPONSE, ID_FIELD, INTERVAL_FIELD, JSON_COMMENT_FILTERED_FIELD, JSON_CONTENT_TYPE, JSONP_DEFAULT_NAME, JSONP_PARAMETER, MESSAGE_PARAMETER, META, META_CLIENT, META_CONNECT, META_DISCONNECT, META_HANDSHAKE, META_PING, META_SLASH, META_STATUS, META_SUBSCRIBE, META_UNSUBSCRIBE, MIN_VERSION_FIELD, NONE_RESPONSE, RECONNECT_FIELD, RETRY_RESPONSE, SERVICE, SERVICE_SLASH, SUBSCRIPTION_FIELD, SUCCESSFUL_FIELD, SUPP_CONNECTION_TYPE_FIELD, TIMESTAMP_FIELD, TRANSPORT_CALLBACK_POLL, TRANSPORT_FIELD, TRANSPORT_FLASH, TRANSPORT_IFRAME, TRANSPORT_LONG_POLL, VERSION_FIELD
 
Constructor Summary
EXoContinuationBayeux()
          Default constructor.
 
Method Summary
 EXoContinuationClient getClientByEXoId(String eXoID)
           
 String getCometdContextName()
           
 long getTimeout()
          
 String getUserToken(String eXoId)
           
protected  void initialize(javax.servlet.ServletContext context)
          
 org.mortbay.cometd.ClientImpl newRemoteClient()
          
 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 setTimeout(long timeout)
          
 
Methods inherited from class org.mortbay.cometd.continuation.ContinuationBayeux
cancelTimeout, destroy, setMaxInterval
 
Methods inherited from class org.mortbay.cometd.AbstractBayeux
addClient, addExtension, addFilter, deliver, doPublish, getAdvice, getChannel, getChannel, getChannel, getChannelId, getChannels, getClient, getClientIDs, getClients, getCurrentRequest, getExtensions, getInterval, getLogLevel, getMaxInterval, getMultiFrameInterval, getSecurityPolicy, handle, hasChannel, hasClient, isDirectDeliver, isInitialized, isJSONCommented, isLogDebug, isLogInfo, isRequestAvailable, logDebug, logDebug, logInfo, logWarn, logWarn, newClient, newClient, newClientId, newTransport, publish, removeChannel, removeChannel, removeClient, removeExtension, removeFilter, setAdvice, setDirectDeliver, setInterval, setJSONCommented, setLogLevel, setMultiFrameInterval, setRequestAvailable, setSecurityPolicy, subscribe, unsubscribe
 
Methods inherited from class org.mortbay.cometd.MessagePool
getBatchJSON, getJSON, getMsgJSON, newMessage, newMessage, parse, parse, parseTo, recycleMessage, setBatchJSON, setJSON, setMsgJSON
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EXoContinuationBayeux

public EXoContinuationBayeux()
Default constructor.

Method Detail

newRemoteClient

public org.mortbay.cometd.ClientImpl newRemoteClient()

Overrides:
newRemoteClient in class org.mortbay.cometd.continuation.ContinuationBayeux

setTimeout

public void setTimeout(long timeout)

Overrides:
setTimeout in class org.mortbay.cometd.AbstractBayeux

getTimeout

public long getTimeout()

Overrides:
getTimeout in class org.mortbay.cometd.AbstractBayeux

getCometdContextName

public String getCometdContextName()
Returns:
context name of cometd webapp

getUserToken

public String getUserToken(String eXoId)
Parameters:
eXoId - the client id.
Returns:
token for client

initialize

protected void initialize(javax.servlet.ServletContext context)

Overrides:
initialize in class org.mortbay.cometd.continuation.ContinuationBayeux

getClientByEXoId

public EXoContinuationClient getClientByEXoId(String eXoID)
Parameters:
eXoID - the id of client.
Returns:
client with eXoID

sendBroadcastMessage

public void sendBroadcastMessage(String channel,
                                 Object data,
                                 String msgId)
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.

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).


Copyright © 2013 eXo Platform SAS. All Rights Reserved.