Class RequestHandlerLoader
java.lang.Object
de.craftsblock.craftsnet.addon.services.builtin.handlers.RequestHandlerLoader
- All Implemented Interfaces:
ServiceLoader<RequestHandler>
A concrete implementation of the
ServiceLoader interface for managing instances of RequestHandler.
This class specifically focuses on loading instances of RequestHandler into the RouteRegistry.- Since:
- 3.1.0-SNAPSHOT
-
Constructor Summary
ConstructorsConstructorDescriptionRequestHandlerLoader(CraftsNet craftsNet) Creates a new instance ofRequestHandlerLoader. -
Method Summary
Modifier and TypeMethodDescriptionbooleanload(RequestHandler provider) Loads anRequestHandlerinto theRouteRegistryfor further processing.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.craftsblock.craftsnet.addon.services.ServiceLoader
newInstance
-
Constructor Details
-
RequestHandlerLoader
Creates a new instance ofRequestHandlerLoader.- Parameters:
craftsNet- The instance ofCraftsNetthat theRequestHandlerLoaderwas registered on.
-
-
Method Details
-
load
Loads anRequestHandlerinto theRouteRegistryfor further processing.- Specified by:
loadin interfaceServiceLoader<RequestHandler>- Parameters:
provider- The instance of theRequestHandlerto be loaded.- Returns:
trueif the provider is successfully loaded and registered,falseotherwise.
-