Class ECIInteractionSpec

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

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

  • Constructor Details

    • ECIInteractionSpec

      public ECIInteractionSpec(int verb, String prog, int timeout, int commLen, int repLen) throws jakarta.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:
      jakarta.resource.ResourceException - If there is a problem creating the InteractionSpec.
    • ECIInteractionSpec

      public ECIInteractionSpec(int verb, String prog, int commLen) throws jakarta.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:
      jakarta.resource.ResourceException - If there is a problem creating the InteractionSpec.
    • ECIInteractionSpec

      public ECIInteractionSpec(int verb, String prog) throws jakarta.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:
      jakarta.resource.ResourceException - If there is a problem creating the InteractionSpec.
    • ECIInteractionSpec

      public ECIInteractionSpec()
      Default constructor.
  • Method Details

    • toString

      public String toString()
      Provides a string representation of this object.
      Overrides:
      toString in class 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 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.
    • getExecuteTimeout

      public int getExecuteTimeout()
      Returns the execute timeout.

      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()
      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
    • getReplyLength

      public int getReplyLength()
      Returns the reply length.

      The length of the datastream to be returned back from the Gateway daemon to the JCA application. Setting the reply length 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 still receives 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 the reply length is not set, the CICS Transaction Gateway automatically strips 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 product documentation for details on null stripping.

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

      public String getTranName()
      Returns the transaction name 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.

      Returns:
      The tranName specified in the InteractionSpec.
    • getTPNName

      public 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.
    • getJWTToken

      public String getJWTToken()
      Returns the JWT Token jwtToken.

      This is the JWT Token used for the ECI Request.

      Returns:
      The current jwtToken.
    • setInteractionVerb

      public void setInteractionVerb(int verb) throws jakarta.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:
      jakarta.resource.ResourceException - An incorrect interaction verb is specified.
    • setFunctionName

      public void setFunctionName(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.
    • setExecuteTimeout

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

      Sets the execute timeout.

      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 is rounded down to the nearest second except for values less than one second which are set to 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:
      jakarta.resource.ResourceException - If a negative timeout value is specified.
    • 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.
    • setReplyLength

      public void setReplyLength(int length)
      Sets the reply length.

      The length of the data 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 still receives 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 the reply length is not set, the CICS Transaction Gateway automatically strips 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 product documentation for details on null stripping.

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

      public void setTranName(String newTranName)
      Sets the transaction name 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 overrides any value set at deployment time, or on the ManagedConnectionFactory, in a non-managed environment.Note that if both TranName and TPNName are specified, TPNName takes precedence.

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

      public void setTPNName(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.
    • setJWTToken

      public void setJWTToken(String jwtToken) throws jakarta.resource.ResourceException, NullPointerException
      Sets the JWT for ECI Request.

      This method will set the JWT for the ECI request.

      Parameters:
      jwtToken - JWT token Value.
      Throws:
      jakarta.resource.ResourceException
      NullPointerException
    • addPropertyChangeListener

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

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