|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mss.ea.al.FlowElement
Abstract base class for a flow element used in algorithms.
Field Summary | |
protected MessageBroker |
broker
Message broker for receiving messages. |
protected MessageChannel |
messageChannel
Message channel to send and receive messages through. |
protected java.lang.String |
name
Name of the flow element. |
protected Message |
receivedMessage
The message that has been received from the channel. |
Sync |
sync
Synchronization object. |
Constructor Summary | |
FlowElement(MessageBroker broker,
java.lang.String name)
Constructor with broker. |
|
FlowElement(java.lang.String name)
Constructor. |
Method Summary | |
void |
acquireChannel(java.lang.Object sender)
Wakes up this flow element for listening at the message channel. |
abstract FlowElement |
getPredecessor(int index)
Gets the predecessor from a particular slot. |
abstract int |
getPredecessorNumber()
Gets the number of predecessors of this element. |
abstract FlowElement |
getSuccessor(int index)
Gets the successor from a particular slot. |
abstract int |
getSuccessorNumber()
Gets the number of successors of this element. |
abstract boolean |
hasPredecessor()
Checks if this element has a predecessor. |
abstract boolean |
hasSuccessor()
Checks if this element has a successor. |
protected abstract void |
react()
Abstract method for reacting on an incoming message. |
void |
register(MessageBroker broker)
Registers this flow element at a message broker. |
void |
run()
Run method. |
void |
setBroker(MessageBroker broker)
Sets a new message broker. |
void |
setChannel(MessageChannel channel)
Sets a new message channel. |
abstract void |
setPredecessor(FlowElement predecessor,
int index)
Sets a new predecessor to a slot. |
abstract void |
setSuccessor(FlowElement successor,
int index)
Sets a new successor to a slot. |
void |
setSync(Sync sync)
Sets a new sychronization object. |
java.lang.String |
toString()
Returns the name of this flow element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public Sync sync
protected MessageBroker broker
protected Message receivedMessage
protected MessageChannel messageChannel
protected java.lang.String name
Constructor Detail |
public FlowElement(java.lang.String name)
name
- name of the flow elementpublic FlowElement(MessageBroker broker, java.lang.String name)
broker
- message brokername
- name of the flow elementMethod Detail |
public abstract boolean hasPredecessor()
public abstract boolean hasSuccessor()
public abstract int getPredecessorNumber()
public abstract int getSuccessorNumber()
public abstract FlowElement getPredecessor(int index)
index
- index of the predecessorpublic abstract FlowElement getSuccessor(int index)
index
- index of the successorpublic abstract void setPredecessor(FlowElement predecessor, int index)
predecessor
- new predecessorindex
- slot to append the predecessor topublic abstract void setSuccessor(FlowElement successor, int index)
successor
- new successorindex
- index of the successorprotected abstract void react()
public void register(MessageBroker broker)
broker
- message brokerpublic void run()
run
in interface java.lang.Runnable
public void acquireChannel(java.lang.Object sender)
acquireChannel
in interface MessageRecipient
sender
- sender of the wake up signalpublic void setBroker(MessageBroker broker)
broker
- new message brokerpublic void setSync(Sync sync)
sync
- new sychronization objectpublic void setChannel(MessageChannel channel)
channel
- new message channelpublic java.lang.String toString()
toString
in class java.lang.Object
|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |