|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RequestCommand
The interface implmented by all RequestCommands and specifies that they must implement the 'execute' method which returns a JMS Message. These commands will be executed by the PointToPointConsumer when the JMSReplyTo property on a JMS message is not empty. The message returned by the RequestCommand will be returned to the calling application by the PointToPointConsumer.
SyncCommand| Method Summary | |
|---|---|
javax.jms.Message |
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 PointToPointConsumer. |
void |
shutdown()
|
| Method Detail |
|---|
javax.jms.Message 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 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 - the JMS Message delivered to the PointToPointConsumer.
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 returning a
Reply document with errors indicating the nature of the problem.
CommandExceptionSyncCommand.execute
void shutdown()
throws CommandException
CommandException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||