public class CometdWebConferencingService extends Object implements org.picocontainer.Startable
| Modifier and Type | Class and Description |
|---|---|
class |
CometdWebConferencingService.CallService
The Class CallService.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
CALL_MAX_FACTOR
Maximum threads per CPU for thread executors of user call channel.
|
static int |
CALL_QUEUE_FACTOR
Queue size per CPU for thread executors of user call channel.
|
static String |
CALL_SUBSCRIPTION_CHANNEL_NAME
The Constant CALL_SUBSCRIPTION_CHANNEL_NAME.
|
static String |
CALL_SUBSCRIPTION_CHANNEL_NAME_ALL
The Constant CALL_SUBSCRIPTION_CHANNEL_NAME_ALL.
|
static String |
CALL_SUBSCRIPTION_CHANNEL_NAME_PARAMS
The Constant CALL_SUBSCRIPTION_CHANNEL_NAME_PARAMS.
|
static String |
CALL_THREAD_PREFIX
Thread name used for calls executor.
|
protected ExecutorService |
callHandlers
The call handlers.
|
protected CallLogService |
callLogs
The call logs.
|
static String |
CALLS_CHANNEL_NAME
The Constant CALLS_CHANNEL_NAME.
|
static String |
COMMAND_CREATE
The Constant COMMAND_CREATE.
|
static String |
COMMAND_DELETE
The Constant COMMAND_DELETE.
|
static String |
COMMAND_GET
The Constant COMMAND_GET.
|
static String |
COMMAND_GET_CALLS_STATE
The Constant COMMAND_GET_CALLS_STATE.
|
static String |
COMMAND_UPDATE
The Constant COMMAND_UPDATE.
|
protected org.mortbay.cometd.continuation.EXoContinuationBayeux |
exoBayeux
The exo bayeux.
|
protected org.exoplatform.services.security.IdentityRegistry |
identityRegistry
The identity registry.
|
static String |
LOG_OK
The Constant LOG_OK.
|
static String |
LOGS_CHANNEL_NAME
The Constant LOGS_CHANNEL_NAME.
|
static int |
MIN_MAX_THREADS
Minimal number of threads maximum possible for remote calls' thread executors.
|
static int |
MIN_THREADS
Base minimum number of threads for remote calls' thread executors.
|
protected org.exoplatform.services.organization.OrganizationService |
organization
The organization.
|
protected CometdWebConferencingService.CallService |
service
The service.
|
protected org.exoplatform.services.jcr.ext.app.SessionProviderService |
sessionProviders
The session providers.
|
static int |
THREAD_IDLE_TIME
Thread idle time for thread executors (in seconds).
|
static String |
USER_SUBSCRIPTION_CHANNEL_NAME
The Constant USER_SUBSCRIPTION_CHANNEL_NAME.
|
static String |
USER_SUBSCRIPTION_CHANNEL_PATTERN
The Constant USER_SUBSCRIPTION_CHANNEL_PATTERN.
|
protected WebConferencingService |
webConferencing
The web conferencing.
|
| Constructor and Description |
|---|
CometdWebConferencingService(org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.services.security.IdentityRegistry identityRegistry,
org.exoplatform.services.organization.OrganizationService organization,
WebConferencingService webConferencing,
org.mortbay.cometd.continuation.EXoContinuationBayeux exoBayeux,
CallLogService callLogs)
Instantiates a new CometD interaction service for WebConferencing.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
asString(Object obj)
Return object if it's String instance or null if it is not.
|
protected String |
callId(String type,
String info)
Call id.
|
protected String |
channelsAsString(Set<org.cometd.bayeux.server.ServerChannel> channels)
Channels as string.
|
protected String |
channelUserId(String channelId)
Channel user id.
|
protected ExecutorService |
createThreadExecutor(String threadNamePrefix,
int maxFactor,
int queueFactor)
Create a new thread executor service.
|
protected String |
currentUserId(org.cometd.bayeux.server.ServerMessage message)
Current user id.
|
String |
getCometdServerPath()
Gets the cometd server path.
|
String |
getUserToken(String userId)
Gets the user token.
|
void |
start() |
void |
stop() |
public static final String CALLS_CHANNEL_NAME
public static final String LOGS_CHANNEL_NAME
public static final String CALL_SUBSCRIPTION_CHANNEL_NAME
public static final String CALL_SUBSCRIPTION_CHANNEL_NAME_ALL
public static final String CALL_SUBSCRIPTION_CHANNEL_NAME_PARAMS
public static final String USER_SUBSCRIPTION_CHANNEL_NAME
public static final String USER_SUBSCRIPTION_CHANNEL_PATTERN
public static final String COMMAND_GET
public static final String COMMAND_CREATE
public static final String COMMAND_UPDATE
public static final String COMMAND_DELETE
public static final String COMMAND_GET_CALLS_STATE
public static final String LOG_OK
public static final int MIN_THREADS
public static final int MIN_MAX_THREADS
public static final int THREAD_IDLE_TIME
public static final int CALL_MAX_FACTOR
public static final int CALL_QUEUE_FACTOR
public static final String CALL_THREAD_PREFIX
protected final WebConferencingService webConferencing
protected final org.mortbay.cometd.continuation.EXoContinuationBayeux exoBayeux
protected final CometdWebConferencingService.CallService service
protected final org.exoplatform.services.organization.OrganizationService organization
protected final org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders
protected final org.exoplatform.services.security.IdentityRegistry identityRegistry
protected final CallLogService callLogs
protected final ExecutorService callHandlers
public CometdWebConferencingService(org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.services.security.IdentityRegistry identityRegistry,
org.exoplatform.services.organization.OrganizationService organization,
WebConferencingService webConferencing,
org.mortbay.cometd.continuation.EXoContinuationBayeux exoBayeux,
CallLogService callLogs)
sessionProviders - the session providersidentityRegistry - the identity registryorganization - the organizationwebConferencing - the web conferencingexoBayeux - the exo bayeuxcallLogs - the call logspublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic String getCometdServerPath()
public String getUserToken(String userId)
userId - the user idprotected String currentUserId(org.cometd.bayeux.server.ServerMessage message)
message - the messageIdentityConstants.ANONIMprotected String channelUserId(String channelId) throws IndexOutOfBoundsException
USER_SUBSCRIPTION_CHANNEL_NAME.channelId - the channel idIndexOutOfBoundsException - if channel id doesn't look like an user channelprotected String channelsAsString(Set<org.cometd.bayeux.server.ServerChannel> channels)
channels - the channelsprotected String callId(String type, String info)
type - the typeinfo - the idprotected String asString(Object obj)
obj - the objprotected ExecutorService createThreadExecutor(String threadNamePrefix, int maxFactor, int queueFactor)
threadNamePrefix - the thread name prefixmaxFactor - - max processes per CPU corequeueFactor - - queue size per CPU coreCopyright © 2003–2018 eXo Platform SAS. All rights reserved.