Class HandlerAutoRegisterHandler
java.lang.Object
de.craftsblock.craftsnet.autoregister.AutoRegisterHandler<Handler>
de.craftsblock.craftsnet.autoregister.builtin.http.HandlerAutoRegisterHandler
A handler for automatically registering
Handler implementations. This class extends
AutoRegisterHandler and provides a concrete implementation for handling the registration of
Handler instances into the route registry of CraftsNet.- Since:
- 3.2.0-SNAPSHOT
-
Field Summary
Fields inherited from class de.craftsblock.craftsnet.autoregister.AutoRegisterHandler
craftsNet -
Constructor Summary
ConstructorsConstructorDescriptionHandlerAutoRegisterHandler(CraftsNet craftsNet) Constructs a newHandlerAutoRegisterHandler. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanhandle(Handler handler, AutoRegisterInfo info, Object... args) Handles the registration of the providedHandler.Methods inherited from class de.craftsblock.craftsnet.autoregister.AutoRegisterHandler
getCraftsNet
-
Constructor Details
-
HandlerAutoRegisterHandler
Constructs a newHandlerAutoRegisterHandler.- Parameters:
craftsNet- TheCraftsNetinstance used for managing the route registry.
-
-
Method Details
-
handle
Handles the registration of the providedHandler.This method attempts to register the given
Handlerwith theCraftsNet.getRouteRegistry()of the associatedCraftsNetinstance. If registration is successful, the method returnstrue.- Specified by:
handlein classAutoRegisterHandler<Handler>- Parameters:
handler- TheHandlerto be registered.args- Additional arguments (not used in this implementation but provided for extensibility).info- TheAutoRegisterInfowhich holds more information about the object.- Returns:
trueif the registration was successful,falseotherwise.
-