org.apache.uima.adapter.jms.client
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, wait
createBytesMessage, createTextMessage
protected 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 MessageSender
protected abstract void initializeProducer() throws java.lang.Exception
java.lang.Exception
protected abstract void cleanup() throws java.lang.Exception
java.lang.Exception
protected abstract java.lang.String getDestinationEndpoint() throws java.lang.Exception
java.lang.Exception
public abstract void setConnection(javax.jms.Connection connection)
setConnection
in interface MessageSender
public void doStop()
doStop
in interface MessageSender
public java.lang.Exception getReasonForFailure()
getReasonForFailure
in interface MessageSender
public boolean failed()
failed
in interface MessageSender
public void run()
run
in interface java.lang.Runnable
public javax.jms.MessageProducer getMessageProducer(javax.jms.Destination destination) throws java.lang.Exception
getMessageProducer
in interface MessageSender
java.lang.Exception
Copyright © 2014. All Rights Reserved.