com.ibm.commerce.messaging.adapters.jcasample
Class SampleInteraction

java.lang.Object
  |
  +--com.ibm.commerce.messaging.adapters.jcasample.SampleInteraction

public class SampleInteraction
extends java.lang.Object

This class is invoked by SampleConnection.createInteraction() method. Once an interaction has been executed, the input message will be printed to standard output.


Field Summary
static java.lang.String COPYRIGHT
          Copyright statement.
 
Constructor Summary
SampleInteraction()
          SampleInteraction default constructor
SampleInteraction(Connection con)
          SampleInteraction constructor
 
Method Summary
 void clearWarnings()
          Clears warnings.
 void close()
          Close the connection
 Record execute(InteractionSpec interaction, Record record)
          Executes the interaction.
 boolean execute(InteractionSpec interaction, Record in, Record out)
          Executes the interaction.
 Connection getConnection()
          Gets the connection
 ResourceWarning getWarnings()
          Gets warnings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
Copyright statement.
See Also:
Constant Field Values
Constructor Detail

SampleInteraction

public SampleInteraction()
                  throws ResourceException
SampleInteraction default constructor
Throws:
ResourceException - Raised for any connector's exception.

SampleInteraction

public SampleInteraction(Connection con)
                  throws ResourceException
SampleInteraction constructor
Parameters:
con - The javax.resource.cci.Connection
Throws:
ResourceException - Raised by any connector's exception.
Method Detail

getConnection

public Connection getConnection()
Gets the connection
Returns:
The javax.resource.cci.Connection.

close

public void close()
           throws ResourceException
Close the connection
Throws:
javax.resource.ResourceException - Raised when close connection failed.
ResourceException

execute

public Record execute(InteractionSpec interaction,
                      Record record)
               throws ResourceException
Executes the interaction. This method will invoke execute(interaction, record, null) method.
Parameters:
interaction - The javax.resource.cci.InteractionSpec.
record - The input javax.resource.cci.Record.
Returns:
Always null. Nothing to return in this implementation.
Throws:
javax.resource.ResourceException - Raised when any error occured.
ResourceException

execute

public boolean execute(InteractionSpec interaction,
                       Record in,
                       Record out)
                throws ResourceException
Executes the interaction. The input message will be printed out.
Parameters:
interaction - The javax.resource.cci.InteractionSpec.
in - The input javax.resource.cci.Record
out - The output javax.resource.cci.Record
Returns:
Always true.
Throws:
javax.resource.ResourceException - Raised when any error occured.
ResourceException

getWarnings

public ResourceWarning getWarnings()
                            throws ResourceException
Gets warnings.
Returns:
Always null. This method does nothing in current implementation.
Throws:
javax.resource.Resource.Exception
ResourceException

clearWarnings

public void clearWarnings()
                   throws ResourceException
Clears warnings. This method does nothing in current implementation.
Throws:
javax.resource.ResourceException
ResourceException