com.bankframe.ei.txnhandler.connector.offline
Class OffLineConnection

java.lang.Object
  extended bycom.bankframe.ei.txnhandler.connector.offline.OffLineConnection
All Implemented Interfaces:
EConnection

public class OffLineConnection
extends java.lang.Object
implements EConnection

This class represents an application-level handle to the OffLine Database that is used by a client to access the underlying physical connection. BankFrame Host Connectors will call the post() method of this connection to either fetch requests from the offline database when they do not want to run against the live host system, or to store requests and responses in the offline database for later offline transactions. All objects sent through the post method must be serializable, so that they can be stored offline. If they are not serializable then the post method will return null, and requests will not be stored or fetched from the OffLine database.


Constructor Summary
OffLineConnection()
          OffLineConnection constructor.
OffLineConnection(OffLineManagedConnection mc)
          OffLineConnection constructor.
 
Method Summary
 void close()
          This method initiates close of the offline connection handle at the application level.
 java.lang.Object post(java.lang.Object txns)
          This method is used to emulate a real host connector's post method.
 java.lang.Object post(java.lang.Object reqTxn, java.lang.Object resTxn)
          This method is used to emulate a real host connector's post method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OffLineConnection

public OffLineConnection()
OffLineConnection constructor.


OffLineConnection

public OffLineConnection(OffLineManagedConnection mc)
OffLineConnection constructor.

Parameters:
mc - The OffLineManagedConnection (physical connection) to be associated with application handle.
Method Detail

close

public void close()
This method initiates close of the offline connection handle at the application level.

Specified by:
close in interface EConnection

post

public java.lang.Object post(java.lang.Object txns)
                      throws ProcessingErrorException
This method is used to emulate a real host connector's post method. When the application calls this method, the OffLine Connector will determine what the the expected response to this transaction request is, and return it to the client. Note that this method may only be called when the Host Connector is in the 'fetch' offline mode. To run in 'store' mode, you must provide the request and response object, and should use the post(Object, Object) method.

Specified by:
post in interface EConnection
Parameters:
txns - An object that represents a transaction request to a host system.
Returns:
An object that represents a transaction response from a host system.
Throws:
ProcessingErrorException - if an error occurs

post

public java.lang.Object post(java.lang.Object reqTxn,
                             java.lang.Object resTxn)
                      throws ProcessingErrorException
This method is used to emulate a real host connector's post method. If the connector is running in 'fetch' mode, when the application calls this method, the OffLine Connector will determine what the the expected response to this transaction request is, and return it to the client. If the connector is running in 'store' mode then the OffLine Connector will store both the request and response in the OffLine Database so that this request may be run offline at a later time.

Returns:
An object that represents a transaction response from a host system.
Throws:
ProcessingErrorException


Copyright © 2005, 2007, Oracle. All rights reserved.