Package io.fluxcapacitor.common.handling
Class DefaultHandler<M>
java.lang.Object
io.fluxcapacitor.common.handling.DefaultHandler<M>
- All Implemented Interfaces:
Handler<M>
Default implementation of the
Handler
interface.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.fluxcapacitor.common.handling.Handler
Handler.DelegatingHandler<M>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInvoker
(M message) Returns aHandlerInvoker
capable of processing the given message, if available.Class
<?> Returns the class of the handler's target object.toString()
-
Constructor Details
-
DefaultHandler
public DefaultHandler()
-
-
Method Details
-
getTargetClass
Description copied from interface:Handler
Returns the class of the handler's target object. This may be used for reflective operations, logging, or framework-level behavior.- Specified by:
getTargetClass
in interfaceHandler<M>
- Returns:
- the class of the handler's target
-
getInvoker
Description copied from interface:Handler
Returns aHandlerInvoker
capable of processing the given message, if available.- Specified by:
getInvoker
in interfaceHandler<M>
- Parameters:
message
- the message to be handled- Returns:
- an optional
HandlerInvoker
if this handler can handle the message; otherwiseOptional.empty()
-
toString
-