com.ibm.commerce.messaging.adapters.jcasample
Class SampleInteraction
- java.lang.Object
-
- com.ibm.commerce.messaging.adapters.jcasample.SampleInteraction
-
- All Implemented Interfaces:
- javax.resource.cci.Interaction
public class SampleInteraction extends java.lang.Object implements javax.resource.cci.Interaction
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
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
Copyright statement.
-
Constructor Summary
Constructors Constructor and Description SampleInteraction()
SampleInteraction default constructorSampleInteraction(javax.resource.cci.Connection con)
SampleInteraction constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
clearWarnings()
Clears warnings.void
close()
Close the connectionjavax.resource.cci.Record
execute(javax.resource.cci.InteractionSpec interaction, javax.resource.cci.Record record)
Executes the interaction.boolean
execute(javax.resource.cci.InteractionSpec interaction, javax.resource.cci.Record in, javax.resource.cci.Record out)
Executes the interaction.javax.resource.cci.Connection
getConnection()
Gets the connectionjavax.resource.cci.ResourceWarning
getWarnings()
Gets warnings.
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
Copyright statement.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SampleInteraction
public SampleInteraction() throws javax.resource.ResourceException
SampleInteraction default constructor- Throws:
javax.resource.ResourceException
- Raised for any connector's exception.
-
SampleInteraction
public SampleInteraction(javax.resource.cci.Connection con) throws javax.resource.ResourceException
SampleInteraction constructor- Parameters:
con
- The javax.resource.cci.Connection- Throws:
javax.resource.ResourceException
- Raised by any connector's exception.
-
-
Method Detail
-
getConnection
public javax.resource.cci.Connection getConnection()
Gets the connection- Specified by:
getConnection
in interfacejavax.resource.cci.Interaction
- Returns:
- The javax.resource.cci.Connection.
-
close
public void close() throws javax.resource.ResourceException
Close the connection- Specified by:
close
in interfacejavax.resource.cci.Interaction
- Throws:
javax.resource.ResourceException
- Raised when close connection failed.
-
execute
public javax.resource.cci.Record execute(javax.resource.cci.InteractionSpec interaction, javax.resource.cci.Record record) throws javax.resource.ResourceException
Executes the interaction. This method will invokeexecute(interaction, record, null)
method.- Specified by:
execute
in interfacejavax.resource.cci.Interaction
- 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.
-
execute
public boolean execute(javax.resource.cci.InteractionSpec interaction, javax.resource.cci.Record in, javax.resource.cci.Record out) throws javax.resource.ResourceException
Executes the interaction. The input message will be printed out.- Specified by:
execute
in interfacejavax.resource.cci.Interaction
- Parameters:
interaction
- The javax.resource.cci.InteractionSpec.in
- The input javax.resource.cci.Recordout
- The output javax.resource.cci.Record- Returns:
- Always true.
- Throws:
javax.resource.ResourceException
- Raised when any error occured.
-
getWarnings
public javax.resource.cci.ResourceWarning getWarnings() throws javax.resource.ResourceException
Gets warnings.- Specified by:
getWarnings
in interfacejavax.resource.cci.Interaction
- Returns:
- Always null. This method does nothing in current implementation.
- Throws:
javax.resource.Resource.Exception
javax.resource.ResourceException
-
clearWarnings
public void clearWarnings() throws javax.resource.ResourceException
Clears warnings. This method does nothing in current implementation.- Specified by:
clearWarnings
in interfacejavax.resource.cci.Interaction
- Throws:
javax.resource.ResourceException
-
-