Package com.exedio.cope.pattern
Interface Dispatchable
-
- All Known Subinterfaces:
DispatchDeferrable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Dispatchable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
dispatch(Dispatcher dispatcher)
default boolean
isDeferred(Dispatcher dispatcher)
Allows to deferdispatching
an item even if it is pending.default void
notifyFinalFailure(Dispatcher dispatcher, Exception cause)
The default implementation does nothing.
-
-
-
Method Detail
-
dispatch
void dispatch(Dispatcher dispatcher) throws Exception
- Throws:
Exception
-
isDeferred
default boolean isDeferred(Dispatcher dispatcher)
Allows to deferdispatching
an item even if it is pending.The default implementation returns false.
- Parameters:
dispatcher
- used by subclasses
-
notifyFinalFailure
default void notifyFinalFailure(Dispatcher dispatcher, Exception cause)
The default implementation does nothing.- Parameters:
dispatcher
- used by subclassescause
- used by subclasses
-
-