public abstract class BaseMessageSender extends Object implements Runnable, MessageSender
Modifier and Type | Field and Description |
---|---|
protected boolean |
done |
protected BaseUIMAAsynchronousEngineCommon_impl |
engine |
protected Exception |
exception |
protected 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 String |
getDestinationEndpoint() |
abstract javax.jms.MessageProducer |
getMessageProducer() |
javax.jms.MessageProducer |
getMessageProducer(javax.jms.Destination destination) |
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, wait
createBytesMessage, createTextMessage
protected BlockingQueue<PendingMessage> messageQueue
protected volatile boolean done
protected BaseUIMAAsynchronousEngineCommon_impl engine
protected volatile boolean workerThreadFailed
protected Exception exception
public BaseMessageSender(BaseUIMAAsynchronousEngineCommon_impl anEngine)
public abstract javax.jms.MessageProducer getMessageProducer()
getMessageProducer
in interface MessageSender
protected abstract String getDestinationEndpoint() throws Exception
Exception
public abstract void setConnection(javax.jms.Connection connection)
setConnection
in interface MessageSender
public void doStop()
doStop
in interface MessageSender
public Exception getReasonForFailure()
getReasonForFailure
in interface MessageSender
public boolean failed()
failed
in interface MessageSender
public void run()
public javax.jms.MessageProducer getMessageProducer(javax.jms.Destination destination) throws Exception
getMessageProducer
in interface MessageSender
Exception
Copyright © 2017. All rights reserved.