public abstract class BaseMessageSender extends java.lang.Object implements java.lang.Runnable, MessageSender
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
done |
protected BaseUIMAAsynchronousEngineCommon_impl |
engine |
protected java.lang.Exception |
exception |
protected java.util.concurrent.BlockingQueue<PendingMessage> |
messageQueue |
protected boolean |
workerThreadFailed |
| Constructor and Description |
|---|
BaseMessageSender(BaseUIMAAsynchronousEngineCommon_impl anEngine) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
cleanup() |
void |
doStop()
Stops the worker thread
|
boolean |
failed()
The uima ee client should call this method to check if there was a failure.
|
protected abstract java.lang.String |
getDestinationEndpoint() |
abstract javax.jms.MessageProducer |
getMessageProducer() |
javax.jms.MessageProducer |
getMessageProducer(javax.jms.Destination destination) |
java.lang.Exception |
getReasonForFailure()
Return the Exception that caused the failure in this worker thread
|
protected abstract void |
initializeProducer() |
void |
run()
Initializes jms message producer and starts the main thread.
|
abstract void |
setConnection(javax.jms.Connection connection) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateBytesMessage, createTextMessageprotected java.util.concurrent.BlockingQueue<PendingMessage> messageQueue
protected volatile boolean done
protected BaseUIMAAsynchronousEngineCommon_impl engine
protected volatile boolean workerThreadFailed
protected java.lang.Exception exception
public BaseMessageSender(BaseUIMAAsynchronousEngineCommon_impl anEngine)
public abstract javax.jms.MessageProducer getMessageProducer()
getMessageProducer in interface MessageSenderprotected abstract void initializeProducer()
throws java.lang.Exception
java.lang.Exceptionprotected abstract void cleanup()
throws java.lang.Exception
java.lang.Exceptionprotected abstract java.lang.String getDestinationEndpoint()
throws java.lang.Exception
java.lang.Exceptionpublic abstract void setConnection(javax.jms.Connection connection)
setConnection in interface MessageSenderpublic void doStop()
doStop in interface MessageSenderpublic java.lang.Exception getReasonForFailure()
getReasonForFailure in interface MessageSenderpublic boolean failed()
failed in interface MessageSenderpublic void run()
run in interface java.lang.Runnablepublic javax.jms.MessageProducer getMessageProducer(javax.jms.Destination destination)
throws java.lang.Exception
getMessageProducer in interface MessageSenderjava.lang.ExceptionCopyright © 2012. All Rights Reserved.