com.ibm.connector2.cics

Class ECIInteractionSpec

  • java.lang.Object
    • com.ibm.connector2.cics.ECIInteractionSpec
  • All Implemented Interfaces:
    java.io.Serializable, javax.resource.cci.InteractionSpec


    public final class ECIInteractionSpec
    extends java.lang.Object
    implements javax.resource.cci.InteractionSpec
    The ECIInteractionSpec class is used to define some details of the interaction with CICS, for example the COMMAREA length.
    • Field Summary

      • Fields inherited from interface javax.resource.cci.InteractionSpec

        SYNC_RECEIVE, SYNC_SEND, SYNC_SEND_RECEIVE
    • Constructor Summary

      Constructors 
      Constructor and Description
      ECIInteractionSpec()
      Default constructor.
      ECIInteractionSpec(int verb, java.lang.String prog)
      Simple constructor.
      ECIInteractionSpec(int verb, java.lang.String prog, int commLen)
      Complete constructor allows specification of all properties.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
      Add a listener to those that are informed when a bound property is changed.
      int getCommareaLength()
      Returns the COMMAREA length.
      java.lang.String getFunctionName()
      Returns the function name.
      int getInteractionVerb()
      Returns the interaction verb.
      java.lang.String getTPNName()
      Returns the transaction name TPNName.
      void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
      Remove a registered listener from the list.
      void setCommareaLength(int length)
      Sets the COMMAREA length.
      void setFunctionName(java.lang.String name)
      Sets the function name.
      void setInteractionVerb(int verb)
      Sets the interaction verb.
      void setTPNName(java.lang.String newTPNName)
      Sets the transaction name TPNName.
      java.lang.String toString()
      Provides a string representation of this object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ECIInteractionSpec

        public ECIInteractionSpec(int verb,
                          java.lang.String prog,
                          int commLen)
                           throws javax.resource.ResourceException
        Complete constructor allows specification of all properties.
        Parameters:
        verb - The interaction verb to use.
        prog - The name of the CICS program to call.
        commLen - The length of the COMMAREA being passed to CICS.
        Throws:
        javax.resource.ResourceException - If there is a problem creating the InteractionSpec.
      • ECIInteractionSpec

        public ECIInteractionSpec(int verb,
                          java.lang.String prog)
                           throws javax.resource.ResourceException
        Simple constructor. Allows definition of the interaction verb and the name of the CICS program to call.
        Parameters:
        verb - The interaction verb to use
        prog - The name of the CICS program to call
        Throws:
        javax.resource.ResourceException - If there is a problem creating the InteractionSpec.
      • ECIInteractionSpec

        public ECIInteractionSpec()
        Default constructor.
    • Method Detail

      • toString

        public java.lang.String toString()
        Provides a string representation of this object.
        Overrides:
        toString in class java.lang.Object
      • getInteractionVerb

        public int getInteractionVerb()
        Returns the interaction verb.

        The current interaction verb is SYNC_SEND, SYNC_RECEIVE or SYNC_SEND_RECEIVE.

        Returns:
        The current interaction verb
      • getFunctionName

        public java.lang.String getFunctionName()
        Returns the function name.

        When SYNC_SEND or SYNC_SEND_RECEIVE is specified in the interaction verb property, FunctionName needs to contain the name of the program to execute on CICS.

        Returns:
        The name of the program to execute on CICS.
      • getCommareaLength

        public int getCommareaLength()
        Returns the COMMAREA length.

        The length of the COMMAREA being passed to CICS inside your input record. If this is not supplied a default is used:

        • For SYNC_SEND and SYNC_SEND_RECEIVE, it is the length of the input record data
        • For SYNC_RECEIVE, it is the value of the reply length.

        Returns:
        The length of the COMMAREA
      • getTPNName

        public java.lang.String getTPNName()
        Returns the transaction name TPNName.

        This is the name of the CICS mirror transaction that the called program runs under.

        Returns:
        The current TPNName.
      • setInteractionVerb

        public void setInteractionVerb(int verb)
                                throws javax.resource.ResourceException
        Sets the interaction verb.

        The interaction verb values are SYNC_SEND, SYNC_RECEIVE and SYNC_SEND_RECEIVE.

        Parameters:
        verb - The interaction verb for the InteractionSpec.
        Throws:
        javax.resource.ResourceException - An incorrect interaction verb is specified.
      • setFunctionName

        public void setFunctionName(java.lang.String name)
        Sets the function name.

        When SYNC_SEND or SYNC_SEND_RECEIVE is specified in the interaction verb property, function name needs to contain the name of the program to execute on CICS.

        Parameters:
        name - The name of the program to execute on CICS.
      • setCommareaLength

        public void setCommareaLength(int length)
        Sets the COMMAREA length.

        The length of the COMMAREA being passed to CICS inside your input record. If this is not supplied a default is used:

        • For SYNC_SEND, SYNC_SEND_RECEIVE, this is the length of the input record data
        • For SYNC_RECEIVE, this is the value of the reply length.

        Application developers are advised to use a maximum size of 32500 bytes, as this is guaranteed to be flowed successfully across all protocols. COMMAREA sizes greater than this might generate an ECI_ERR_INVALID_DATA_LENGTH return code.

        Parameters:
        length - The length of the COMMAREA.
      • setTPNName

        public void setTPNName(java.lang.String newTPNName)
        Sets the transaction name TPNName.

        This is the name of the CICS mirror transaction that the called program runs under. This option is like the TRANSID option on an EXEC CICS LINK command. A transaction definition in CICS for this TRANSID must point to the DFHMIRS program. Setting the TPNName in the ECIInteractionSpec overrides any value set at deployment time, or on the ManagedConnectionFactory, if a non-managed environment.

        If the interaction is performed within a transaction scope, this field has a meaning only for the first interaction within the transaction. Subsequent interactions within the same transaction use the mirror transaction specified on the first interaction.

        Parameters:
        newTPNName - The name of the mirror transaction for the interaction.
      • addPropertyChangeListener

        public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
        Add a listener to those that are informed when a bound property is changed.
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
        Remove a registered listener from the list.