com.ibm.connectors

Interface RequestInteraction

  • All Known Implementing Classes:
    AbstractRequestInteraction


    public interface RequestInteraction
    Base interface for objects that send a request message to a remote system expecting a response message in return. There is a synchronous version which returns the response message directly, or an asynchronous version which will return a java long ticket as an interaction id, and notify the host application of the response via the ConnectorCallback interface which was used to initialise the owning RequestConnector.
    Note that this interface may be implemented by the RequestConnector itself if compressing the connector and interaction into one object makes sense for a particular provider.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT 
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      long asyncRequest(java.util.Properties overrideProperties, java.lang.Object data, ConnectorCallback callback)
      Send a request message asynchronously using the provided configuration properties which may augment or override the properties set on the connector.
      void initialise(RequestConnector connector)
      Initialise the interaction by passing in the owning connector
      java.lang.Object request(java.util.Properties overrideProperties, java.lang.Object data)
      Send a request message using the provided configuration properties which may augment or override the properties set on the connector.
      void terminate()
      Called to allow the interaction to close any resources it may have created.
    • Method Detail

      • request

        java.lang.Object request(java.util.Properties overrideProperties,
                                 java.lang.Object data)
                          throws ConnectorException
        Send a request message using the provided configuration properties which may augment or override the properties set on the connector. This allows the host application to dynamically set endpoint properties such as remote server or queue names, based on values provided by the currently executing process.
        Parameters:
        overrideProperties - the properties used to configure the sending operation
        data - the data to send
        Returns:
        the response data
        Throws:
        ConnectorException
      • asyncRequest

        long asyncRequest(java.util.Properties overrideProperties,
                          java.lang.Object data,
                          ConnectorCallback callback)
                   throws ConnectorException
        Send a request message asynchronously using the provided configuration properties which may augment or override the properties set on the connector. This allows the host application to dynamically set endpoint properties such as remote server or queue names, based on values provided by the currently executing process.
        Parameters:
        overrideProperties - the properties used to configure the sending operation
        data - the data to send
        Returns:
        a ticket number used to reconcile against the response sent asynchronously to the ConnectorCallback
        Throws:
        ConnectorException
IBM TM
CommonTM Connector API