com.ibm.broker.connector

Class TimeoutResponseRecord



  • public class TimeoutResponseRecord
    extends ResponseRecord
    NBTimeoutResponseRecord is a class which is used to indicate the readData method has no data to return. A NBTimeoutResponseRecord with the single argument constructor is returned when the readData method has already waited for data inside the method itself, so the system should call readData again immediately. A NBTimeoutResponseRecord with the two argument constructor is returned when the readData method was not able to wait for data inside the method itself, so the system should call ReadData again after a delay of the given nextCallInterval duration. If required, a greater duration can be returned by the two argument constructor than the original timeout interval. This allows the implementation of a batch-oriented approach, where the readData method is only called, for example, once per hour or once per day.
    • Constructor Detail

      • TimeoutResponseRecord

        public TimeoutResponseRecord(RequestConnector connector)
                              throws com.ibm.broker.plugin.MbException
        Initializes a new instance of the NBTimeoutResponseRecord" class with no further waiting required. This constructor makes an NBTimeoutResponseRecord that will cause the readData to be called again immediately.
        Parameters:
        connector - The owning connector.
        Throws:
        com.ibm.broker.plugin.MbException
      • TimeoutResponseRecord

        public TimeoutResponseRecord(RequestConnector connector,
                                     long nextCallInterval)
                              throws com.ibm.broker.plugin.MbException
        Initializes a new instance of the NBTimeoutResponseRecord" class that causes a pause before readData is called again. This constructor makes an NBTimeoutResponseRecord that will introduce a defined wait before the readData is called again.
        Parameters:
        connector - The owning connector.
        nextCallInterval - The duration that will pass before readData is called again.
        Throws:
        com.ibm.broker.plugin.MbException
    • Method Detail

      • buildInputRecord

        public InputRecord buildInputRecord()
                                     throws com.ibm.broker.plugin.MbException
        Returns null for an TimeoutResponseRecord as there is no record to build.
        Specified by:
        buildInputRecord in class ResponseRecord
        Returns:
        A null InputRecord.
        Throws:
        com.ibm.broker.plugin.MbException
      • getNextCallInterval

        public long getNextCallInterval()
        Returns:
        Returns the wait interval before the ReadData method is called again. A TimeSpan of 0 is the default and means no wait is required.
IBM Integration BusTM
JavaTM Connector API