public class SimpleMachine extends Object
Modifier and Type | Field and Description |
---|---|
Object |
request
The (optional) argument passed when the state machine was invoked.
|
Constructor and Description |
---|
SimpleMachine(_SMBuilder smBuilder)
Create a StateMachine.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(Object request,
RP rp)
Executes the state machine.
|
Object |
get(Object resultName)
Returns a partial result.
|
void |
go(String label)
Update the program counter with the index assigned to a label.
|
void |
put(String resultName,
Object result)
Save a parial result.
|
void |
send(Actor actor,
Request request,
RP rp)
Send a request to an actor.
|
public Object request
public SimpleMachine(_SMBuilder smBuilder)
smBuilder
- The state machine builder which defines the operations of this state machine.public void execute(Object request, RP rp) throws Exception
request
- An optional argument passed when the state machine is invoked.rp
- The response processor.Exception
- Any exceptions raised while executing the state machine.public final Object get(Object resultName)
resultName
- The name of the partial result.public final void put(String resultName, Object result)
resultName
- The name of the result.result
- The result.public void send(Actor actor, Request request, RP rp) throws Exception
actor
- The target actor.request
- The request.rp
- The response processor.Exception
- Any uncaught exceptions raised while processing the request.public void go(String label) throws IllegalArgumentException
label
- A lable assigned to an index into the operations.IllegalArgumentException
- Thrown if no value was assigned to the label.Copyright © 2012. All Rights Reserved.