|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--alice.tuplemedium.TupleCentreVM
|
+--alice.tuplemedium.TupleCentreVMImpl
This class extends base virtual machine core in order to make the tuple centre reachable with a proper interface and specifying a way to dispatch output events.The concept of VMListener is introduced to identify targets of output communication events.
TupleCentreVM,
VMListener| Fields inherited from class alice.tuplemedium.TupleCentreVM |
bootTime, inputEvents, outputEventSet, reactionSpec, reactor, tSet, wnSet, wpSet, wsSet, zSet |
| Constructor Summary | |
protected |
TupleCentreVMImpl()
|
| Method Summary | |
TupleCentreId |
getId()
Gets the identifier of the tuple centre |
Event |
getSpec(TupleTemplate t,
AgentId aid,
VMListener receiver)
Sends a getSpec message to the tuple centre virtual machine (the getSpec gets current behaviour specification of the tuple centre) |
Event |
in(TupleTemplate t,
AgentId aid,
VMListener receiver)
Sends an in message to the tuple centre virtual machine (the in gets a matching tuple from tuple centre) |
Event |
inp(TupleTemplate t,
AgentId aid,
VMListener receiver)
Sends an inp message to the tuple centre virtual machine (the inp gets if present a matching tuple from tuple centre) |
protected void |
notifyOutputEvents()
Dispatches output events to receivers |
Event |
out(Tuple t,
AgentId aid,
VMListener receiver)
Sends an out message to the tuple centre virtual machine (the out puts a tuple in tuple centre) |
Event |
rd(TupleTemplate t,
AgentId aid,
VMListener receiver)
Sends a rd message to the tuple centre virtual machine (the rd gets without removing a matching tuple from tuple centre) |
Event |
rdp(TupleTemplate t,
AgentId aid,
VMListener receiver)
Sends a rdp message to the tuple centre virtual machine (the rdp gets without removing if present a matching tuple from tuple centre) |
void |
removeAgentEvents(AgentId id)
removes all pending events of an agent |
void |
setArgument(java.lang.Object obj)
Specifies auxiliary information used to initialize tuple centre virtual machine, which depends on the specific tuple centre model |
protected void |
setId(TupleCentreId id_)
Specifies the identifier of the tuple centre |
Event |
setSpec(Tuple t,
AgentId aid,
VMListener receiver)
Sends a setSpec message to the tuple centre virtual machine (the setSpec sets a new behaviour of the tuple centre) |
| Methods inherited from class alice.tuplemedium.TupleCentreVM |
acceptEvent, addObservableEventListener, fetchTriggeredReactions, getBootTime, getCurrentTime, getReactor, getTRSet, getTSet, getWnSet, notifyObservableEvent, removeEventsOf, removeObservableEventListener, reset, run, spy |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected TupleCentreVMImpl()
| Method Detail |
protected void setId(TupleCentreId id_)
id_ - the identifierpublic TupleCentreId getId()
public void setArgument(java.lang.Object obj)
obj - generic argumentprotected final void notifyOutputEvents()
notifyOutputEvents in class TupleCentreVM
public final Event out(Tuple t,
AgentId aid,
VMListener receiver)
t - the tuple argument of the out operationaid - the identifier of the agent invoking the operationreceiver - the target receiver of output event generated by
the virtual machine
public final Event in(TupleTemplate t,
AgentId aid,
VMListener receiver)
t - the tuple argument of the in operationaid - the identifier of the agent invoking the operationreceiver - the target receiver of output event generated by
the virtual machine
public final Event rd(TupleTemplate t,
AgentId aid,
VMListener receiver)
t - the tuple argument of the rd operationaid - the identifier of the agent invoking the operationreceiver - the target receiver of output event generated by
the virtual machine
public final Event inp(TupleTemplate t,
AgentId aid,
VMListener receiver)
t - the tuple argument of the inp operationaid - the identifier of the agent invoking the operationreceiver - the target receiver of output event generated by
the virtual machine
public final Event rdp(TupleTemplate t,
AgentId aid,
VMListener receiver)
t - the tuple argument of the rdp operationaid - the identifier of the agent invoking the operationreceiver - the target receiver of output event generated by
the virtual machine
public final Event setSpec(Tuple t,
AgentId aid,
VMListener receiver)
t - the tuple argument of the out operationaid - the identifier of the agent invoking the operationreceiver - the target receiver of output event generated by
the virtual machine
public final Event getSpec(TupleTemplate t,
AgentId aid,
VMListener receiver)
t - the tuple argument of the getSpec operationaid - the identifier of the agent invoking the operationreceiver - the target receiver of output event generated by
the virtual machinepublic final void removeAgentEvents(AgentId id)
id - identifier of the agent whose events must be removed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||