Interface Middleware
- All Superinterfaces:
Consumer<InvocationContext<?>>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Middlewares run just before an interaction event gets dispatched. They are used to perform additional checks or add
more info the
InvocationContext
. Either register them at the Middlewares
or use the Implementation
annotation. Middlewares can have different Priorities dictating their priority on execution.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(InvocationContext<?> context) Executes this middleware with the givenInvocationContext
.
-
Method Details
-
accept
Executes this middleware with the given
InvocationContext
. Useinvalid reference
#cancel(MessageCreateData)
- Specified by:
accept
in interfaceConsumer<InvocationContext<?>>
- Parameters:
context
- theInvocationContext
of the current interaction event
-