com.ibm.dse.appl.forwarding.server
Class ForwardingServerOperation

java.lang.Object
  |
  +--com.ibm.dse.base.DSEOperation
        |
        +--com.ibm.dse.base.DSEServerOperation
              |
              +--com.ibm.dse.appl.forwarding.server.ForwardingServerOperation

public class ForwardingServerOperation
extends DSEServerOperation

This server operation performs the retrieving of a store record forward the transaction message in the record to the host. It will update both the Store table and the Journal table based on the result it returned. This operation will be able to retrieve the Store service, the Journal service and also the Host service which implements CommonCommunicationsService interface.

See Also:
Serialized Form

Fields inherited from class com.ibm.dse.base.DSEOperation
aOperationRepliedListener, externalizer
 
Constructor Summary
ForwardingServerOperation()
          ForwardingServerOperation constructor
ForwardingServerOperation(java.lang.String anOperationName)
          ForwardingServerOperation constructor
ForwardingServerOperation(java.lang.String anOperationName, Context aParentContext)
          Constructor passing an operation and a context.
ForwardingServerOperation(java.lang.String anOperationName, java.lang.String aParentContext)
          Constructor passing an operation name and a string representation of the parent context.
 
Method Summary
 void execute()
          Performs the operation.
 void forwardAllRecords()
          Implementation for the interface ForwarderRetrieveInterface.
 void forwardRecordsWithCollection(java.util.Enumeration collection)
          Implementation for the interface ForwarderRetrieveInterface.
 void forwardRecordsWithCriteria(java.lang.String whereClause)
          Implementation for the interface ForwarderRetrieveInterface.
 void forwardRecordWithID(int identifier)
          Implementation for the interface ForwarderRetrieveInterface.
 JournalService getJournalService()
          Retrieves the Journal service from the context and opens the connection to the Journal table.
 Store getStoreService()
          Retrives the Store service from context and open the connection to the Store table.
 void initializeForwarder()
          Retrieves the forwarder class name from the externalized data elements file and tries to construct the class.
 void updateEJ(int value)
          Update Journal value based on the forward result.
 
Methods inherited from class com.ibm.dse.base.DSEServerOperation
getCSReplyFormat, getCSRequestFormat, getOriginWorkstation, runInSession, setCSReplyFormat, setCSRequestFormat, setOriginWorkstation, updateContext
 
Methods inherited from class com.ibm.dse.base.DSEOperation
addElement, addOperationRepliedListener, chainTo, chainToContextNamed, chainToCurrentContext, close, externalizer, fireHandleOperationRepliedEvent, getApplicationId, getContext, getContextByType, getContextName, getContextNamed, getElementAt, getExternalizer, getFormat, getFormats, getHostReceiveFormat, getHostSendFormat, getInstanceOfOperationStep, getKeyedCollection, getName, getOperationStep, getOperationStepRC, getOperationSteps, getParent, getSelfDefinedOpTagInputStream, getService, getServiceByType, getSessionId, getSgmlSelfDefinedOpFileName, getType, getValueAt, hasServices, initializeFormatFrom, initializeFrom, initializeKeyedCollectionValueFrom, initializeOpStep, initializeOpStepsFrom, isCacheable, isChained, isContext, occurrencesNamed, prune, readExternal, readExternal, readObject, reinitialize, removeAt, removeExternal, removeOperationRepliedListener, setApplicationId, setContext, setContextName, setExternalizer, setHostReceiveFormat, setHostSendFormat, setKeyedCollection, setName, setSessionId, setType, setValueAt, toString, toStrings, toTags, unchain, writeExternal, writeExternal, xValidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForwardingServerOperation

public ForwardingServerOperation()
ForwardingServerOperation constructor

ForwardingServerOperation

public ForwardingServerOperation(java.lang.String anOperationName)
                          throws java.io.IOException
ForwardingServerOperation constructor
Parameters:
anOperationName - java.lang.String
Throws:
java.io.IOException -  

ForwardingServerOperation

public ForwardingServerOperation(java.lang.String anOperationName,
                                 Context aParentContext)
                          throws java.io.IOException,
                                 DSEInvalidRequestException
Constructor passing an operation and a context.
Parameters:
anOperationName - java.lang.String
aParentContext - com.ibm.dse.base.Context
Throws:
java.io.IOException - The exception description.
DSEInvalidRequestException - The exception description.

ForwardingServerOperation

public ForwardingServerOperation(java.lang.String anOperationName,
                                 java.lang.String aParentContext)
                          throws java.io.IOException,
                                 DSEObjectNotFoundException,
                                 DSEInvalidRequestException
Constructor passing an operation name and a string representation of the parent context.
Parameters:
anOperationName - java.lang.String
aParentContext - java.lang.String
Throws:
java.io.IOException - The exception description.
DSEObjectNotFoundException - The exception description.
DSEInvalidRequestException - The exception description.
Method Detail

execute

public void execute()
             throws java.lang.Exception
Performs the operation. Retrieves the forward type and the forwarder class from the context.
Overrides:
execute in class DSEServerOperation
Throws:
java.lang.Exception -  

forwardAllRecords

public void forwardAllRecords()
                       throws DSEException,
                              java.io.IOException
Implementation for the interface ForwarderRetrieveInterface.
Throws:
com.ibm.dse.base.DSEException; -  
java.io.IOException -  

forwardRecordsWithCollection

public void forwardRecordsWithCollection(java.util.Enumeration collection)
                                  throws DSEException,
                                         java.io.IOException
Implementation for the interface ForwarderRetrieveInterface.
Parameters:
collection - java.util.Enumeration, a collection for store record ids
Throws:
DSEException -  
java.io.IOException -  

forwardRecordsWithCriteria

public void forwardRecordsWithCriteria(java.lang.String whereClause)
                                throws DSEException,
                                       java.io.IOException
Implementation for the interface ForwarderRetrieveInterface.
Parameters:
whereCluase - java.lang.String representation of an SQL statement
Throws:
DSEException -  
java.io.IOException -  

forwardRecordWithID

public void forwardRecordWithID(int identifier)
                         throws DSEException,
                                java.io.IOException
Implementation for the interface ForwarderRetrieveInterface.
Parameters:
identifier - int, the store record id
Throws:
DSEException -  
java.io.IOException -  

getJournalService

public JournalService getJournalService()
                                 throws DSEException
Retrieves the Journal service from the context and opens the connection to the Journal table.
Returns:
com.ibm.dse.services.jdbc.JournalService, the jdbc jorunal service
Throws:
DSEException -  

getStoreService

public Store getStoreService()
                      throws DSEException
Retrives the Store service from context and open the connection to the Store table.
Returns:
com.ibm.dse.services.jdbc.Store, store service for forwarding operation
Throws:
DSEException -  

initializeForwarder

public void initializeForwarder()
                         throws DSEObjectNotFoundException,
                                java.lang.ClassNotFoundException,
                                java.lang.InstantiationException,
                                java.lang.IllegalAccessException
Retrieves the forwarder class name from the externalized data elements file and tries to construct the class.
Throws:
DSEObjectNotFoundException -  
java.lang.ClassNotFoundException -  

updateEJ

public void updateEJ(int value)
              throws DSEException
Update Journal value based on the forward result.
Parameters:
value - int, forward result
Throws:
DSEException -