Interface TypedInvocation

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      T invoke(Object obj, Object objs) Invokes the agent with one or more arguments and returns the typed result.
      T invoke(Map<String, Object> map) Invokes the agent with a map of named inputs and returns the typed result.
      CompletableFuture<T> invokeAsync(Object obj, Object objs) Invokes the agent asynchronously with one or more arguments.
      CompletableFuture<T> invokeAsync(Map<String, Object> map) Invokes the agent asynchronously with a map of named inputs.
      abstract Class<T> getResultType() The class of the result type this invocation will produce.
      • Methods inherited from class com.embabel.agent.api.invocation.BaseInvocation

        run, run, runAsync, runAsync, withProcessOptions
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • invoke

         T invoke(Object obj, Object objs)

        Invokes the agent with one or more arguments and returns the typed result.

        Parameters:
        obj - the first (and possibly only) input value to be added to the blackboard
        objs - additional input values to add to the blackboard
        Returns:

        the result of type T from the agent invocation

      • invoke

         T invoke(Map<String, Object> map)

        Invokes the agent with a map of named inputs and returns the typed result.

        Parameters:
        map - A Map that initializes the blackboard
        Returns:

        the result of type T from the agent invocation

      • invokeAsync

         CompletableFuture<T> invokeAsync(Object obj, Object objs)

        Invokes the agent asynchronously with one or more arguments.

        Parameters:
        obj - the first (and possibly only) input value to be added to the blackboard
        objs - additional input values to add to the blackboard
        Returns:

        a future containing the result of type T

      • getResultType

         abstract Class<T> getResultType()

        The class of the result type this invocation will produce.