public class ReactiveAgent
extends io.magentys.java8.FunctionalAgent
| Modifier and Type | Field and Description |
|---|---|
protected static akka.actor.ActorSystem |
system |
| Constructor and Description |
|---|
ReactiveAgent(io.magentys.Memory memory)
Default constructor
|
ReactiveAgent(io.magentys.Memory memory,
String name) |
| Modifier and Type | Method and Description |
|---|---|
static ReactiveAgent |
create(io.magentys.CoreMemory coreMemory,
String name) |
static ReactiveAgent |
create(io.magentys.Memory memory)
Static constructor
|
static ReactiveAgent |
createFrom(io.magentys.Agent agent) |
Failure |
getFailure() |
<TYPE> TYPE |
getFailureAs(Class<TYPE> type) |
Boolean |
hasFailed() |
<RESULT> Either<RESULT,Failure> |
performsReactively(ReactiveMission<RESULT> reactiveMission)
Performs a reactive mission
|
<RESULT> Either<RESULT,Failure> |
performsReactively(ReactiveMission<RESULT> reactiveMission,
MissionStrategy missionStrategy)
Performs a reactive mission
|
ReactiveAgent |
resetFailure() |
void |
terminate()
terminates with default termination timeout set to 30 seconds
|
void |
terminate(scala.concurrent.duration.Duration timeout)
terminates and awaits for termination to complete
|
ReactiveAgent |
withDefaultEventStrategy(MissionStrategy missionStrategy)
Setter (With-er) of default Mission Strategy
|
clone, functionalAgent, keepsInMindTheResultOf, performs, performs, performs, performs, performs, performs, performs, performs, performsAsync, performsAsync, performsAsync, performsAsync, performsAsync, testsaddNarrators, and, andHe, andShe, askThe, getMemory, getNarrators, getTools, keepsInMind, name, narrateAfter, narrateBefore, narrateThat, narrateThat, obtains, performAll, performs, recalls, reportsUsing, setMemory, setName, setNarrators, setTools, usingThepublic ReactiveAgent(io.magentys.Memory memory)
throws Exception
memory - - implementation of memoryExceptionpublic void terminate()
public void terminate(scala.concurrent.duration.Duration timeout)
timeout - defines how long to wait for termination to completepublic static ReactiveAgent create(io.magentys.Memory memory) throws Exception
memory - - implementation of memoryExceptionpublic static ReactiveAgent createFrom(io.magentys.Agent agent) throws Exception
Exceptionpublic static ReactiveAgent create(io.magentys.CoreMemory coreMemory, String name) throws Exception
Exceptionpublic <RESULT> Either<RESULT,Failure> performsReactively(ReactiveMission<RESULT> reactiveMission)
RESULT - - the type of the missions' resultreactiveMission - - the mission to performpublic <RESULT> Either<RESULT,Failure> performsReactively(ReactiveMission<RESULT> reactiveMission, MissionStrategy missionStrategy)
RESULT - - the type of the mission's resultreactiveMission - - the mission to performmissionStrategy - - the strategy to usepublic ReactiveAgent withDefaultEventStrategy(MissionStrategy missionStrategy)
missionStrategy - to be used when no mission-specific strategy is definedpublic Boolean hasFailed()
public Failure getFailure()
public <TYPE> TYPE getFailureAs(Class<TYPE> type)
public ReactiveAgent resetFailure()
Copyright © 2016. All rights reserved.