public abstract class DeclarativeSelector<MessageType> extends Selector<MessageType>
numClassifiers
Modifier | Constructor and Description |
---|---|
protected |
DeclarativeSelector(Class<? extends Enum<?>> enumClass) |
protected |
DeclarativeSelector(Class<? extends Enum<?>> enumClass,
boolean pAlwaysSequentialBody) |
protected |
DeclarativeSelector(int numMailboxes) |
protected |
DeclarativeSelector(int numMailboxes,
boolean pAlwaysSequentialBody,
boolean pPriorityPolicy) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doProcess(MessageType theMsg) |
protected void |
guard(Enum<?> mailboxName,
java.util.function.Predicate<MessageType> guardExpr) |
protected void |
guard(int mailboxId,
java.util.function.Predicate<MessageType> guardExpr) |
protected void |
onPreStart()
Convenience: specify code to be executed before selector is started
|
protected void |
process(MessageType theMsg)
Callback allowing user to have custom behavior while processing messages.
|
protected abstract void |
registerGuards() |
disable, disable, disableAllExcept, disableAllExcept, enable, enable, enableAll, exit, handleThrowable, hasStarted, isEnabled, isEnabled, onPostExit, onPostStart, onPreExit, send, send, start, start, tryProcessMessage
protected DeclarativeSelector(int numMailboxes)
protected DeclarativeSelector(int numMailboxes, boolean pAlwaysSequentialBody, boolean pPriorityPolicy)
protected void onPreStart()
Selector
onPreStart
in class Selector<MessageType>
protected abstract void registerGuards()
protected final void guard(Enum<?> mailboxName, java.util.function.Predicate<MessageType> guardExpr)
protected final void guard(int mailboxId, java.util.function.Predicate<MessageType> guardExpr)
protected final void process(MessageType theMsg)
Selector
process
in class Selector<MessageType>
theMsg
- message to processprotected abstract void doProcess(MessageType theMsg)
Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.