javax.resource.cci
Interface Interaction


public interface Interaction

The Interaction enables a component to execute functions on the underlying resource. An object implementing the Interaction interface supports two execute() methods for interacting with the underlying resource. An Interaction is created from a Connection and maintains an association with the Connection for its entire lifetime.


Method Summary
 void clearWarnings()
          Clears all warnings reported by this Interaction.
 void close()
          Closes an interaction
 Record (src) execute(InteractionSpec (src)  spec, Record (src)  input)
          Executes the interaction specified by the InteractionSpec with the specified input.
 boolean execute(InteractionSpec (src)  spec, Record (src)  input, Record (src)  output)
          Executes the interaction specified by the InteractionSpec with the specified input.
 Connection (src) getConnection()
          Gets the connection associated with this interaction.
 ResourceWarning (src) getWarnings()
          Gets the first warning for this interaction.
 

Method Detail

clearWarnings

public void clearWarnings()
                   throws ResourceException (src) 
Clears all warnings reported by this Interaction.

Throws:
ResourceException (src) - Thrown if operation fails.

close

public void close()
           throws ResourceException (src) 
Closes an interaction

Throws:
ResourceException (src) - Thrown if operation fails.

execute

public Record (src)  execute(InteractionSpec (src)  spec,
                      Record (src)  input)
               throws ResourceException (src) 
Executes the interaction specified by the InteractionSpec with the specified input.

Parameters:
spec - Represents the target function on the underlying resource.
input - Input Record @returns Record Output if successful, null if not.
Throws:
ResourceException (src) - Thrown if Interaction fails.

execute

public boolean execute(InteractionSpec (src)  spec,
                       Record (src)  input,
                       Record (src)  output)
                throws ResourceException (src) 
Executes the interaction specified by the InteractionSpec with the specified input.

Parameters:
spec - Represents the target function on the underlying resource.
input - Input Record
output - Output record @returns boolean True if successful, false if not
Throws:
ResourceException (src) - Thrown if Interaction fails.

getConnection

public Connection (src)  getConnection()
Gets the connection associated with this interaction.


getWarnings

public ResourceWarning (src)  getWarnings()
                            throws ResourceException (src) 
Gets the first warning for this interaction. @returns ResourceWarning First warning.

Throws:
ResourceException (src) - Thrown if operation fails.