com.ibm.connector2.ims.ico

Class IMSInteractionSpec

  • java.lang.Object
    • com.ibm.connector2.ims.ico.IMSInteractionSpec
  • All Implemented Interfaces:
    IMSInteractionSpecProperties, com.ibm.ims.ico.IMSICOProperties, java.io.Serializable


    public class IMSInteractionSpec
    extends java.lang.Object
    implements java.io.Serializable, IMSInteractionSpecProperties, com.ibm.ims.ico.IMSICOProperties
    An instance of this class contains properties that are used in an interaction with IMS via IMS Connect.
    See Also:
    com.ibm.connector2.ims.ico.IMSInteraction#execute(InteractionSpec, Record, Record), Serialized Form
    • Field Detail

      • propertyChange

        public transient java.beans.PropertyChangeSupport propertyChange
        IMS TM Resource Adapter internal use only.
    • Constructor Detail

      • IMSInteractionSpec

        public IMSInteractionSpec()
        The default constructor.
    • Method Detail

      • addPropertyChangeListener

        public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
        Adds a PropertyChangeListener for all the properties.
        Parameters:
        listener - The PropertyChangeListener to be added.
      • addPropertyChangeListener

        public void addPropertyChangeListener(java.lang.String propertyName,
                                     java.beans.PropertyChangeListener listener)
        Adds a PropertyChangeListener for a property.
        Parameters:
        listener - The PropertyChangeListener to be added.
        propertyName - The name of the property to listen on.
      • firePropertyChange

        public void firePropertyChange(java.beans.PropertyChangeEvent evt)
        Fires a PropertyChangeEvent to listeners.
        Parameters:
        evt - The PropertyChangeEvent object.
      • firePropertyChange

        public void firePropertyChange(java.lang.String propertyName,
                              int oldValue,
                              int newValue)
        Reports an int bound property update to any registered listeners.
        Parameters:
        propertyName - The name of the property that was changed.
        oldValue - The old value of the property.
        newValue - The new value of the property.
      • firePropertyChange

        public void firePropertyChange(java.lang.String propertyName,
                              java.lang.Object oldValue,
                              java.lang.Object newValue)
        Reports a String bound property update to any registered listeners.
        Parameters:
        propertyName - The name of the property that was changed.
        oldValue - The old value of the property.
        newValue - The new value of the property.
      • firePropertyChange

        public void firePropertyChange(java.lang.String propertyName,
                              boolean oldValue,
                              boolean newValue)
        Reports a boolean bound property update to any registered listeners.
        Parameters:
        propertyName - The name of the property that was changed.
        oldValue - The old value of the property.
        newValue - The new value of the property.
      • getAsyncOutputAvailable

        public final boolean getAsyncOutputAvailable()
        Returns the value of the asyncOutputAvailable property, indicating whether there are any asynchronous output messages available (true) or not (false).
        Returns:
        boolean - The value of the asyncOutputAvailable property.
      • getPurgeAsyncOutput

        public final boolean getPurgeAsyncOutput()
        Returns the value of the purgeAsyncOutput property, indicating whether IMS Connect will purge asynchronous output messages (true) or not (false).
        Returns:
        boolean - The value of the purgeAsyncOutput property.
      • getReRoute

        public final boolean getReRoute()
        Returns the value of the reRoute property, indicating whether asynchronous output will be rerouted to an alternate destination (true) or not (false).
        Returns:
        boolean - The value of the reRoute property.
      • getCommitMode

        public final int getCommitMode()
        Returns the value of the commitMode property.
        Returns:
        int - The value of the commitMode property.
        See Also:
        setCommitMode(int)
      • getConvEnded

        public final boolean getConvEnded()
        Returns the value of the convEnded property, indicating whether an IMS conversation has ended (true) or is still in progress (false).
        Returns:
        boolean - The value of the convEnded property.
      • getExecutionTimeout

        public final int getExecutionTimeout()
        Returns the value of the executionTimeout property.
        Returns:
        int - The value of the executionTimeout property.
        See Also:
        setExecutionTimeout(int)
      • getSocketTimeout

        public int getSocketTimeout()
        Returns the value of the socketTimeout property.
        Returns:
        int - The value of the socketTimeout property.
        See Also:
        setSocketTimeout(int)
      • getImsRequestType

        public final int getImsRequestType()
        Returns the value of the imsRequestType property.
        Returns:
        int - The value of the imsRequestType property.
        See Also:
        setImsRequestType(int)
      • getInteractionVerb

        public final int getInteractionVerb()
        Returns the value of the interactionVerb property.
        Returns:
        int - The value of the interactionVerb property.
        See Also:
        setInteractionVerb(int)
      • getInteractionVerbText

        public static java.lang.String getInteractionVerbText(int interactionVerb)
        Returns the String representation of the interactionVerb property.

        Note: This method is for IMS TM Resource Adapter internal use only.

        Parameters:
        interactionVerb - The value of the interactionVerb property.
        Returns:
        String - The String representation of the interactionVerb property.
      • getLtermName

        public final java.lang.String getLtermName()
        Returns the String representation of the ltermName property.
        Returns:
        String - The String representation of the ltermName property
        See Also:
        setLtermName(String)
      • getMapName

        public final java.lang.String getMapName()
        Returns the value of the mapName property, typically the name of an MFS Message Output Descriptor (MFS MOD). On output, the name of the MOD provided in the I/O PCB by the IMS application program is provided to the Java application by the getMapName method.

        Note: The mapName property should not be used by Java applications that use an enterprise service whose input and output messages are generated by WebSphere Studio's MFS support.

        Returns:
        String - The value of the mapName property; typically the name of an MFS MOD. Use of mapName is optional.
        See Also:
        setMapName(String)
      • getReRouteName

        public final java.lang.String getReRouteName()
        Returns the String representation of the reRouteName property.
        Returns:
        String - The String representation of the reRouteName property
        See Also:
        setReRouteName(String)
      • getAltClientID

        public final java.lang.String getAltClientID()
        Returns the String representation of the altClientID property.
        Returns:
        String - The String representation of the altClientID property
        See Also:
        setAltClientID(String)
      • getConvID

        public java.lang.String getConvID()
        Returns the byte array representation of the convID property.
        Returns:
        byte[] - The byte array representation of the convID property
        See Also:
        com.ibm.connector2.ims.ico.IMSInteractionSpec#setConvID(byte[])
      • getUseConvID

        public final boolean getUseConvID()
        Returns the value of the useConvID property, indicating whether an IMS conversation will be using the same connection for all the iterations (false) OR may be using any connection (shareable connection from the same connection pool) for all the iterations (true). If the value is "true" (client-managed conversation state programming model), then the client application needs to save the value of the conversation ID (convID) that gets generated at the end of the first iteration and pass it back-and-forth between the client application and IMS Connect in all the subsequent iterations of the conversation.
        Returns:
        boolean - The value of the useConvID property.
      • getPropertyChange

        public java.beans.PropertyChangeSupport getPropertyChange()
        Accessor for the propertyChange field.
      • hasListeners

        public boolean hasListeners(java.lang.String propertyName)
        Checks if there are any listeners for a specific property.
        Parameters:
        propertyName - The name of the property.
        Returns:
        boolean - true if there are one or more listeners for the given property, false otherwise.
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
        Removes a PropertyChangeListener from the listener list.
        Parameters:
        listener - The PropertyChangeListener to be removed.
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.lang.String propertyName,
                                        java.beans.PropertyChangeListener listener)
        Removes a PropertyChangeListener for a specific property.
        Parameters:
        propertyName - The name of the property that was listened on.
        listener - The PropertyChangeListener to be removed.
      • setAsyncOutputAvailable

        public void setAsyncOutputAvailable(boolean newAsyncOutputAvailable)
        Sets the value of the asyncOutputAvailable property. True indicates that there is an asynchronous output message available while false indicates that there is not. Note: This method is only used by IMS TM Resource Adapter.
        Parameters:
        newAsyncOutputAvailable - The new value for the asyncOutputAvailable the property.
      • setPurgeAsyncOutput

        public void setPurgeAsyncOutput(boolean newPurgeAsyncOutput)
        Sets the value of the purgeAsyncOutput property. True indicates that IMS Connect will purge asynchronous output while false indicates that it will not.
        Parameters:
        newPurgeAsyncOutput - The new value for the purgeAsyncOutput the property.
      • setReRoute

        public void setReRoute(boolean newReRoute)
        Sets the value of the reRoute property. True indicates that asynchronous output will be rerouted to an alternate destination while false indicates that it will not.
        Parameters:
        newReRoute - The new value for the reRoute the property.
      • setCommitMode

        public void setCommitMode(int newCommitMode)
                           throws javax.resource.ResourceException
        Sets the commitMode property to a specified value. This value defines the type of Commit Mode associated with the interaction with IMS via IMS Connect. Values supported are:

        SEND_THEN_COMMIT (value 1)
        IMS processes the transaction and sends a response back before committing the data.
        COMMIT_THEN_SEND (value 0)
        IMS processes the transaction and commits the data before sending a response.
        Parameters:
        newCommitMode - The new value for the commitMode property.
        Throws:
        javax.resource.ResourceException - If an invalid commitMode value is specified.
      • setConvEnded

        public void setConvEnded(boolean newConvEnded)
        Sets the value of the convEnded property. True indicates that the conversation has ended while false indicates that the conversation is still active.

        Note: This method is for IMS TM Resource Adapter use only. The convEnded property is an output-only property and should not be set, on input, by the application component.

        Parameters:
        newConvEnded - The new value for the convEnded the property.
      • setExecutionTimeout

        public void setExecutionTimeout(int newTimeout)
                                 throws javax.resource.ResourceException
        Sets the value of the executionTimeout property, which is the time it takes for IMS Connect to send an interaction to IMS and receive a response. It is converted into a value that is acceptable to IMS Connect.

        The executionTimeout value is represented in milliseconds and must be a decimal integer that is either -2, -1, 0, or between 1 and 3600000 (one hour), inclusively.

        • If the value is set to 0, the actual timeout value is determined by IMS Connect.
        • If the value is set to -1, the interaction will run without a time limit.
        • If the value is set to -2:
          • If the interaction type is SYNC_RECEIVE_CALLOUT, the callout request message is retrieved by using the OTMA RESUME TPIPE call with the SINGLE option and a timer of NOWAIT. If no callout request message exists on the OTMA hold queue, the IMS TM Resource Adapter does not wait for the callout request and immediately returns the control back to the Java application.
        Parameters:
        newTimeout - The new value for the executionTimeout property.
        Throws:
        javax.resource.ResourceException - If an invalid executionTimeout value is specified.
        javax.resource.NotSupportedException - If an executionTimeout value is specified that is valid for the architecture but not supported by IMS TM Resource Adapter, this derivative of ResourceException is thrown.
      • setSocketTimeout

        public void setSocketTimeout(int newSoTimeout)
                              throws javax.resource.ResourceException
        Sets the value of the socketTimeout property, which is the time IMS TM Resource Adapter will wait on behalf of the client, to receive a reply after sending a message to IMS Connect.
        Parameters:
        newSoTimeout - The new value for the socketTimeout property.
        Throws:
        javax.resource.ResourceException - If an invalid executionTimeout value is specified.
        javax.resource.spi.CommException - If socketTimeout has occurred for the interaction.
      • setImsRequestType

        public void setImsRequestType(int newImsRequestType)
                               throws javax.resource.ResourceException
        Sets the value of the imsRequestType property. This value defines the type of IMS request associated with the interaction with IMS via IMS Connect. Supported values are:

        IMS_REQUEST_TYPE_IMS_TRANSACTION (value 1)
        The request is an IMS transaction. Normal transaction output returned by IMS is used to populate the application's output message. If IMS returns a "DFS" message, the IMS resource adapter throws an IMSDFSMessageException. Value 1 is used for applications that are not generated using WebSphere Studio MFS support.
        IMS_REQUEST_TYPE_IMS_COMMAND (value 2)
        The request is an IMS command. Command output returned by IMS, including "DFS" messages, is used to populate the application's output message. The IMSDFSMessageException is not thrown. Value 2 is used for applications that submit IMS commands.
        IMS_REQUEST_TYPE_MFS_TRANSACTION (value 3)
        Value 3 is reserved for applications that are generated using WebSphere Studio MFS support. Normal transaction output returned by IMS, as well as "DFS" messages, are used to populate the application's output message. The IMSDFSMessageException is not thrown.
        Parameters:
        newImsRequestType - The new value for the imsRequestType property.
        Throws:
        javax.resource.ResourceException - If an invalid imsRequestType value is specified.
      • setInteractionVerb

        public void setInteractionVerb(int newVerb)
                                throws javax.resource.ResourceException
        Sets the value of the interactionVerb property. This value defines the mode of the interaction with IMS via IMS Connect. IMS TM Resource Adapter supports the following values:
        SYNC_SEND (value 0)
        Used to send a request to IMS when a response is not expected, in another words, perform a send only interaction. This interaction is also used to send callout responses (including error response messages) to IMS, because no further response is expected from IMS.
        SYNC_SEND_RECEIVE (value 1)
        Used for the single iteration of a non-conversational IMS transaction and for each iteration of a conversational IMS transaction.
        SYNC_END_CONVERSATION (value 3)
        Used to force the end of an IMS conversational transaction.
        SYNC_RECEIVE_ASYNCOUTPUT (value 4)
        Used to retrieve asynchronous output messages. With this type of interaction, the Java client can only receive a single message. If there are no messages in the IMS OTMA Asynchronous Queue for the clientID when the request is made, no further attempts are made to retrieve the message. No message is returned and a timeout will occur after the length of time specified in the executionTimeout property of the SYNC_RECEIVE_ASYNCOUTPUT interaction.
        SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_NOWAIT (value 5)
        Used to retrieve asynchronous output messages. With this type of interaction, the Java client can only receive a single message. If there are no messages in the IMS OTMA Asynchronous Queue for the clientID when the request is made, no further attempts are made to retrieve the message. No message is returned and a timeout will occur after the length of time specified in the executionTimeout property of the SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_NOWAIT interaction.
        SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_WAIT (value 6)
        Used to retrieve asynchronous output messages. With this type of interaction, the Java client can only receive a single message. If there are no messages in the IMS OTMA Asynchronous Queue for the clientID when the request is made, IMS Connect waits for OTMA to return a message. IMS Connect waits the length of time specified in the executionTimeout property of the SYNC_RECEIVE_ASYNCOUTPUT_SINGLE_WAIT interaction before returning an exception.
        SYNC_RECEIVE_CALLOUT (value 7)
        Used to retrieve synchronous and asynchronous callout requests from IMS. Use the calloutRequestType property to specify whether only synchronous, only asynchronous, or both synchronous and asynchronous callout messages are to be retrieved.

        With this type of interaction, the Java client can receive only a single message. If there are no messages in the IMS OTMA hold queue for the specified client ID (tpipe name) when the request is made, no further attempts are made to retrieve the message. No message is returned, and a timeout occurs after the length of time specified in the executionTimeout property passes.

        Note: SYNC_RECEIVE (value 2)is currently not supported.

        Parameters:
        newVerb - The new value for the interactionVerb property.
        Throws:
        javax.resource.ResourceException - If an invalid interactionVerb value is specified.
        javax.resource.NotSupportedException - If an interactionVerb value is specified that is valid for the architecture but not supported by IMS TM Resource Adapter, this derivative of ResourceException is thrown.
      • setLtermName

        public void setLtermName(java.lang.String newLtermName)
                          throws javax.resource.ResourceException
        Sets the value of the ltermName property. This value is used to override the value in the LTERM field of the IMS application program's I/O PCB, with the intent that the IMS application will make logic decisions based on the override value. See the IMS Connect User's Guide and Reference for a description of how the LTERM override is used.
        Parameters:
        newLtermName - The new value for the ltermName property. Use of ltermName is optional.
        Throws:
        javax.resource.ResourceException - If an invalid ltermName value is specified.
      • setMapName

        public void setMapName(java.lang.String newMapName)
                        throws javax.resource.ResourceException
        Sets the value of the mapName property, typically the name of an MFS Message Output Descriptor (MFS MOD). The MOD name will be provided to the IMS application program in the I/O PCB.

        Note: The mapName property should not be used by Java applications that use an enterprise serive whose input and output messages are generated by WebSphere Studio's MFS support.

        Parameters:
        newMapName - The new value for the mapName property; typically the name of an MFS MOD. Use of mapName is optional.
        Throws:
        javax.resource.ResourceException - If an invalid mapName value is specified.
        See Also:
        getMapName()
      • setReRouteName

        public void setReRouteName(java.lang.String newReRouteName)
                            throws javax.resource.ResourceException
        Sets the value of the reRouteName property. A reRouteName must be from 1-8 alphanumeric characters (A-Z, 0-9, @, #, $) and must not start with the prefix "HWS".
        Parameters:
        newReRouteName - The new value for the reRouteName property
        Throws:
        javax.resource.ResourceException - If an invalid reRouteName value is specified.
      • setAltClientID

        public void setAltClientID(java.lang.String newAltClientID)
                            throws javax.resource.ResourceException
        Sets the value of the altClientID property. An altClientID must be from 1-8 alphanumeric characters (A-Z, 0-9, @, #, $)
        Parameters:
        newAltClientID - The new value for the altClientID property
        Throws:
        javax.resource.ResourceException - If an invalid altClientID value is specified.
      • setConvID

        public void setConvID(java.lang.String newConvID)
                       throws javax.resource.ResourceException
        Sets the value of the convID property. Typically, in a conversational transaction the value of this property is not changed by the client application.
        Parameters:
        newConvID - The new value for the convID property.
        Throws:
        javax.resource.ResourceException
      • setUseConvID

        public void setUseConvID(boolean newUseConvID)
        Sets the value of the useConvID property. If the value is "true" (client-managed conversation state programming model), then the client application needs to save the value of the conversation ID (convID) that gets generated at the end of the first iteration and pass it back-and-forth between the client application and IMS Connect in all the subsequent iterations of the conversation.
        Parameters:
        newUseConvID - The new value for the useConvID property.
      • getSyncLevel

        public int getSyncLevel()
        Returns the value of the syncLevel property.
        Returns:
        int - The value of the syncLevel property.
        See Also:
        setSyncLevel(int)
      • setSyncLevel

        public void setSyncLevel(int newSyncLevel)
                          throws javax.resource.NotSupportedException
        Sets the value of the syncLevel property. An syncLevel is the synchronization level of the interaction between the IMS TM resource adapter and IMS OTMA. Valid synch level value for commit mode 0 interaction is 1 (CONFIRM). Valid synch level value for commit mode 1 interaction are 0 (NONE) and 1 (CONFIRM).

        The syncLevel property only applies for values SYNC_SEND_RECEIVE and SYNC_SEND of the interactionVerb property and is used in combination with the commitMode property.

        Parameters:
        newSyncLevel - The syncLevel to set.
        Throws:
        javax.resource.NotSupportedException
      • getIgnorePURGCall

        public boolean getIgnorePURGCall()
        Returns the value of the ignorePURGCall property.
        Returns:
        boolean - The value of the ignorePURGCall property.
        See Also:
        setIgnorePURGCall(boolean)
      • setIgnorePURGCall

        public void setIgnorePURGCall(boolean newIgnorePURGCall)
        Sets the value of the ignorePURGCall property. True indicates that the multiple ISRT and PURG calls in the IMS application for a commit mode 0 interaction should be ignored while false indicates that it will not.

        The flag is valid for SYNC_SEND and SYNC_SEND_RECEIVE interactions on shareable persistent socket connections and is applicable with commit mode 0. For commit mode 1, the PURG calls will always be ignored regardless of the value of this flag.

        Parameters:
        newIgnorePURGCall - The new value for the ignorePURGCall property.
      • getSyncCalloutCorrelatorToken

        public byte[] getSyncCalloutCorrelatorToken()
        Returns the correlation token that is generated by IMS Connect and attached to the synchronous callout request message. The correlation token is used to associate the synchronous callout request with the response. Applications that use the non-managed (client-managed) callout programming model must pass the correlation token with response messages to IMS Connect.
      • setSyncCalloutCorrelatorToken

        public void setSyncCalloutCorrelatorToken(byte[] token)
        Sets the correlation token that is generated by IMS Connect to associate the synchronous callout request with the response. Applications that use the non-managed (client-managed) callout programming model must pass the correlation token with response messages to IMS Connect.
      • getCalloutRequestType

        public int getCalloutRequestType()
        Returns the type of callout request messages the Java application is to retrieve.
      • setCalloutRequestType

        public void setCalloutRequestType(int requestType)
        Specifies the type of callout request messages the Java application is to retrieve. This property is valid only when the interaction verb is set to SYNC_RECEIVE_CALLOUT.

        Valid values are:

        • CALLOUT_REQUEST_ASYNC � Retrieve only asynchronous callout request messages
        • CALLOUT_REQUEST_BOTH - Retrieve both synchronous and asynchronous callout request messages
        • CALLOUT_REQUEST_SYNC - Retrieve only synchronous callout request messages
      • getSyncCalloutStatusCode

        public int getSyncCalloutStatusCode()
        Returns a user-specified status code when the Java application sends an error response message to the IMS application. The valid user-specified status code is from 500 to 1000.
      • setSyncCalloutStatusCode

        public void setSyncCalloutStatusCode(int statusCode)
                                      throws NotSupportedException
        Specifies a user-specified status code when the Java application sends an error response message to the IMS application. The valid user-specified status code is from 500 to 1000.
        Throws:
        NotSupportedException
      • setTransExpiration

        public void setTransExpiration(boolean newTransExpire)
        Sets the value of the transExpiration property. A value of true indicates to IMS OTMA that when the executionTimeout value is reached, the transaction expires and the client application no longer waits for the response. OTMA does not need to further process the request. The default is false, which indicates that OTMA should continue to process the transaction even after execution times out.
      • getTransExpiration

        public boolean getTransExpiration()
        Returns the value of the transExpiration property. A value of true indicates to IMS OTMA that when the executionTimeout value is reached, the transaction expires and the client application no longer waits for the response. OTMA does not need to further process the request. A value of false indicates that OTMA should continue to process the transaction even after execution times out.
        Returns:
        boolean - The value of the transExpiration property.
      • setCm0Response

        public void setCm0Response(boolean newCM0Response)
        Sets the value of the CM0Response property. A value of true indicates to IMS OTMA that when there is no response from the application that issues a CM0 transaction, OTMA should reutrn a DFS2082I message instead of a timeout message. The default is false.
        Parameters:
        newCM0Response - - The flag to indicate if OTMA should return a DFS2082I message for a CM0 application.
      • getCm0Response

        public boolean getCm0Response()
        Returns the value of the CM0Response property. A value of true indicates to IMS OTMA that when there is no response from the application that issues a CM0 transaction, OTMA should return a DFS2082I message instead of a timeout message.
        Returns:
        Returns CM0Response flag
      • getDataStoreName

        public java.lang.String getDataStoreName()
      • setDataStoreName

        public void setDataStoreName(java.lang.String dataStoreName)
      • setTrackingID

        public void setTrackingID(java.lang.String trackId)
        Set the value of the transaction tracking ID property.
        Parameters:
        String - The value to set transaction tracking ID to.
      • getTrackingID

        public java.lang.String getTrackingID()
        Get the transaction tracking ID
        Returns:
        String Value if successful
      • isTrackingEnable

        public boolean isTrackingEnable()
        Returns the value of the trackingEnable property, indicating if transaction tracking is enabled (true) or not (false).
        Returns:
        TRUE if transaction tracking is enable; FALSE, otherwise.
      • enableTracking

        public void enableTracking()
        Enables transaction tracking. By default, transaction tracking is disabled.
      • disableTracking

        public void disableTracking()
        Disables transaction tracking
(c) Copyright International Business Machines Corporation 2000, 2015