public class DistributedReceiver extends AbstractReceiver
AbstractReceiver| Red (cxh) |
| Red (kapokasa) |
| 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, toStringpublic Token get() throws NoTokenException
get in interface Receiverget in class AbstractReceiverNoTokenException - If there is no token.public boolean hasRoom()
hasRoom in interface ReceiverhasRoom in class AbstractReceiverpublic boolean hasRoom(int numberOfTokens)
hasRoom in interface ReceiverhasRoom in class AbstractReceivernumberOfTokens - The number of tokens to put into this receiver.public boolean hasToken()
hasToken in interface ReceiverhasToken in class AbstractReceiverpublic boolean hasToken(int numberOfTokens)
hasToken in interface ReceiverhasToken in class AbstractReceivernumberOfTokens - The number of tokens desired.public void put(Token token) throws IllegalActionException
put in interface Receiverput in class AbstractReceivertoken - 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.