com.ibm.broker.connector

Class TimeoutPollingResult



  • public class TimeoutPollingResult
    extends PollingResult
    NBTimeoutPollingResult is a class which is used to indicate the readData method has no data to return. A NBTimeoutPollingResult 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 NBTimeoutPollingResult 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

      • TimeoutPollingResult

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

        public TimeoutPollingResult(PollingInputConnector connector,
                                    long nextCallInterval)
                             throws com.ibm.broker.plugin.MbException
        Initializes a new instance of the NBTimeoutPollingResult" class that causes a pause before readData is called again. This constructor makes an NBTimeoutPollingResult 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 TimeoutPollingResult as there is no record to build.
        Specified by:
        buildInputRecord in class PollingResult
        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