Package: groovy.concurrent

## [Java] Interface ReactorHandler<T, R>

-     @FunctionalInterface
      public interface ReactorHandler<T, R>

  Context-aware handler for reactor actors. Receives the actor context and the incoming message; returns the reply value bound to Actor.sendAndGet callers.

  To stop the actor from inside the handler, call `ctx.self().stop()`.

  Type Parameters:
    `T` - the message type
    `R` - the reply type
  See Also:
    Actor.reactor
  Since:
    6.0.0

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public R` | `apply(ActorContext<T> ctx, T message)` Processes a single message and returns the reply.

- - ### Method Detail

    - #### public R apply(ActorContext<T> ctx, T message)

      Processes a single message and returns the reply.

      Parameters:
        `ctx` - the actor context
        `message` - the incoming message
      Returns:
        the reply value