Annotation Interface Implementation.Middleware
- Enclosing class:
Implementation
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
-
Element Details
-
priority
Priority priorityGets thePriority
to register theMiddleware
with.- Returns:
- the
Priority
- Default:
NORMAL
-