|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.AbstractReceiver
ptolemy.distributed.actor.DistributedReceiver
public class DistributedReceiver
An implementation of the Receiver interface for distributed environments. Basically, its task is to forward tokens to distributed services whenever the put method is called.
AbstractReceiver
Red (cxh) |
Red (kapokasa) |
Field Summary | |
---|---|
private java.util.HashMap |
servicesReceiversListMap
Map containing a set of of services and the receiver's IDs in those services where the tokens put in the receiver have to be forwarded to. |
private boolean |
VERBOSE
When true shows debugging messages. |
Constructor Summary | |
---|---|
DistributedReceiver()
|
Method Summary | |
---|---|
Token |
get()
Empty implementation of the inherited abstract method. |
boolean |
hasRoom()
Empty implementation of the inherited abstract method. |
boolean |
hasRoom(int numberOfTokens)
Empty implementation of the inherited abstract method. |
boolean |
hasToken()
Empty implementation of the inherited abstract method. |
boolean |
hasToken(int numberOfTokens)
Empty implementation of the inherited abstract method. |
void |
put(Token token)
Forward copies of the token to the distributed services specified in the servicesReceiversListMap. |
void |
setServicesReceiversListMap(java.util.HashMap servRecListMap)
Specify the servicesReceiversListMap that contains a sequence of services and IDs of receivers in the service. |
Methods inherited from class ptolemy.actor.AbstractReceiver |
---|
clear, elementList, getArray, getContainer, getCurrentTime, getModelTime, isKnown, putArray, putArrayToAll, putToAll, reset, setContainer, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.util.HashMap servicesReceiversListMap
private boolean VERBOSE
Constructor Detail |
---|
public DistributedReceiver()
Method Detail |
---|
public Token get() throws NoTokenException
get
in interface Receiver
get
in class AbstractReceiver
NoTokenException
- If there is no token.public boolean hasRoom()
hasRoom
in interface Receiver
hasRoom
in class AbstractReceiver
public boolean hasRoom(int numberOfTokens)
hasRoom
in interface Receiver
hasRoom
in class AbstractReceiver
numberOfTokens
- The number of tokens to put into this receiver.
public boolean hasToken()
hasToken
in interface Receiver
hasToken
in class AbstractReceiver
public boolean hasToken(int numberOfTokens)
hasToken
in interface Receiver
hasToken
in class AbstractReceiver
numberOfTokens
- The number of tokens desired.
public void put(Token token) throws IllegalActionException
put
in interface Receiver
put
in class AbstractReceiver
token
- The token to be forwarded, or null to forward no token.
IllegalActionException
- If the put fails
(e.g. because of incompatible types).public void setServicesReceiversListMap(java.util.HashMap servRecListMap)
servRecListMap
- The map that contains a sequence of
services and IDs of receivers.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |