public interface WorkManager extends ConfigurationElement, org.adroitlogic.ultraesb.jmx.element.WorkManagerMXBean, org.springframework.core.task.TaskExecutor, java.util.concurrent.Executor
ConfigurationElement.State
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
WIP_START_TIME_NANO |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId()
Return ID of the WorkManager
|
int |
getMessageQueueSize()
Size of the pending message queue
|
int |
getWipMapSize()
Number of the messages in progress
|
void |
handleCompletion(org.adroitlogic.ultraesb.core.MessageImpl msg)
Handle a message that has completed processing.
|
void |
handleFailedMessage(org.adroitlogic.ultraesb.core.MessageImpl msg)
Submits a failed message for processing.
|
void |
printWIPMessageDetails()
Print WIP message details to the log
|
void |
start()
Initialize the work manager
|
void |
stop()
Stop the work manager
|
void |
submitAsync(org.adroitlogic.ultraesb.core.MessageImpl msg,
java.lang.Runnable task)
Submit a task for asynchronous execution by this work manager
|
void |
submitNewMessage(org.adroitlogic.ultraesb.core.MessageImpl msg,
boolean useNewThread)
Submit a new message for processing.
|
org.adroitlogic.ultraesb.jmx.view.WorkManagerView |
toBasicView() |
org.adroitlogic.ultraesb.jmx.view.WorkManagerView |
toDetailedView() |
void |
updateFromView(org.adroitlogic.ultraesb.jmx.view.WorkManagerView view) |
getDerivedName, getState, isDebugOn, isStarted, maintenanceShutdown, pause, resume, retire, setConfig
static final java.lang.String WIP_START_TIME_NANO
void start()
start
in interface ConfigurationElement
void stop()
stop
in interface ConfigurationElement
void submitNewMessage(org.adroitlogic.ultraesb.core.MessageImpl msg, boolean useNewThread) throws org.adroitlogic.ultraesb.core.work.WorkException
msg
- The new message submitted for processinguseNewThread
- true - WorkManager should process the message in a new thread, false - use caller threadWorkException
- if the message is rejected for any reason - typically when load bounds are exceededvoid submitAsync(org.adroitlogic.ultraesb.core.MessageImpl msg, java.lang.Runnable task)
msg
- the message to be made available to the async thread, also as a thread local variabletask
- a Runnable task to be executed asynchronouslyvoid handleFailedMessage(org.adroitlogic.ultraesb.core.MessageImpl msg)
msg
- message that has failedvoid handleCompletion(org.adroitlogic.ultraesb.core.MessageImpl msg)
msg
- the completed messageint getMessageQueueSize()
int getWipMapSize()
void printWIPMessageDetails()
java.lang.String getId()
getId
in interface ConfigurationElement
org.adroitlogic.ultraesb.jmx.view.WorkManagerView toBasicView()
org.adroitlogic.ultraesb.jmx.view.WorkManagerView toDetailedView()
void updateFromView(org.adroitlogic.ultraesb.jmx.view.WorkManagerView view)