com.ibm.broker.plugin

Class MbInputNode



  • public class MbInputNode
    extends MbNode
    MbInputNode provides utility methods allowing a user-defined input node to interact with the broker. The skeleton code for a user-defined input node is shown on the MbInputNodeInterface page.

    MbInputNode extends MbNode and provides extra methods relevant to input node functionality.

    See Also:
    MbInputNodeInterface
    • Field Detail

      • TIMEOUT

        public static final int TIMEOUT
        This should be returned by the run() method rather than to wait for message data for a prolonged period.
        See Also:
        Constant Field Values
      • SUCCESS_CONTINUE

        public static final int SUCCESS_CONTINUE
        This should be returned by the run() method to indicate that the current transaction should be committed and the same thread to call the run method again.
        See Also:
        Constant Field Values
      • SUCCESS_RETURN

        public static final int SUCCESS_RETURN
        This should be returned by the run() method to indicate that the current transaction should be committed and the thread to be returned to the thread pool.
        See Also:
        Constant Field Values
      • FAILURE_CONTINUE

        public static final int FAILURE_CONTINUE
        This should be returned by the run() method to indicate that the current transaction should be rolled back and the same thread to call the run method again.
        See Also:
        Constant Field Values
      • FAILURE_RETURN

        public static final int FAILURE_RETURN
        This should be returned by the run() method to indicate that the current transaction should be rolled back and the thread to be returned to the thread pool.
        See Also:
        Constant Field Values
    • Method Detail

      • dispatchThread

        public boolean dispatchThread()
                               throws MbException
        Dispatches a new message flow thread in order to invoke another thread instance to run the message flow user-defined input node. This message flow thread is allocated from a pool of threads maintained for each message flow, under control of the 'Additional Instances' property of the message flow.
        Returns:
        true if a thread was successfully dispatched, false otherwise.
        Throws:
        MbException
      • createMessage

        public MbMessage createMessage(byte[] source)
                                throws MbException
        Creates a new MbMessage object based on the input bit stream stored in a byte array. The parser associated with this message is held in the default attribute 'firstParserClassName'.
        Parameters:
        source - An array of bytes containing the input bit stream.
        Throws:
        MbException
IBM Integration BusTM
JavaTM Plugin Node API