All Packages Class Hierarchy This Package Previous Next Index
Interface uhr.core.msg.Connection
- public interface Connection
This class describes a single connection between parts in a
cell and the cell's MessageRouter. It is used to connect and
disconnect connections, as well as describe existing connections.
It is immutable.
The implementation should have a no-arg constructor. This should
not be used by clients.
-
DIRECT
- The connection type for a direct hookup from a sender to a
receiver.
-
INTEREST_IN
- The connection type for an interest in messages from inside of
the cell.
-
INTEREST_OUT
- The connection type for an interest in messages from outside of
the cell.
-
SERVICE_NEED
- The connection type for a service need.
-
SERVICE_SUPPLIER
- The connection type for a service supplier.
-
SIGNAL_IN
- The connection type for a signal to inside of the cell.
-
SIGNAL_OUT
- The connection type for a signal to outside of the cell.
-
convertTypeToConstant(String)
- Returns the connection constant given its String representation.
-
getConnectionType()
- Returns the connection type.
-
getConnectionTypeString()
- Returns the String for the connection type constant.
-
getMessageName()
- Returns the message name.
-
getMessageReceiver()
- Returns the receiver or null if a sender connection.
-
getMessageSender()
- Returns the sender or null if a receiver connection.
-
getReceiverName()
- Returns the receiver name or null if a sender connection.
-
getSenderName()
- Returns the sender name or null if a receiver connection.
-
isDirectConnection()
- Determines whether this is a direct connection.
-
isReceiverConnection()
- Determines whether this is a receiver connection.
-
isSenderConnection()
- Determines whether this is a sender connection.
-
toString()
- Converts the Connection to an easily readable String representation.
SIGNAL_OUT
public static final int SIGNAL_OUT
- The connection type for a signal to outside of the cell.
SIGNAL_IN
public static final int SIGNAL_IN
- The connection type for a signal to inside of the cell.
SERVICE_NEED
public static final int SERVICE_NEED
- The connection type for a service need. The service needed is
identified by the message name.
INTEREST_OUT
public static final int INTEREST_OUT
- The connection type for an interest in messages from outside of
the cell.
INTEREST_IN
public static final int INTEREST_IN
- The connection type for an interest in messages from inside of
the cell.
SERVICE_SUPPLIER
public static final int SERVICE_SUPPLIER
- The connection type for a service supplier. A supplier is a part
who can supply the service identified by the message name.
DIRECT
public static final int DIRECT
- The connection type for a direct hookup from a sender to a
receiver.
isSenderConnection
public abstract boolean isSenderConnection()
- Determines whether this is a sender connection.
- Returns:
- true is this is a sender connection, false if not.
isReceiverConnection
public abstract boolean isReceiverConnection()
- Determines whether this is a receiver connection.
- Returns:
- true is this is a receiver connection, false if not.
isDirectConnection
public abstract boolean isDirectConnection()
- Determines whether this is a direct connection.
- Returns:
- true is this is a direct connection, false if not.
getMessageName
public abstract String getMessageName()
- Returns the message name.
- Returns:
- the the message name.
getConnectionType
public abstract int getConnectionType()
- Returns the connection type.
- Returns:
- the connection type.
getConnectionTypeString
public abstract String getConnectionTypeString()
- Returns the String for the connection type constant. For example
if the type is Connection.DIRECT then "DIRECT" is returned.
- Returns:
- the String for the connection type constant.
convertTypeToConstant
public abstract int convertTypeToConstant(String connectionType)
- Returns the connection constant given its String representation.
For example if given "DIRECT" then Connection.DIRECT is returned.
- Returns:
- the connection constant for the String.
getSenderName
public abstract String getSenderName()
- Returns the sender name or null if a receiver connection.
- Returns:
- the sender name or null if a receiver connection.
getReceiverName
public abstract String getReceiverName()
- Returns the receiver name or null if a sender connection.
- Returns:
- the receiver name or null if a sender connection.
getMessageSender
public abstract MessageSender getMessageSender()
- Returns the sender or null if a receiver connection.
- Returns:
- the sender or null if a receiver connection.
getMessageReceiver
public abstract MessageReceiver getMessageReceiver()
- Returns the receiver or null if a sender connection.
- Returns:
- the receiver or null if a sender connection.
toString
public abstract String toString()
- Converts the Connection to an easily readable String representation.
- Returns:
- the representation in a consistent style.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index