com.ibm.connector2.cics
Class ECIInteraction

java.lang.Object
  extended bycom.ibm.connector2.cics.ECIInteraction

public final class ECIInteraction
extends java.lang.Object

Framework abstract class for Interaction.

This class provides support for the logWriter and connection properties. It also provides the support for warnings which aren't available in ECI or EPI resource adapters.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 void clearWarnings()
          clears any warnings Logged.
 void close()
          Close the Interaction and disable any further communication with CICS.
 boolean execute(InteractionSpec spec, Record in, Record out)
          In order to interact with CICS this method must be used to pass the definition of the call in an ECIInteractionSpec and the input and output Records that will carry the data used in the interaction.
 javax.resource.cci.Record execute(javax.resource.cci.InteractionSpec A, javax.resource.cci.Record B)
          this form of execute is not supported by the CICS Resource Adapters
 void finalize()
          Clean up any outstanding Async replies if necessary.
 javax.resource.cci.Connection getConnection()
          returns the connection associated with the Interaction.
 javax.resource.cci.ResourceWarning getWarnings()
          retrieves the First warning in the Warning Chain.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Method Detail

getConnection

public javax.resource.cci.Connection getConnection()
returns the connection associated with the Interaction.

Returns:
The CCI Connection

getWarnings

public javax.resource.cci.ResourceWarning getWarnings()
retrieves the First warning in the Warning Chain. No Warnings are logged by the CICS Resource Adapters, so null will always be returned.

Returns:
The first warning in the chain
Throws:
javax.resource.ResourceException

clearWarnings

public void clearWarnings()
clears any warnings Logged. The CICS Resource adapter has no warnings to Log, this method does nothing

Throws:
javax.resource.ResourceException

execute

public javax.resource.cci.Record execute(javax.resource.cci.InteractionSpec A,
                                         javax.resource.cci.Record B)
                                  throws ResourceException
this form of execute is not supported by the CICS Resource Adapters

Throws:
NotSupportedException
ResourceException

close

public void close()
           throws ResourceException
Close the Interaction and disable any further communication with CICS. If any outstanding SYNC_RECEIVE requests exist they will be cleaned up on close(). This may cause a delay on calling the close() method.

Throws:
ResourceException

execute

public boolean execute(InteractionSpec spec,
                       Record in,
                       Record out)
                throws ResourceException

In order to interact with CICS this method must be used to pass the definition of the call in an ECIInteractionSpec and the input and output Records that will carry the data used in the interaction.

All SYNC_SEND requests made through an ECIInteraction must be followed by a SYNC_RECEIVE request. Any attempts to make a SYNC_SEND or SYNC_SEND_RECEIVE directly after a SYNC_SEND will result in an Exception being thrown.

Parameters:
spec - An ECIInteractionSpec detailing the interaction to be made with CICS.
in - The input data
out - The output data
Returns:
Whether the call completed successfuly or not.
Throws:
ResourceException - Thrown if there was a problem during the interaction with CICS.

finalize

public void finalize()
Clean up any outstanding Async replies if necessary.