public class DistributedReceiver extends AbstractReceiver
AbstractReceiver
Constructor and Description |
---|
DistributedReceiver() |
Modifier and Type | Method and Description |
---|---|
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.
|
clear, elementList, getArray, getContainer, getCurrentTime, getModelTime, isKnown, putArray, putArrayToAll, putToAll, reset, setContainer, toString
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.