public abstract class MbNode extends Object
MbNodeInterface
page.MbNodeInterface
Modifier and Type | Class and Description |
---|---|
static class |
MbNode.JDBC_TransactionType
Transaction type.
|
Constructor and Description |
---|
MbNode()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
MbInputTerminal |
createInputTerminal(String name)
Creates an input terminal on the node with the specified name.
|
MbOutputTerminal |
createOutputTerminal(String name)
Creates an output terminal on the node with the specified name.
|
MbSQLStatement |
createSQLStatement(String dataSourceName,
String statement)
Creates an MbSQLStatement object described in
createSQLStatement
The transaction type defaults to
MbSQLStatement.SQL_TRANSACTION_AUTO |
MbSQLStatement |
createSQLStatement(String dataSourceName,
String statement,
int transactionType)
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.
|
Vector<MbRoute> |
getAllRoutes()
Returns a Vector containing the label nodes associated with this
message flow.
|
String |
getAttribute(String attributeName)
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 terminalName)
Returns an MbInputTerminal matching the name passed as an argument, or
null if the terminal does not exist.
|
Vector<MbInputTerminal> |
getInputTerminals()
Returns a Vector containing the input terminals associated with this
node.
|
Connection |
getJDBCType4Connection(String datasourceName,
MbNode.JDBC_TransactionType transactionType)
This method allows this node to obtain a JDBC Type 4
Connection.
|
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 terminalName)
Returns an MbOutputTerminal matching the name passed as an argument, or
null if the terminal does not exist.
|
Vector<MbOutputTerminal> |
getOutputTerminals()
Returns a Vector containing the output terminals associated with this
node.
|
MbRoute |
getRoute(String labelName)
Returns an MbRoute object matching the label name passed as an argument, or
null if the label does not exist.
|
com.ibm.broker.plugin.MbSecurityManager |
getSecurityManager() |
Object |
getUserDefinedAttribute(String name)
Gets the value of a user defined attribute on a specific node instance.
|
void |
setAttribute(String attributeName,
String attributeValue)
Sets the value of an attribute on a specific node instance.
|
String |
toString()
Returns a String representation of the MbNode.
|
public MbInputTerminal createInputTerminal(String name) throws MbException
MbTerminalCreationException
to be thrown.name
- The name of the terminal.MbException
public MbOutputTerminal createOutputTerminal(String name) throws MbException
MbTerminalCreationException
to be thrown.name
- The name of the terminal.MbException
public MbSQLStatement createSQLStatement(String dataSourceName, String statement) throws MbException
createSQLStatement
The transaction type defaults to
MbSQLStatement.SQL_TRANSACTION_AUTOdataSourceName
- The ODBC data source name to be used if the
statement references an external database.statement
- Specifies the SQL expression to be created, using
the syntax defined for the compute message flow processing node.MbException
public MbSQLStatement createSQLStatement(String dataSourceName, String statement, int transactionType) throws MbException
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.dataSourceName
- The ODBC data source name to be used if the
statement references an external database.statement
- Specifies the SQL expression to be created, using
the syntax defined for the compute message flow processing node.transactionType
- Specifies whether a database commit will be
performed after the statement is executed. Valid values are:
execute
or
select
method (that is, the message flow is partially broker coordinated).MbException
public Vector<MbInputTerminal> getInputTerminals()
public Vector<MbOutputTerminal> getOutputTerminals()
public MbInputTerminal getInputTerminal(String terminalName)
terminalName
- The name of the input terminal.public MbOutputTerminal getOutputTerminal(String terminalName)
terminalName
- The name of the output terminal.public MbRoute getRoute(String labelName) throws MbException
labelName
- The name of the label property in the Label node.MbException
public Vector<MbRoute> getAllRoutes() throws MbException
MbException
public MbBroker getBroker() throws MbException
MbException
public MbExecutionGroup getExecutionGroup() throws MbException
MbException
public MbMessageFlow getMessageFlow() throws MbException
MbException
public String getAttribute(String attributeName) throws MbException
MbNodeInterface
.
This method should not be called in the node constructor.attributeName
- The name of the attribute.MbException
public void setAttribute(String attributeName, String attributeValue) throws MbException
MbNodeInterface
.
This method should not be called in the node constructor.attributeName
- The name of the attribute.attributeValue
- The new value of the attribute.MbException
public String toString()
public Object getUserDefinedAttribute(String name)
name
- The name of the user defined attribute.public String getName()
public Connection getJDBCType4Connection(String datasourceName, MbNode.JDBC_TransactionType transactionType) throws MbException
...
Connection myConn = getJDBCType4Connection(myDB2DatasourceName,MB_TRANSACTION_AUTO);
// Example of using the Connection :
Statement select = myConn.createStatement;
Result result = select.executeQuery("SELECT customer_id, tesValue FROM Test);
...
datasourceName
- The datasource name that matches a
broker JDBC provider service already
configured using the command
mqsicreateconfigurableservice or any
existing service modified using the
command mqsichangeproperties.transactionType
- The transaction coordination level
input that determines when changes
made against the datasource are
committed or rolled back. Currently
there is only one permiited value :
MB_TRANSACTION_AUTO which inherits
the transaction level from the
message flow.MbException
public com.ibm.broker.plugin.MbSecurityManager getSecurityManager()