public class CometdOnlyofficeService extends Object implements org.picocontainer.Startable
| Modifier and Type | Class and Description |
|---|---|
class |
CometdOnlyofficeService.CometdService
The CometService is responsible for sending messages to Cometd channels
when a document is saved.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CHANNEL_NAME
The channel name.
|
static String |
CHANNEL_NAME_PARAMS
The channel name.
|
static String |
DOCUMENT_CHANGED_EVENT
The document changed event.
|
static String |
DOCUMENT_LINK_EVENT
The document link event.
|
static String |
DOCUMENT_SAVED_EVENT
The document saved event.
|
static String |
DOCUMENT_VERSION_EVENT
The document version event.
|
static String |
EDITOR_CLOSED_EVENT
The editor closed event.
|
protected OnlyofficeEditorService |
editors
The Onlyoffice editor service.
|
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 document updates 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 CometdOnlyofficeService.CometdService |
service
The service.
|
static int |
THREAD_IDLE_TIME
Thread idle time for thread executors (in seconds).
|
static String |
THREAD_PREFIX
Thread name used for the executor.
|
| Constructor and Description |
|---|
CometdOnlyofficeService(org.mortbay.cometd.continuation.EXoContinuationBayeux exoBayeux,
OnlyofficeEditorService onlyofficeEditorService)
Instantiates the CometdOnlyofficeService.
|
| 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 CHANNEL_NAME
public static final String CHANNEL_NAME_PARAMS
public static final String DOCUMENT_SAVED_EVENT
public static final String DOCUMENT_CHANGED_EVENT
public static final String DOCUMENT_VERSION_EVENT
public static final String DOCUMENT_LINK_EVENT
public static final String EDITOR_CLOSED_EVENT
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 OnlyofficeEditorService editors
protected final org.mortbay.cometd.continuation.EXoContinuationBayeux exoBayeux
protected final CometdOnlyofficeService.CometdService service
protected final ExecutorService eventsHandlers
public CometdOnlyofficeService(org.mortbay.cometd.continuation.EXoContinuationBayeux exoBayeux,
OnlyofficeEditorService onlyofficeEditorService)
exoBayeux - the exoBayeuxonlyofficeEditorService - the onlyoffice editor 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.