Class Hierarchy All Classes All Fields and Methods

Class com.ibm.broker.plugin.MbNode

java.lang.Object
        com.ibm.broker.plugin.MbNode

public class MbNode
extends Object

MbNode provides utility methods allowing a plugin node to interact with the broker. The skeleton code for a plugin node is shown on the MbNodeInterface page.

Constructor Index
Constructor Description
MbNode() Default constructor
Method Index
Method Description
MbInputTerminal createInputTerminal(String) Creates an input terminal on the node with the specified name.
MbOutputTerminal createOutputTerminal(String) Creates an output terminal on the node with the specified name.
MbSQLStatement createSQLStatement(String, String) Creates an MbSQLStatement object described in createSQLStatement The transaction type defaults to MbSQLStatement.SQL_TRANSACTION_AUTO
MbSQLStatement createSQLStatement(String, String, int) Creates an SQL expression object representing the statement specified by the statement argument, using the syntax as defined for the compute message flow processing node.
String getAttribute(String) Gets the value of an attribute on a specific node instance.
MbBroker getBroker() Returns an MbBroker object reflecting the broker state associated with this MbNode.
MbExecutionGroup getExecutionGroup() Returns an MbExecutionGroup object reflecting the broker state associated with this MbNode.
MbInputTerminal getInputTerminal(String) Returns an MbInputTerminal matching the name passed as an argument, or null if the terminal does not exist.
Vector getInputTerminals() Returns a Vector containing the input terminals associated with this node.
MbMessageFlow getMessageFlow() Returns an MbMessageFlow object reflecting the broker state associated with this MbNode.
String getName() Returns the name (label) of the node.
MbOutputTerminal getOutputTerminal(String) Returns an MbOutputTerminal matching the name passed as an argument, or null if the terminal does not exist.
Vector getOutputTerminals() Returns a Vector containing the output terminals associated with this node.
void setAttribute(String, String) Sets the value of an attribute on a specific node instance.
String toString() Returns a String representation of the MbNode.

Constructors

MbNode

public MbNode() 

Default constructor

Methods

createInputTerminal

public MbInputTerminal createInputTerminal(String name) throws MbException

Creates an input terminal on the node with the specified name. This must only be called in the node's constructor. Calling this anywhere else will cause MbTerminalCreationException to be thrown.

createOutputTerminal

public MbOutputTerminal createOutputTerminal(String name) throws MbException

Creates an output terminal on the node with the specified name. This must only be called in the node's constructor. Calling this anywhere else will cause MbTerminalCreationException to be thrown.

createSQLStatement

public MbSQLStatement createSQLStatement(String dataSourceName,
                                         String statement) throws MbException

Creates an MbSQLStatement object described in createSQLStatement The transaction type defaults to MbSQLStatement.SQL_TRANSACTION_AUTO

createSQLStatement

public MbSQLStatement createSQLStatement(String dataSourceName,
                                         String statement,
                                         int transactionType) throws MbException

Creates an SQL expression object representing the statement specified by the statement argument, using the syntax as defined for the compute message flow processing node. The MbSQLStatement object returned can be used to execute the statement using its execute or select method. Multiple SQL expression objects can be create in a single message flow processing node. Although these objects can be created at any time, they will be typically created when the node is instantiated, within the node constructor or within an attribute set method if the statement is to be passed in as a node attribute.

getAttribute

public String getAttribute(String attributeName) throws MbException

Gets the value of an attribute on a specific node instance. This can be used to get the values of default broker attributes for the node. User attributes should be declared using standard JavaBean property get/set methods as described in MbNodeInterface. This method should not be called in the node constructor.

getBroker

public MbBroker getBroker() throws MbException

Returns an MbBroker object reflecting the broker state associated with this MbNode. NOTE: This is a snap-shot at the time of the call.

getExecutionGroup

public MbExecutionGroup getExecutionGroup() throws MbException

Returns an MbExecutionGroup object reflecting the broker state associated with this MbNode. NOTE: This is a snap-shot at the time of the call.

getInputTerminal

public MbInputTerminal getInputTerminal(String terminalName) 

Returns an MbInputTerminal matching the name passed as an argument, or null if the terminal does not exist.

getInputTerminals

public Vector getInputTerminals() 

Returns a Vector containing the input terminals associated with this node.

getMessageFlow

public MbMessageFlow getMessageFlow() throws MbException

Returns an MbMessageFlow object reflecting the broker state associated with this MbNode. NOTE: This is a snap-shot at the time of the call.

getName

public String getName() 

Returns the name (label) of the node. The label is not assigned until the message flow configuration is complete. This method should not be called in the node constructor.

getOutputTerminal

public MbOutputTerminal getOutputTerminal(String terminalName) 

Returns an MbOutputTerminal matching the name passed as an argument, or null if the terminal does not exist.

getOutputTerminals

public Vector getOutputTerminals() 

Returns a Vector containing the output terminals associated with this node.

setAttribute

public void setAttribute(String attributeName,
                         String attributeValue) throws MbException

Sets the value of an attribute on a specific node instance. This can be used to set the values of default broker attributes for the node. User attributes should be declared using standard JavaBean property get/set methods as described in MbNodeInterface. This method should not be called in the node constructor.

toString

public String toString() 

Returns a String representation of the MbNode.

Class Hierarchy All Classes All Fields and Methods