Annotation Interface Implementation.Middleware

Enclosing class:
Implementation

@Target(TYPE) @Retention(RUNTIME) @Scope public static @interface Implementation.Middleware

A class annotated with Implementation.Middleware will be automatically searched for and instantiated as a Middleware by guice.

Example

@Middleware(priority = Priority.NORMAL)
public class CustomMiddleware implements Middleware {
    private static final Logger log = LoggerFactory.getLogger(FirstMiddleware.class);

    @Override
    public void accept(InvocationContext<?> context) {
        log.info("run custom middleware");
    }
}
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    io.github.kaktushose.jdac.dispatching.middleware.Priority
    Gets the Priority to register the Middleware with.
  • Element Details

    • priority

      io.github.kaktushose.jdac.dispatching.middleware.Priority priority
      Gets the Priority to register the Middleware with.
      Returns:
      the Priority
      Default:
      NORMAL