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, including the COMMAREA length and execute timeout.
    • 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 timeout, int commLen, int repLen)
      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()
      Accessor for commareaLength.
      int getExecuteTimeout()
      Accessor for executeTimeout.
      java.lang.String getFunctionName()
      Accessor for function name.
      int getInteractionVerb()
      Accessor for interaction verb.
      int getReplyLength()
      Accessor for replyLength.
      java.lang.String getTPNName()
      Accessor for TPNName.
      java.lang.String getTranName()
      Accessor for tranName.
      void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
      Remove a registered listener from the list.
      void setCommareaLength(int length)
      Setter for commareaLength.
      void setExecuteTimeout(int time)
      Setter for executeTimeout.
      void setFunctionName(java.lang.String name)
      Setter for function name.
      void setInteractionVerb(int verb)
      Setter for interaction verb.
      void setReplyLength(int length)
      Setter for replyLength.
      void setTPNName(java.lang.String newTPNName)
      Setter for TPNName.
      void setTranName(java.lang.String newTranName)
      Setter for tranName.
      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 timeout,
                          int commLen,
                          int repLen)
                           throws javax.resource.ResourceException
        Complete constructor allows specification of all properties.

        Note: The value specified for timeout will be rounded down to the nearest second except for values less than one second which will have a timeout of one second. A value less than or equal to zero will result in no timeout.

        Parameters:
        verb - The interaction verb to use.
        prog - The name of the CICS program to call.
        timeout - The interaction timeout value in milliseconds.
        commLen - The length of the COMMAREA being passed to CICS.
        repLen - The length of reply wanted from 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 program name and interaction verb. The timeout defaults to none and the COMMAREA length and replyLength are not used.
        Parameters:
        verb - The InteractionVerb 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()
        Accessor for interaction verb.

        The current interaction verb e.g. SYNC_SEND, SYNC_RECEIVE or SYNC_SEND_RECEIVE constants as defined on the ECIInteractionSpec.

        Returns:
        The current interaction verb
      • getFunctionName

        public java.lang.String getFunctionName()
        Accessor for 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.
      • getExecuteTimeout

        public int getExecuteTimeout()
        Accessor for executeTimeout.

        This property holds the timeout value for interactions with CICS. Possible values include:

        • 0 No timeout. This is the default value.
        • A positive integer - time in milliseconds.

        ExecuteTimeout is not used on the z/OS operating system with the EXCI protocol.

        Returns:
        The timeout in milliseconds.
      • getCommareaLength

        public int getCommareaLength()
        Accessor for commareaLength.

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

        • SYNC_SEND, SYNC_SEND_RECEIVE -> Length of input record data
        • SYNC_RECEIVE -> The value of ReplyLength.

        Returns:
        The length of the COMMAREA
      • getReplyLength

        public int getReplyLength()
        Accessor for replyLength.

        The length of the datastream to be returned back from the Gateway daemon to the JCA application. Setting the replyLength property can reduce the data transmitted over the network if the data returned by CICS is less than the full COMMAREA size, and you know the size of the data in advance. The JCA application will still receive a full COMMAREA of the size specified in commareaLength; only the amount of data sent over the network is reduced. This method is equivalent to the getCommareaInboundLength() method available for the ECIRequest class.

        If replyLength is not set, the CICS Transaction Gateway will automatically strip trailing null characters from the COMMAREA sent from the Gateway daemon to the JCA application, without needing to know the size of the data in advance. See the CICS Transaction Gateway Information Center for details on null stripping.

        Returns:
        The reply length. Returns -1 if a reply length has not been set.
      • getTranName

        public java.lang.String getTranName()
        Accessor for tranName.

        The called program runs under the default mirror transaction, but is linked to under the tranName transaction name. This name is available to the called program in the exec interface block (EIB) for querying the transaction ID. Setting the tranName in the ECIInteractionSpec will override the value as set at deployment (or on the ManagedConnectionFactory, if non-managed).

        Returns:
        The tranName specified in the InteractionSpec.
        Since:
        5.0.1
      • getTPNName

        public java.lang.String getTPNName()
        Accessor for TPNName.

        This is the name of the CICS mirror transaction that the called program will run 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. Note that TPNName takes precedence if both TranName and TPNName are specified. Setting the TPNName in the ECIInteractionSpec will override the value as set at deployment (or on the ManagedConnectionFactory, if non-managed).

        Returns:
        The current TPNName.
        Since:
        5.0.1
      • setInteractionVerb

        public void setInteractionVerb(int verb)
                                throws javax.resource.ResourceException
        Setter for interaction verb.

        The current interaction verb e.g. SYNC_SEND, SYNC_RECEIVE or SYNC_SEND_RECEIVE constants as defined on the ECIInteractionSpec.

        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)
        Setter for 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.
      • setExecuteTimeout

        public void setExecuteTimeout(int time)
                               throws javax.resource.ResourceException

        Setter for executeTimeout.

        This property holds the timeout value for interactions with CICS. Possible values include:

        • 0 No timeout. This is the default value.
        • A positive integer - Time in milliseconds.

        The value specified will be rounded down to the nearest second except for values less than one second which will have a timeout of one second.

        ExecuteTimeout is not used on the z/OS operating system with the EXCI protocol.

        Parameters:
        time - The timeout for the interaction with CICS.
        Throws:
        javax.resource.ResourceException - If a negative timeout value is specified.
      • setCommareaLength

        public void setCommareaLength(int length)
        Setter for commareaLength.

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

        • SYNC_SEND, SYNC_SEND_RECEIVE -> Length of input record data
        • SYNC_RECEIVE -> The value of ReplyLength.

        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 may generate an ECI_ERR_INVALID_DATA_LENGTH return code.

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

        public void setReplyLength(int length)
        Setter for replyLength.

        The length of the datastream to be returned back from the Gateway daemon to the JCA application. Use of this method can reduce the data transmitted over the network if the data returned by CICS is less than the full COMMAREA size, and you know the size of the data in advance. The JCA application will still receive a full COMMAREA of the size specified in commareaLength; only the amount of data sent over the network is reduced. This method is equivalent to the setCommareaInboundLength() method available for the ECIRequest class.

        If setReplyLength is not set, the CICS Transaction Gateway will automatically strip trailing null characters from the COMMAREA sent from the Gateway daemon to the JCA application, without needing to know the size of the data in advance. See the CICS Transaction Gateway Information Center for details on null stripping.

        Parameters:
        length - The length of the returned COMMAREA.
      • setTranName

        public void setTranName(java.lang.String newTranName)
        Setter for tranName.

        The called program runs under the default mirror transaction, but is linked to under the tranName transaction name. This name is available to the called program in the exec interface block (EIB) for querying the transaction ID. Setting the tranName in the ECIInteractionSpec will override the value as set at deployment (or on the ManagedConnectionFactory, if non-managed).

        Parameters:
        newTranName - The tranName for the interaction.
        Since:
        5.0.1
      • setTPNName

        public void setTPNName(java.lang.String newTPNName)
        Setter for TPNName.

        This is the name of the CICS mirror transaction that the called program will run 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. Note that TPNName takes precedence if both TranName and TPNName are specified. Setting the TPNName in the ECIInteractionSpec will override the value as set at deployment (or on the ManagedConnectionFactory, if non-managed).

        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 transacation will use the mirror transaction specified on the first interaction.

        Parameters:
        newTPNName - The name of the mirror transaction for the interaction.
        Since:
        5.0.1
      • 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.
©Copyright IBM Corp. 1994, 2013
Legal