com.wirefusion.project
Interface WobPort


public interface WobPort

This interface represents Wob ports.


Field Summary
static int IN
          getDirection() equals this constant if this is an in-port.
static int OUT
          getDirection() equals this constant if this is an out-port.
 
Method Summary
 void delete()
          Removes the port from the Wob.
 int getDirection()
          Returns the direction of this port.
 java.lang.String getId()
          Returns the ID of this port.
 int getPortNumber()
          Returns the port number of this port.
 boolean isConnected()
          Returns true if one or more wires are connected to this port or exports of this port, otherwise false.
 void setNamePatternArguments(java.lang.Object[] arguments)
           If you specify "arguments" by calling this method, then the port name will be formatted using java.text.MessageFormat before it is presented to the user.
 void setPortNumber(int portNumber)
          Sets the port number of this port
 

Field Detail

IN

static final int IN
getDirection() equals this constant if this is an in-port.

See Also:
Constant Field Values

OUT

static final int OUT
getDirection() equals this constant if this is an out-port.

See Also:
Constant Field Values
Method Detail

getDirection

int getDirection()
Returns the direction of this port. The returned value equals WobPort.IN if this is a in-port, and WobPort.OUT if it is an out-port.

Returns:
the direction of this port

getPortNumber

int getPortNumber()
Returns the port number of this port.

Returns:
the port number of this port.

setPortNumber

void setPortNumber(int portNumber)
Sets the port number of this port

Parameters:
portNumber - a port number

getId

java.lang.String getId()
Returns the ID of this port.

Returns:
the ID of this port.

isConnected

boolean isConnected()
Returns true if one or more wires are connected to this port or exports of this port, otherwise false.

Returns:
true if one or more wires are connected to this port or exports of this port, otherwise false.

delete

void delete()
Removes the port from the Wob.


setNamePatternArguments

void setNamePatternArguments(java.lang.Object[] arguments)

If you specify "arguments" by calling this method, then the port name will be formatted using java.text.MessageFormat before it is presented to the user. The corresponding port name (specified in config.xml) is assumed to be a pattern compatible with MessageFormat.

Example: If the port name is "Event occuring after {0}" and this method is called with the String array {"3 seconds"}, then the users will see the port name "Event occuring after 3 seconds".

Parameters:
arguments - an array of objects to be formatted and substituted.
See Also:
MessageFormat.format(String, Object[])