|
|||||||||
Home >> All >> alice >> [ respect overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
alice.respect
Class Reactor

java.lang.Objectalice.respect.Reactor
- All Implemented Interfaces:
- alice.tuplemedium.Reactor
- public class Reactor
- extends java.lang.Object
- implements alice.tuplemedium.Reactor
- extends java.lang.Object
this class defines the ReSpecT tuple centre reactor component.
the specified reactions are parsed and executed using tuProlog engines.
Constructor Summary | |
Reactor(TupleCentreVM m)
|
Method Summary | |
(package private) void |
addActivity_outTC(alice.logictuple.LogicTuple tuArg,
alice.logictuple.LogicTuple tuple)
|
(package private) void |
addActivityToSpawn(ActivitySpawner as)
|
static alice.logictuple.LogicTuple |
checkReactionSpec(alice.logictuple.LogicTuple spec)
|
boolean |
evalReaction(alice.tuplemedium.TriggeredReaction z)
reaction exectution is realized solving the goal represented by reaction body |
java.lang.String |
getOutTCactivityClassFile()
|
alice.tuplemedium.Tuple |
getReactionSpec()
Gets the current reactive behaviour of the tuple centre |
alice.tuprolog.Term |
getTerm(alice.tuplemedium.Event ev)
|
java.util.ArrayList |
getTriggeredReactions(alice.tuplemedium.Event ev)
the triggered reactions are collected the tuProlog engine, finding all the solutions of the requested goal |
void |
onNewVMStableState()
invoked by the tuple centre virtual machine when stable state is reached |
void |
reset()
Resets the reactive component of the machine |
void |
setOutTCactivityClassFile(java.lang.String classFile)
|
boolean |
setReactionSpec(alice.tuplemedium.Tuple spec)
Sets the specification describing the reactive behaviour It's like the program specyfing the behaviour of the tuple centre reacting to communication events. |
(package private) void |
spy(java.lang.String msg)
|
boolean |
triggerReaction(alice.tuplemedium.Event ev)
Checks if any reaction is triggered by a communication event |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
OUT_R
static final alice.tuplemedium.EventOperation OUT_R
IN_R
static final alice.tuplemedium.EventOperation IN_R
RD_R
static final alice.tuplemedium.EventOperation RD_R
NO_R
static final alice.tuplemedium.EventOperation NO_R
PRE
static final alice.tuplemedium.EventOperation PRE
POST
static final alice.tuplemedium.EventOperation POST
SUCCESS
static final alice.tuplemedium.EventOperation SUCCESS
FAILURE
static final alice.tuplemedium.EventOperation FAILURE
CURRENT_AGENT
static final alice.tuplemedium.EventOperation CURRENT_AGENT
CURRENT_OP
static final alice.tuplemedium.EventOperation CURRENT_OP
CURRENT_TUPLE
static final alice.tuplemedium.EventOperation CURRENT_TUPLE
SPAWN
static final alice.tuplemedium.EventOperation SPAWN
OUT_TC
static final alice.tuplemedium.EventOperation OUT_TC
core
alice.tuprolog.Prolog core
trigCore
alice.tuprolog.Prolog trigCore
vm
TupleCentreVM vm
currentEvent
alice.tuplemedium.Event currentEvent
reactionSpec
alice.tuplemedium.Tuple reactionSpec
activitiesToSpawn
java.util.ArrayList activitiesToSpawn
activitiesToSpawn_singleReaction
java.util.ArrayList activitiesToSpawn_singleReaction
outTCactivityClassFile
java.lang.String outTCactivityClassFile
Constructor Detail |
Reactor
public Reactor(TupleCentreVM m)
Method Detail |
reset
public void reset()
- Description copied from interface:
alice.tuplemedium.Reactor
- Resets the reactive component of the machine
- Specified by:
reset
in interfacealice.tuplemedium.Reactor
getTriggeredReactions
public java.util.ArrayList getTriggeredReactions(alice.tuplemedium.Event ev)
- the triggered reactions are collected
the tuProlog engine, finding all the solutions
of the requested goal
- Specified by:
getTriggeredReactions
in interfacealice.tuplemedium.Reactor
triggerReaction
public boolean triggerReaction(alice.tuplemedium.Event ev)
- Description copied from interface:
alice.tuplemedium.Reactor
- Checks if any reaction is triggered by a communication event
- Specified by:
triggerReaction
in interfacealice.tuplemedium.Reactor
evalReaction
public boolean evalReaction(alice.tuplemedium.TriggeredReaction z)
- reaction exectution is realized solving the goal
represented by reaction body
- Specified by:
evalReaction
in interfacealice.tuplemedium.Reactor
getTerm
public alice.tuprolog.Term getTerm(alice.tuplemedium.Event ev)
spy
void spy(java.lang.String msg)
setReactionSpec
public boolean setReactionSpec(alice.tuplemedium.Tuple spec)
- Description copied from interface:
alice.tuplemedium.Reactor
- Sets the specification describing the reactive behaviour
It's like the program specyfing the behaviour of the tuple centre
reacting to communication events.
- Specified by:
setReactionSpec
in interfacealice.tuplemedium.Reactor
getReactionSpec
public alice.tuplemedium.Tuple getReactionSpec()
- Description copied from interface:
alice.tuplemedium.Reactor
- Gets the current reactive behaviour of the tuple centre
- Specified by:
getReactionSpec
in interfacealice.tuplemedium.Reactor
checkReactionSpec
public static alice.logictuple.LogicTuple checkReactionSpec(alice.logictuple.LogicTuple spec)
addActivityToSpawn
void addActivityToSpawn(ActivitySpawner as)
addActivity_outTC
void addActivity_outTC(alice.logictuple.LogicTuple tuArg, alice.logictuple.LogicTuple tuple)
setOutTCactivityClassFile
public void setOutTCactivityClassFile(java.lang.String classFile)
getOutTCactivityClassFile
public java.lang.String getOutTCactivityClassFile()
onNewVMStableState
public void onNewVMStableState()
- Description copied from interface:
alice.tuplemedium.Reactor
- invoked by the tuple centre virtual machine when stable state is reached
- Specified by:
onNewVMStableState
in interfacealice.tuplemedium.Reactor
|
|||||||||
Home >> All >> alice >> [ respect overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |