java.lang.Object com.ibm.broker.plugin.MbNode com.ibm.broker.plugin.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.
Field | Description |
---|---|
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. |
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. |
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. |
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. |
TIMEOUT | This should be returned by the run method rather than to wait for message data for a prolonged period. |
Constructor | Description |
---|---|
MbInputNode() | Default constructor |
Method | Description |
---|---|
MbMessage createMessage(byte[]) | Creates a new MbMessage object based on the input bit stream stored in a byte array. |
boolean dispatchThread() | Dispatches a new message flow thread in order to invoke another thread instance to run the message flow user-defined input node. |
public static final int FAILURE_CONTINUEThis 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.
public static final int FAILURE_RETURNThis 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.
public static final int SUCCESS_CONTINUEThis 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.
public static final int SUCCESS_RETURNThis 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.
public static final int TIMEOUTThis should be returned by the run method rather than to wait for message data for a prolonged period.
public MbInputNode() throws MbExceptionDefault constructor
public MbMessage createMessage(byte[] source) throws MbExceptionCreates 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
public boolean dispatchThread() throws MbExceptionDispatches 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