public class MessageFlow
extends java.lang.Object
implements java.io.Serializable
Each MessageFlow instance is the logical representation of an IBM Integration Bus message flow.
The class provides methods that allow the traversal and modification of message flows under development, but not the management of deployed instances.
Once a message flow is deployed to a execution group, the object is managed using the com.ibm.broker.config.proxy.MessageFlowProxy class.
Here is an example implementation that demonstrates how to use the Message Flow class to connect two existing nodes together:
File msgFlow1 = new File("Test.msgflow"); MessageFlow mf1 = FlowRendererMSGFLOW.read(msgFlow1); Node inputNode = mf1.getNodeByName("input from queue"); Node outputNode = mf1.getNodeByName("output from queue"); mf1.connect(inputNode.getOutputTerminal("out"), outputNode.getInputTerminal("in"));
The MessageFlow class does not have a physical rendering. To save the logical MessageFlow to a file, use the FlowRenderer classes.
Change Activity: -------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: -------- ----------- ------------- ------------------------------------ xxxxx.x 2010-07-27 HDMPL creation xxxxx.x 2010-08-10 dstorey v7.0.0.2 Release xxxxx.x 2011-07-06 dstorey v8.0.0.0 Release
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
copyright |
Constructor and Description |
---|
MessageFlow(java.lang.String msgFlowName)
Instantiates an MessageFlow object of the supplied
name, which contains no nodes.
|
Modifier and Type | Method and Description |
---|---|
MessageFlow |
addFlowProperty(FlowProperty flowProperty)
Adds a flow property to the message flow.
|
MessageFlow |
addNode(Node node)
Adds an unconnected node to the message flow.
|
MessageFlow |
addStickyNote(StickyNote stickyNote)
Adds a sticky note to the message flow
|
MessageFlow |
addTargetProperty(TargetProperty targetProperty)
Adds a target property to the message flow
|
Connection |
connect(OutputTerminal outputTerminal,
InputTerminal inputTerminal)
Connects the output terminal of one node into the input terminal of another
node, and stores the association inside the message flow.
|
MessageFlow |
disconnect(OutputTerminal outputTerminal,
InputTerminal inputTerminal)
Removes from the message flow a connection from the output terminal of
one node to the input terminal of another node.
|
java.lang.String |
getBrokerSchema()
Returns the broker schema location of the messageflow
|
java.util.Vector<Connection> |
getConnections()
Returns a Vector of all the connections between nodes that form part of
this message flow.
|
java.util.Vector<FlowProperty> |
getFlowProperties()
Returns a Vector of all the user defined and promoted properties defined on
the message flow.
|
java.lang.String |
getLongDescription()
Returns the long description associated with the message flow.
|
java.lang.String |
getName()
Returns the name of the message flow.
|
Node |
getNodeByName(java.lang.String nodeName)
Returns the node that has supplied name (label).
|
java.util.Vector<Node> |
getNodes()
Returns a Vector of all nodes in the message flow.
|
java.lang.String |
getShortDescription()
Returns the short description associated with the message flow.
|
java.util.Vector<StickyNote> |
getStickyNotes()
Returns a Vector of all the sticky notes defined on the message flow.
|
java.util.Vector<TargetProperty> |
getTargetProperties()
Returns a Vector of all the target properties defined on
the message flow.
|
java.lang.String |
getVersion()
Returns the version information associated with the message flow.
|
boolean |
isSubflow()
Returns whether the message flow is a subflow (*.subflow)
|
MessageFlow |
removeFlowProperty(FlowProperty flowProperty)
Removes a message flow property
If the flow property is not associated with this message flow,
this method does nothing.
|
MessageFlow |
removeNode(Node node)
Removes a node from the message flow.
|
MessageFlow |
removeStickyNote(StickyNote stickyNote)
Removes a sticky note from the message flow.
|
MessageFlow |
removeTargetProperty(TargetProperty targetProperty)
Removes a target property from the message flow.
|
MessageFlow |
setLongDescription(java.lang.String longDescription)
Sets the long description associated with the message flow.
|
MessageFlow |
setName(java.lang.String msgFlowName)
Sets the name of the message flow.
|
MessageFlow |
setShortDescription(java.lang.String shortDescription)
Sets the short description associated with the message flow.
|
MessageFlow |
setSubflow(boolean subflow)
If set to true this will render this message flow as a subflow (*.subflow) otherwise render as a message flow (*.msgflow)
|
MessageFlow |
setTargetProperties(java.util.Vector<TargetProperty> targetProperties)
Replaces the set of target properties associated with
the message flow with the supplied set.
|
MessageFlow |
setVersion(java.lang.String version)
Sets the version text associated with the message flow.
|
java.lang.String |
toString() |
public static final java.lang.String copyright
public MessageFlow(java.lang.String msgFlowName)
msgFlowName
- Name of the message flow, for example "mf1". Cannot be null.public java.lang.String getName()
public boolean isSubflow()
public MessageFlow setSubflow(boolean subflow)
subflow
- booleanpublic java.lang.String getBrokerSchema()
public java.lang.String getLongDescription()
public java.lang.String getShortDescription()
public MessageFlow setShortDescription(java.lang.String shortDescription)
shortDescription
- New short description textpublic MessageFlow setLongDescription(java.lang.String longDescription)
longDescription
- New long description textpublic java.lang.String getVersion()
public MessageFlow setVersion(java.lang.String version)
version
- New version textpublic MessageFlow setName(java.lang.String msgFlowName)
msgFlowName
- New message flow name, for example, "mf1". Cannot be null.public Connection connect(OutputTerminal outputTerminal, InputTerminal inputTerminal)
outputTerminal
- Output terminal of the source nodeinputTerminal
- Input terminal of the target nodepublic MessageFlow disconnect(OutputTerminal outputTerminal, InputTerminal inputTerminal)
outputTerminal
- Output terminal of the source nodeinputTerminal
- Input terminal of the target nodepublic java.util.Vector<Connection> getConnections()
Elements in the returned Vector can be added or removed without affecting the message flow, although the Connection instances themselves are live, meaning that any changes to them will be reflected in the message flow.
public java.util.Vector<Node> getNodes()
Elements in the returned Vector can be added or removed without affecting the message flow, although the Node instances themselves are live, meaning that any changes to them will be reflected in the message flow.
public Node getNodeByName(java.lang.String nodeName)
nodeName
- Name of the node to search forpublic MessageFlow addNode(Node node)
node
- Node to add to the message flow.public MessageFlow removeNode(Node node)
Node inputMQNode = mf1.getNodeByName("My Input Node"); mf1.removeNode(inputMQNode);
node
- The Node to removepublic java.util.Vector<FlowProperty> getFlowProperties()
Elements in the returned Vector can be added or removed without affecting the message flow, although the UserDefinedProperty instances themselves are live, meaning that any changes to them will be reflected in the message flow.
public MessageFlow addFlowProperty(FlowProperty flowProperty)
flowProperty
- FlowProperty to add to the message flowpublic MessageFlow removeFlowProperty(FlowProperty flowProperty)
flowProperty
- The flowProperty to removepublic java.util.Vector<StickyNote> getStickyNotes()
Elements in the returned Vector can be added or removed without affecting the message flow, although the StickyNote instances themselves are live, meaning that any changes to them will be reflected in the message flow.
public MessageFlow addStickyNote(StickyNote stickyNote)
stickyNote
- StickyNote to add to the message flowpublic MessageFlow removeStickyNote(StickyNote stickyNote)
stickyNote
- The StickyNote to removepublic java.util.Vector<TargetProperty> getTargetProperties()
Elements in the returned Vector can be added or removed without affecting the message flow, although the TargetProperty instances themselves are live, meaning that any changes to them will be reflected in the message flow.
public MessageFlow setTargetProperties(java.util.Vector<TargetProperty> targetProperties)
targetProperties
- New set of target properties.public MessageFlow addTargetProperty(TargetProperty targetProperty)
targetProperty
- TargetProperty to add to the message flowpublic MessageFlow removeTargetProperty(TargetProperty targetProperty)
targetProperty
- TargetProperty pattern annotation to removepublic java.lang.String toString()
toString
in class java.lang.Object