Enum Class HandlerRegistry.NoOpHandlerRegistry
java.lang.Object
java.lang.Enum<HandlerRegistry.NoOpHandlerRegistry>
io.fluxzero.sdk.tracking.handling.HandlerRegistry.NoOpHandlerRegistry
- All Implemented Interfaces:
HandlerRegistry, HasLocalHandlers, Serializable, Comparable<HandlerRegistry.NoOpHandlerRegistry>, Constable
- Enclosing interface:
HandlerRegistry
public static enum HandlerRegistry.NoOpHandlerRegistry
extends Enum<HandlerRegistry.NoOpHandlerRegistry>
implements HandlerRegistry
A no-op handler registry that performs no registration or dispatch.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface HandlerRegistry
HandlerRegistry.MergedHandlerRegistry, HandlerRegistry.NoOpHandlerRegistry -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionhandle(DeserializingMessage message) Attempts to handle the given message using local handlers.booleanIndicates whether any local handlers are currently registered for this gateway.registerHandler(Object target, HandlerFilter handlerFilter) Registers a handler object, including only those methods that match the providedHandlerFilter.voidsetSelfHandlerFilter(HandlerFilter selfHandlerFilter) Sets a custom filter to control whether a handler method is considered a local handler for the current application.Returns the enum constant of this class with the specified name.static HandlerRegistry.NoOpHandlerRegistry[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface HandlerRegistry
andThen, orThenMethods inherited from interface HasLocalHandlers
registerHandler
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
handle
Description copied from interface:HandlerRegistryAttempts to handle the given message using local handlers.- Specified by:
handlein interfaceHandlerRegistry- Parameters:
message- the deserialized message to dispatch- Returns:
- an optional future containing the result, or empty if no handler was found
-
hasLocalHandlers
public boolean hasLocalHandlers()Description copied from interface:HasLocalHandlersIndicates whether any local handlers are currently registered for this gateway.- Specified by:
hasLocalHandlersin interfaceHasLocalHandlers- Returns:
trueif local handlers are present,falseotherwise
-
setSelfHandlerFilter
Description copied from interface:HasLocalHandlersSets a custom filter to control whether a handler method is considered a local handler for the current application. This is typically used internally to ensure that handlers are associated with the correct application or component.- Specified by:
setSelfHandlerFilterin interfaceHasLocalHandlers- Parameters:
selfHandlerFilter- aHandlerFilterto apply to registered handlers
-
registerHandler
Description copied from interface:HasLocalHandlersRegisters a handler object, including only those methods that match the providedHandlerFilter.This method offers fine-grained control over which handler methods are registered, based on custom logic applied to method annotations and/or signatures.
- Specified by:
registerHandlerin interfaceHasLocalHandlers- Parameters:
target- the handler object containing annotated methodshandlerFilter- the filter used to determine which methods should be registered- Returns:
- a
Registrationwhich can be used to unregister the handlers
-