Class LambdaAgent

java.lang.Object
jadex.execution.LambdaAgent

public class LambdaAgent extends Object
Create minimal components, just from a lambda function.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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(Runnable body, jadex.core.ComponentIdentifier cid)
    Create a fire-and-forget component.
    static <T> LambdaAgent.Result<T>
    create(Callable<T> body)
    Create a component and receive a result, when the body finishes.
    static <T> LambdaAgent.Result<T>
    create(Callable<T> body, jadex.core.ComponentIdentifier cid)
    Create a component and receive a result, when the body finishes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LambdaAgent

      public LambdaAgent()
  • Method Details

    • create

      public static jadex.core.IExternalAccess create(Runnable body)
      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

      public static <T> LambdaAgent.Result<T> create(Callable<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

      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

      public static jadex.core.IExternalAccess create(Runnable body, jadex.core.ComponentIdentifier cid)
      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.