Class GenericHandlerLoader
java.lang.Object
de.craftsblock.craftsnet.addon.services.builtin.handlers.GenericHandlerLoader
- All Implemented Interfaces:
ServiceLoader<Handler>
A concrete implementation of the
ServiceLoader interface for managing instances of Handler.
This class specifically focuses on loading instances of Handler into the RouteRegistry.- Since:
- 3.1.0-SNAPSHOT
-
Constructor Summary
ConstructorsConstructorDescriptionGenericHandlerLoader(CraftsNet craftsNet) Creates a new instance ofGenericHandlerLoader. -
Method Summary
Modifier and TypeMethodDescriptionbooleanLoads anHandlerinto 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
-
GenericHandlerLoader
Creates a new instance ofGenericHandlerLoader.- Parameters:
craftsNet- The instance ofCraftsNetthat theGenericHandlerLoaderwas registered on.
-
-
Method Details
-
load
Loads anHandlerinto theRouteRegistryfor further processing.- Specified by:
loadin interfaceServiceLoader<Handler>- Parameters:
provider- The instance of theHandlerto be loaded.- Returns:
trueif the provider is successfully loaded and registered,falseotherwise.
-