com.ibm.j2ca.base
Class WBIInteraction

java.lang.Object
  extended bycom.ibm.j2ca.base.WBIInteraction
All Implemented Interfaces:
javax.resource.cci.Interaction

public abstract class WBIInteraction
extends java.lang.Object
implements javax.resource.cci.Interaction

Provides a light-weight foundation for an Interaction implementation.

A subclass should focus on the implementation of method execute(InteractionSpec,Record). Non-critical methods are implemented as no-ops in this class but can be freely overrided by a subclass if additional features, such as warnings, need to be provided.


Constructor Summary
WBIInteraction(WBIConnection conn)
           
 
Method Summary
 void clearWarnings()
          Clears any warnings associated with this Interaction instance.
 void close()
          Closes this Interaction instance and frees up any resources tied to it.
abstract  javax.resource.cci.Record execute(javax.resource.cci.InteractionSpec ispec, javax.resource.cci.Record inRecord)
          Performs an operation on the EIS according to the properties specified in the InteractionSpec provided.
 boolean execute(javax.resource.cci.InteractionSpec ispec, javax.resource.cci.Record inRecord, javax.resource.cci.Record outRecord)
          Not supported by standard WBI adapters.
 javax.resource.cci.Connection getConnection()
          Returns the connection associated with this Interaction instance.
 LogUtils getLogUtils()
           
 javax.resource.cci.ResourceWarning getWarnings()
          Returns the first warning in the chain of warnings associated with this Interaction instance or null if no warnings exist.
protected  void setLogUtils(LogUtils utils)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBIInteraction

public WBIInteraction(WBIConnection conn)
Method Detail

getConnection

public javax.resource.cci.Connection getConnection()
Returns the connection associated with this Interaction instance.

Specified by:
getConnection in interface javax.resource.cci.Interaction

close

public void close()
           throws javax.resource.ResourceException
Closes this Interaction instance and frees up any resources tied to it.

Specified by:
close in interface javax.resource.cci.Interaction
Throws:
javax.resource.ResourceException

execute

public boolean execute(javax.resource.cci.InteractionSpec ispec,
                       javax.resource.cci.Record inRecord,
                       javax.resource.cci.Record outRecord)
                throws javax.resource.ResourceException
Not supported by standard WBI adapters. Use execute(InteractionSpec,Record) instead.

Specified by:
execute in interface javax.resource.cci.Interaction
Throws:
javax.resource.ResourceException
See Also:
Interaction.execute(javax.resource.cci.InteractionSpec, javax.resource.cci.Record, javax.resource.cci.Record)

execute

public abstract javax.resource.cci.Record execute(javax.resource.cci.InteractionSpec ispec,
                                                  javax.resource.cci.Record inRecord)
                                           throws javax.resource.ResourceException
Performs an operation on the EIS according to the properties specified in the InteractionSpec provided. This form takes one record as input and returns another record to reflect the results of the operation.

A subclass should provide an EIS-specific implementation of this method.

Specified by:
execute in interface javax.resource.cci.Interaction
Throws:
javax.resource.ResourceException - if the operation fails

getWarnings

public javax.resource.cci.ResourceWarning getWarnings()
                                               throws javax.resource.ResourceException
Returns the first warning in the chain of warnings associated with this Interaction instance or null if no warnings exist.

Specified by:
getWarnings in interface javax.resource.cci.Interaction
Throws:
javax.resource.ResourceException
See Also:
Interaction.getWarnings()

clearWarnings

public void clearWarnings()
                   throws javax.resource.ResourceException
Clears any warnings associated with this Interaction instance.

Specified by:
clearWarnings in interface javax.resource.cci.Interaction
Throws:
javax.resource.ResourceException
See Also:
Interaction.clearWarnings()

getLogUtils

public LogUtils getLogUtils()

setLogUtils

protected void setLogUtils(LogUtils utils)