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.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COPYRIGHT
Copyright statement.
|
| Constructor and Description |
|---|
SampleInteraction()
SampleInteraction default constructor
|
SampleInteraction(javax.resource.cci.Connection con)
SampleInteraction constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearWarnings()
Clears warnings.
|
void |
close()
Close the connection
|
javax.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 connection
|
javax.resource.cci.ResourceWarning |
getWarnings()
Gets warnings.
|
public static final java.lang.String COPYRIGHT
public SampleInteraction()
throws javax.resource.ResourceException
javax.resource.ResourceException - Raised for any connector's exception.public SampleInteraction(javax.resource.cci.Connection con)
throws javax.resource.ResourceException
con - The javax.resource.cci.Connectionjavax.resource.ResourceException - Raised by any connector's exception.public javax.resource.cci.Connection getConnection()
getConnection in interface javax.resource.cci.Interactionpublic void close()
throws javax.resource.ResourceException
close in interface javax.resource.cci.Interactionjavax.resource.ResourceException - Raised when close connection failed.public javax.resource.cci.Record execute(javax.resource.cci.InteractionSpec interaction,
javax.resource.cci.Record record)
throws javax.resource.ResourceException
execute(interaction, record, null) method.execute in interface javax.resource.cci.Interactioninteraction - The javax.resource.cci.InteractionSpec.record - The input javax.resource.cci.Record.javax.resource.ResourceException - Raised when any error occured.public boolean execute(javax.resource.cci.InteractionSpec interaction,
javax.resource.cci.Record in,
javax.resource.cci.Record out)
throws javax.resource.ResourceException
execute in interface javax.resource.cci.Interactioninteraction - The javax.resource.cci.InteractionSpec.in - The input javax.resource.cci.Recordout - The output javax.resource.cci.Recordjavax.resource.ResourceException - Raised when any error occured.public javax.resource.cci.ResourceWarning getWarnings()
throws javax.resource.ResourceException
getWarnings in interface javax.resource.cci.Interactionjavax.resource.Resource.Exceptionjavax.resource.ResourceExceptionpublic void clearWarnings()
throws javax.resource.ResourceException
clearWarnings in interface javax.resource.cci.Interactionjavax.resource.ResourceException