|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SyncCommand
The interface implmented by all SyncCommands and specifies that they must implement the 'execute' method. These commands will be executed by the PubSubConsumer when when it consumes a Sync Message..
RequestCommand| Method Summary | |
|---|---|
void |
execute(int messageNumber,
javax.jms.Message aMessage)
Method used to implement business logic specific to a message or set of messages consumed by a OpenEAI PubSubConsumer or PointToPointConsumer. |
void |
shutdown()
|
| Method Detail |
|---|
void execute(int messageNumber,
javax.jms.Message aMessage)
throws CommandException
NOTE: The consumer only instantiates one instance of these commands (for each one supported by the consumer). If the consumer is configured to be multi-threaded, it will be calling the execute method on a single instance of the command associated to the message it consumed. Therefore, it is very important that the execute method be thread safe.
messageNumber, - convenience parm that is maintained by the PointToPointConsumer and PubSubConsumer
that will execute the command. This information can then be used in the Command to associate a
specific line of execution back to the message number in the consumer.aMessage - JMS Message delivered to the PubSubConsumer.
CommandException. - Generally, this exception should only ever be thrown if the
Command has trouble turning the message body of the JMS Message passed to the execute method into an XML Document (org.jdom.Document).
Any other error encountered by the command should be handled accordingly by publishing a Sync-Error-Sync
message with errors indicating the nature of the problem.
CommandExceptionRequestMessage.execute
void shutdown()
throws CommandException
CommandException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||