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 constructor
      SampleInteraction(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 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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 interface javax.resource.cci.Interaction
        Returns:
        The javax.resource.cci.Connection.
      • close

        public void close()
                   throws javax.resource.ResourceException
        Close the connection
        Specified by:
        close in interface javax.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 invoke execute(interaction, record, null) method.
        Specified by:
        execute in interface javax.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 interface javax.resource.cci.Interaction
        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.
      • getWarnings

        public javax.resource.cci.ResourceWarning getWarnings()
                                                       throws javax.resource.ResourceException
        Gets warnings.
        Specified by:
        getWarnings in interface javax.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 interface javax.resource.cci.Interaction
        Throws:
        javax.resource.ResourceException