org.openeai.jms.consumer.commands
Class SyncCommandImpl

java.lang.Object
  |
  +--org.openeai.OpenEaiObject
        |
        +--org.openeai.jms.consumer.commands.ConsumerCommand
              |
              +--org.openeai.jms.consumer.commands.SyncCommandImpl
Direct Known Subclasses:
EnterpriseSyncErrorLogger, EnterpriseSyncLoggerCommand, MessageDumpSyncCommand, RoutingCriteriaCommandImpl, SimpleMessage, SyncVerificationCommand, TransRouterCommand

public class SyncCommandImpl
extends ConsumerCommand

The "default" anscestor of all SyncCommands that are executed by a PubSubConsumer.

Organizations can add an additional layer between this class and the command implementations they develop or they can even eliminate the use of this class altogether. This class provides many useful convenience methods that are commonly needed by all RequestCommand implementations. Additional common routines will be added to this layer as time goes by...

Version:
3.0 beta2 - 28 January 2003

Author:
Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)
See Also:
ConsumerCommand, RequestCommand, RequestCommandImpl, SyncCommand

Field Summary
 
Fields inherited from class org.openeai.jms.consumer.commands.ConsumerCommand
CREATE_ACTION, DELETE_ACTION, MESSAGE_ACTION, MESSAGE_CATEGORY, MESSAGE_OBJECT, MESSAGE_RELEASE, MESSAGE_TYPE, QUERY_ACTION, UPDATE_ACTION
 
Fields inherited from class org.openeai.OpenEaiObject
logger
 
Constructor Summary
SyncCommandImpl()
           
SyncCommandImpl(CommandConfig cConfig)
          Default constructor behavior that will apply to all SyncCommand implementations.
 
Method Summary
 PubSubProducer getSyncErrorPublisher()
          Get SyncErrorPublisher associated to this command.
 org.jdom.Document getSyncErrorSyncDoc()
          Returns the Sync-Error-Sync primed Document object built from the SyncErrorSyncPrimedDocument URI that will be used as the primed sync error sync Document used as a starting point when publishing Sync errors.
protected  java.lang.String getSyncErrorSyncPrimedDocumentUri()
          Returns the Sync-Error-Sync primed document URI that will be used to build the primed sync error sync Document used as a starting point when publishing Sync errors.
protected  void publishSyncError(org.jdom.Element senderControlArea, java.util.List errors)
          This method is used to publish a Sync-Error-Sync message when/if the Command has any errors during processing (during the 'execute' method).
protected  void publishSyncError(org.jdom.Element senderControlArea, java.util.List errors, java.lang.Throwable e)
          This method is used to publish a Sync-Error-Sync message when/if the Command has any errors during processing (during the 'execute' method).
 void setSyncErrorSyncDoc(org.jdom.Document doc)
          Sets the Sync-Error-Sync primed Document object built from the SyncErrorSyncPrimedDocument URI that will be used as the primed sync error sync Document used as a starting point when publishing Sync errors.
protected  void setSyncErrorSyncPrimedDocumentUri(java.lang.String uri)
          Sets the Sync-Error-Sync primed document URI that will be used to build the primed sync error sync Document used as a starting point when publishing Sync errors.
 
Methods inherited from class org.openeai.jms.consumer.commands.ConsumerCommand
addAppConfig, buildError, convertToString, generateRelease, getAppConfig, getAppConfigs, getControlArea, getInboundXmlValidation, getMessageAction, getMessageBody, getMessageCategory, getMessageDumpDirectory, getMessageObject, getMessageRelease, getMessageType, getMsgComponents, getOutboundXmlValidation, initializeInput, setAppConfig, setInboundXmlValidation, setMessageDumpDirectory, setMsgComponents, setOutboundXmlValidation, setWriteToFile, writeMessageToFile, writeToFile
 
Methods inherited from class org.openeai.OpenEaiObject
addLog4jProperty, getAppName, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncCommandImpl

public SyncCommandImpl()

SyncCommandImpl

public SyncCommandImpl(CommandConfig cConfig)
                throws java.lang.InstantiationException
Default constructor behavior that will apply to all SyncCommand implementations. This is the constructor called by AppConfig/ConsumerConfig during gateway initialization. Calls the ConsumerCommand constructor. Additionally, this constructor verifies that the SyncCommand implementation being initialized contains the appropriate SyncErrorPublisher and SyncErrorSyncProperties objects in the CommandConfig object passed in.

Throws:
java.lang.InstantiationException - if errors occur during initialization.
Method Detail

getSyncErrorSyncPrimedDocumentUri

protected final java.lang.String getSyncErrorSyncPrimedDocumentUri()
Returns the Sync-Error-Sync primed document URI that will be used to build the primed sync error sync Document used as a starting point when publishing Sync errors.

Returns:
String the URI.

setSyncErrorSyncPrimedDocumentUri

protected final void setSyncErrorSyncPrimedDocumentUri(java.lang.String uri)
Sets the Sync-Error-Sync primed document URI that will be used to build the primed sync error sync Document used as a starting point when publishing Sync errors.


setSyncErrorSyncDoc

public final void setSyncErrorSyncDoc(org.jdom.Document doc)
Sets the Sync-Error-Sync primed Document object built from the SyncErrorSyncPrimedDocument URI that will be used as the primed sync error sync Document used as a starting point when publishing Sync errors.


getSyncErrorSyncDoc

public final org.jdom.Document getSyncErrorSyncDoc()
Returns the Sync-Error-Sync primed Document object built from the SyncErrorSyncPrimedDocument URI that will be used as the primed sync error sync Document used as a starting point when publishing Sync errors.

Returns:
Document the primed sync error document

getSyncErrorPublisher

public final PubSubProducer getSyncErrorPublisher()
Get SyncErrorPublisher associated to this command. It is called by commands when they need to publish a sync error via the publishSyncError method also defined in Command.

Returns:
PubSubProducer

publishSyncError

protected final void publishSyncError(org.jdom.Element senderControlArea,
                                      java.util.List errors,
                                      java.lang.Throwable e)
This method is used to publish a Sync-Error-Sync message when/if the Command has any errors during processing (during the 'execute' method).


publishSyncError

protected final void publishSyncError(org.jdom.Element senderControlArea,
                                      java.util.List errors)
This method is used to publish a Sync-Error-Sync message when/if the Command has any errors during processing (during the 'execute' method).



Copyright © 2002, OpenEAI Software Foundation