org.openeai.jms.consumer.commands
Interface SyncCommand

All Known Implementing Classes:
EnterpriseSyncErrorLogger, EnterpriseSyncLoggerCommand, MessageDumpSyncCommand, SimpleMessage, SyncVerificationCommand, TransRouterCommand

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..

Version:
3.0 beta2 - 28 January 2003
Author:
Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)
See Also:
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.
 

Method Detail

execute

public void execute(int messageNumber,
                    javax.jms.Message aMessage)
             throws CommandException
Method used to implement business logic specific to a message or set of messages consumed by a OpenEAI PubSubConsumer or PointToPointConsumer. When a consumer consumes a message it determines which SyncCommand implementation to execute and calls this method passing the JMS Message. The command then retrieves the body of the message and converts that into an XML Document (org.jdom.Document). Then the command executes business logic appropriate to it based on the contents of the message.

Returns:
void

Throws:
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.
CommandException
See Also:
RequestMessage.execute


Copyright © 2002, OpenEAI Software Foundation