Class WebSocketExtensionAutoRegisterHandler
java.lang.Object
de.craftsblock.craftsnet.autoregister.AutoRegisterHandler<WebSocketExtension>
de.craftsblock.craftsnet.autoregister.builtin.sockets.WebSocketExtensionAutoRegisterHandler
A handler for automatically registering
WebSocketExtension implementations. This class extends
AutoRegisterHandler and provides a concrete implementation for handling the registration of
WebSocketExtension instances into the websocket extension registry of CraftsNet.- Since:
- 3.2.0-SNAPSHOT
-
Field Summary
Fields inherited from class de.craftsblock.craftsnet.autoregister.AutoRegisterHandler
craftsNet -
Constructor Summary
ConstructorsConstructorDescriptionWebSocketExtensionAutoRegisterHandler(CraftsNet craftsNet) Constructs a newWebSocketExtensionAutoRegisterHandler. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanhandle(WebSocketExtension extension, AutoRegisterInfo info, Object... args) Handles the registration of the providedWebSocketExtension.Methods inherited from class de.craftsblock.craftsnet.autoregister.AutoRegisterHandler
getCraftsNet
-
Constructor Details
-
WebSocketExtensionAutoRegisterHandler
Constructs a newWebSocketExtensionAutoRegisterHandler.- Parameters:
craftsNet- TheCraftsNetinstance used for managing the websocket extension registry.
-
-
Method Details
-
handle
Handles the registration of the providedWebSocketExtension.This method attempts to register the given
WebSocketExtensionwith theCraftsNet.getWebSocketExtensionRegistry()of the associatedCraftsNetinstance. If registration is successful, the method returnstrue.- Specified by:
handlein classAutoRegisterHandler<WebSocketExtension>- Parameters:
extension- TheWebSocketExtensionto 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.
-