public class SingleThreadedEventHandlingStrategy extends Object implements EventHandlingStrategy
| Modifier and Type | Field and Description |
|---|---|
static String |
MESSAGE_PROCESSOR_THREAD_NAME |
END_OF_STREAM, THREAD_WAIT_FOR_MESSAGE_MS| Constructor and Description |
|---|
SingleThreadedEventHandlingStrategy(SessionConnector connector,
int queueCapacity) |
SingleThreadedEventHandlingStrategy(SessionConnector connector,
int queueLowerWatermark,
int queueUpperWatermark) |
| Modifier and Type | Method and Description |
|---|---|
void |
blockInThread()
Start handling of messages by message processor thread.
|
int |
getQueueSize() |
int |
getQueueSize(SessionID sessionID) |
SessionConnector |
getSessionConnector() |
void |
onMessage(Session quickfixSession,
Message message) |
void |
setExecutor(Executor executor) |
void |
stopHandlingMessages()
Stops processing of messages without waiting for message processing
thread to finish.
|
void |
stopHandlingMessages(boolean join)
Stops processing of messages and optionally waits for message processing
thread to finish.
|
public static final String MESSAGE_PROCESSOR_THREAD_NAME
public SingleThreadedEventHandlingStrategy(SessionConnector connector, int queueCapacity)
public SingleThreadedEventHandlingStrategy(SessionConnector connector, int queueLowerWatermark, int queueUpperWatermark)
public void setExecutor(Executor executor)
public void onMessage(Session quickfixSession, Message message)
onMessage in interface EventHandlingStrategypublic SessionConnector getSessionConnector()
getSessionConnector in interface EventHandlingStrategypublic void blockInThread()
public void stopHandlingMessages()
public void stopHandlingMessages(boolean join)
join - true to wait for thread to finishpublic int getQueueSize()
getQueueSize in interface EventHandlingStrategypublic int getQueueSize(SessionID sessionID)
getQueueSize in interface EventHandlingStrategyCopyright © 2021. All rights reserved.