|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openeai.jms.consumer.MessageConsumer.MessageTransaction
protected class MessageConsumer.MessageTransaction
This is the class that is used to execute the SyncCommand associated to a message consumed by the Consumer. When a message is delivered to the Destination onwhich the consumer is connected and there is no expected reply, it will instantiate this class passing a message number and the actual message it consumed and add this classes run method to the ThreadPool (if the ThreadPool is in use). If the ThreadPool is not in use, the consumer will simply call this classes run method and will block until that command's execution is complete.
By adding this "job" to the ThreadPool, the consumer does not wait for the command to complete execution before consuming another message. Therefore, you can affect how many "jobs" may be in progress by configuring the ThreadPool associated to this Consumer.
Since both PubSub and PointToPoint Consumers may handle SyncCommands, this class is defined at this ancestor level. A PointToPointConsumer also contains a RequestTransaction that executes RequestCommands if the incomming request expects a reply.
ThreadPoolConfig,
ThreadPool,
PubSubConsumer.MyTopicListener.onMessage(Message),
PointToPointConsumer.MyQueueListener.onMessage(Message),
PointToPointConsumer.RequestTransaction| Constructor Summary | |
|---|---|
MessageConsumer.MessageTransaction(int messageNumber,
javax.jms.Message inMsg)
|
|
| Method Summary | |
|---|---|
void |
run()
Calls the handleSync method passing the message number and Message consumed by the consumer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MessageConsumer.MessageTransaction(int messageNumber,
javax.jms.Message inMsg)
| Method Detail |
|---|
public void run()
run in interface java.lang.RunnableMessageConsumer.handleSync(int, Message)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||