com.ibm.connector2.hod
Class J2HODInteraction

java.lang.Object
  |
  +--com.ibm.connector2.hod.J2HODInteraction
All Implemented Interfaces:
javax.resource.cci.Interaction

public final class J2HODInteraction
extends java.lang.Object
implements javax.resource.cci.Interaction

This class enables a component to execute EIS functions. An Interaction instance supports the following ways of interacting with an EIS instance:


Method Summary
 void clearWarnings()
          Clears all the warnings reported by this Interaction instance.
 void close()
          Closes the current Interaction and release all the resources held for this instance by the resource adapter.
 javax.resource.cci.Record execute(javax.resource.cci.InteractionSpec ispec, javax.resource.cci.Record input)
          Executes an interaction represented by the InteractionSpec.
 boolean execute(javax.resource.cci.InteractionSpec ispec, javax.resource.cci.Record input, javax.resource.cci.Record output)
          Executes an interaction represented by the InteractionSpec.
 javax.resource.cci.Connection getConnection()
          Gets the Connection associated with the Interaction.
 javax.resource.cci.ResourceWarning getWarnings()
          Gets the first Resource Warning from the chain of warnings associated with this Interaction instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clearWarnings

public void clearWarnings()
                   throws javax.resource.ResourceException
Clears all the warnings reported by this Interaction instance. After calling this method, the method getWarnings() will return null until a new warning is reported for this Interaction.
Specified by:
clearWarnings in interface javax.resource.cci.Interaction
Throws:
javax.resource.ResourceException - - Failed to clear Resource Warnings associated with Interaction

close

public void close()
           throws javax.resource.ResourceException
Closes the current Interaction and release all the resources held for this instance by the resource adapter. The close of an Interaction instance does not close the associated Connection instance.
Specified by:
close in interface javax.resource.cci.Interaction

execute

public javax.resource.cci.Record execute(javax.resource.cci.InteractionSpec ispec,
                                         javax.resource.cci.Record input)
                                  throws javax.resource.ResourceException
Executes an interaction represented by the InteractionSpec. This form of invocation takes an input Record and returns an output Record if the execution of the Interaction has been successfull.
Specified by:
execute in interface javax.resource.cci.Interaction
Parameters:
ispec - InteractionSpec - InteractionSpec representing a target EIS data/function module
input - Record - Input Record
Returns:
Record - Returns output record if execution of the EIS function has been successful; null otherwise
Throws:
javax.resource.ResourceException - Exception if execute operation fails

execute

public boolean execute(javax.resource.cci.InteractionSpec ispec,
                       javax.resource.cci.Record input,
                       javax.resource.cci.Record output)
                throws javax.resource.ResourceException
Executes an interaction represented by the InteractionSpec. This form of invocation takes an input Record and updates the output Record.
Specified by:
execute in interface javax.resource.cci.Interaction
Parameters:
ispec - InteractionSpec - InteractionSpec representing a target EIS data/function module
input - Record - Input Record
output - Record - Output Record
Returns:
boolean - true if execution of the EIS function has been successful and output Record has been updated; false otherwise

getConnection

public javax.resource.cci.Connection getConnection()
Gets the Connection associated with the Interaction.
Specified by:
getConnection in interface javax.resource.cci.Interaction

getWarnings

public javax.resource.cci.ResourceWarning getWarnings()
                                               throws javax.resource.ResourceException
Gets the first Resource Warning from the chain of warnings associated with this Interaction instance.
Specified by:
getWarnings in interface javax.resource.cci.Interaction
Returns:
ResourceWarning - Resource Warning at top of the warning chain
Throws:
javax.resource.ResourceException - - Failed to get Resource Warnings associated with Interaction