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");
    }
}