public class CometdSmartActivityService extends Object implements org.picocontainer.Startable
| Modifier and Type | Class and Description |
|---|---|
class |
CometdSmartActivityService.CometdService
The CometService is responsible for sending messages to Cometd channels.
|
| Modifier and Type | Field and Description |
|---|---|
protected ExecutorService |
eventsHandlers
The call handlers.
|
protected org.mortbay.cometd.continuation.EXoContinuationBayeux |
exoBayeux
The exo bayeux.
|
static int |
MAX_FACTOR
Maximum threads per CPU for thread executors of document changes channel.
|
static int |
MIN_MAX_THREADS
Minimal number of threads maximum possible for thread executors.
|
static int |
MIN_THREADS
Base minimum number of threads for document updates thread executors.
|
static int |
QUEUE_FACTOR
Queue size per CPU for thread executors of document updates channel.
|
protected CometdSmartActivityService.CometdService |
service
The service.
|
protected SmartActivityService |
smartActivityService
The smart activity service.
|
static int |
THREAD_IDLE_TIME
Thread idle time for thread executors (in seconds).
|
static String |
THREAD_PREFIX
Thread name used for the executor.
|
static String |
USERFOCUS_CHANNEL_NAME
The channel name.
|
| Constructor and Description |
|---|
CometdSmartActivityService(org.mortbay.cometd.continuation.EXoContinuationBayeux exoBayeux,
SmartActivityService smartActivityService)
Instantiates the CometdSmartActivityService.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
channelsAsString(Set<org.cometd.bayeux.server.ServerChannel> channels)
Channels as string.
|
protected ExecutorService |
createThreadExecutor(String threadNamePrefix,
int maxFactor,
int queueFactor)
Create a new thread executor service.
|
String |
getCometdServerPath()
Gets the cometd server path.
|
String |
getUserToken(String userId)
Gets the user token.
|
void |
start() |
void |
stop() |
public static final String USERFOCUS_CHANNEL_NAME
public static final int MIN_THREADS
public static final int MIN_MAX_THREADS
public static final int THREAD_IDLE_TIME
public static final int MAX_FACTOR
public static final int QUEUE_FACTOR
public static final String THREAD_PREFIX
protected final SmartActivityService smartActivityService
protected final org.mortbay.cometd.continuation.EXoContinuationBayeux exoBayeux
protected final CometdSmartActivityService.CometdService service
protected final ExecutorService eventsHandlers
public CometdSmartActivityService(org.mortbay.cometd.continuation.EXoContinuationBayeux exoBayeux,
SmartActivityService smartActivityService)
exoBayeux - the exoBayeuxsmartActivityService - the smart activity servicepublic void start()
start in interface org.picocontainer.Startableprotected String channelsAsString(Set<org.cometd.bayeux.server.ServerChannel> channels)
channels - the channelspublic void stop()
stop in interface org.picocontainer.Startablepublic String getCometdServerPath()
public String getUserToken(String userId)
userId - the userIdprotected ExecutorService createThreadExecutor(String threadNamePrefix, int maxFactor, int queueFactor)
threadNamePrefix - the thread name prefixmaxFactor - - max processes per CPU corequeueFactor - - queue size per CPU coreCopyright © 2003–2019 eXo Platform SAS. All rights reserved.