Package jadex.execution
Class LambdaAgent
java.lang.Object
jadex.execution.LambdaAgent
Create minimal components, just from a lambda function.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic jadex.core.IExternalAccess
create
(jadex.core.IThrowingConsumer<jadex.core.IComponent> body) Create a fire-and-forget component.static <T> jadex.core.IExternalAccess
create
(jadex.core.IThrowingConsumer<jadex.core.IComponent> body, jadex.core.ComponentIdentifier cid) Create a component and receive a result, when the body finishes.static <T> LambdaAgent.Result
<T> create
(jadex.core.IThrowingFunction<jadex.core.IComponent, T> body) Create a component and receive a result, when the body finishes.static <T> LambdaAgent.Result
<T> create
(jadex.core.IThrowingFunction<jadex.core.IComponent, T> body, jadex.core.ComponentIdentifier cid) Create a component and receive a result, when the body finishes.static jadex.core.IExternalAccess
Create a fire-and-forget component.static jadex.core.IExternalAccess
Create a fire-and-forget component.static <T> LambdaAgent.Result
<T> Create a component and receive a result, when the body finishes.static <T> LambdaAgent.Result
<T> Create a component and receive a result, when the body finishes.
-
Constructor Details
-
LambdaAgent
public LambdaAgent()
-
-
Method Details
-
create
Create a fire-and-forget component.- Parameters:
body
- The code to be executed in the new component.
-
create
public static jadex.core.IExternalAccess create(jadex.core.IThrowingConsumer<jadex.core.IComponent> body) Create a fire-and-forget component.- Parameters:
body
- The code to be executed in the new component.
-
create
Create a component and receive a result, when the body finishes.- Parameters:
body
- The code to be executed in the new component.
-
create
public static <T> LambdaAgent.Result<T> create(jadex.core.IThrowingFunction<jadex.core.IComponent, T> body) Create a component and receive a result, when the body finishes.- Parameters:
body
- The code to be executed in the new component.
-
create
Create a fire-and-forget component.- Parameters:
body
- The code to be executed in the new component.
-
create
public static <T> LambdaAgent.Result<T> create(Callable<T> body, jadex.core.ComponentIdentifier cid) Create a component and receive a result, when the body finishes.- Parameters:
body
- The code to be executed in the new component.
-
create
public static <T> LambdaAgent.Result<T> create(jadex.core.IThrowingFunction<jadex.core.IComponent, T> body, jadex.core.ComponentIdentifier cid) Create a component and receive a result, when the body finishes.- Parameters:
body
- The code to be executed in the new component.
-
create
public static <T> jadex.core.IExternalAccess create(jadex.core.IThrowingConsumer<jadex.core.IComponent> body, jadex.core.ComponentIdentifier cid) Create a component and receive a result, when the body finishes.- Parameters:
body
- The code to be executed in the new component.
-