com.ibm.broker.plugin
Class MbInputNode
- 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 theMbInputNodeInterfacepage.MbInputNode extends MbNode and provides extra methods relevant to input node functionality.
- See Also:
MbInputNodeInterface
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.ibm.broker.plugin.MbNode
MbNode.JDBC_TransactionType
-
-
Field Summary
Fields Modifier and Type Field and Description static intFAILURE_CONTINUEThis should be returned by therun()method to indicate that the current transaction should be rolled back and the same thread to call therunmethod again.static intFAILURE_RETURNThis should be returned by therun()method to indicate that the current transaction should be rolled back and the thread to be returned to the thread pool.static intSUCCESS_CONTINUEThis should be returned by therun()method to indicate that the current transaction should be committed and the same thread to call therunmethod again.static intSUCCESS_RETURNThis should be returned by therun()method to indicate that the current transaction should be committed and the thread to be returned to the thread pool.static intTIMEOUTThis should be returned by therun()method rather than to wait for message data for a prolonged period.
-
Constructor Summary
Constructors Constructor and Description MbInputNode()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description MbMessagecreateMessage(byte[] source)Creates a new MbMessage object based on the input bit stream stored in a byte array.booleandispatchThread()Dispatches a new message flow thread in order to invoke another thread instance to run the message flow user-defined input node.-
Methods inherited from class com.ibm.broker.plugin.MbNode
base64Decode, base64Encode, createInputTerminal, createOutputTerminal, createSQLStatement, createSQLStatement, getAllRoutes, getAttribute, getBroker, getConfigObject, getExecutionGroup, getInputTerminal, getInputTerminals, getJDBCType4Connection, getMessageFlow, getName, getODMServer, getOutputTerminal, getOutputTerminals, getPolicy, getPolicyName, getRoute, getUserDefinedAttribute, onInitialize, onPreSetupValidation, onSetup, onStart, onStop, onTearDown, onTerminate, reinitialize, setAttribute, toString
-
-
-
-
Field Detail
-
TIMEOUT
public static final int TIMEOUT
This should be returned by therun()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 therun()method to indicate that the current transaction should be committed and the same thread to call therunmethod again.- See Also:
- Constant Field Values
-
SUCCESS_RETURN
public static final int SUCCESS_RETURN
This should be returned by therun()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 therun()method to indicate that the current transaction should be rolled back and the same thread to call therunmethod again.- See Also:
- Constant Field Values
-
FAILURE_RETURN
public static final int FAILURE_RETURN
This should be returned by therun()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
-
-
Constructor Detail
-
MbInputNode
public MbInputNode() throws MbExceptionDefault constructor- Throws:
MbException- If an exception occurred
-
-
Method Detail
-
dispatchThread
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:
MbException- If an exception occurred
-
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.- Returns:
- The message created by parsing the supplied bit stream.
- Throws:
MbException- If an exception occurred
-
-