Class MiddlewareHandlerLoader
java.lang.Object
de.craftsblock.craftsnet.addon.services.builtin.handlers.MiddlewareHandlerLoader
- All Implemented Interfaces:
ServiceLoader<Middleware>
A concrete implementation of the
ServiceLoader interface for managing instances of Middleware.
This class specifically focuses on loading instances of Middleware into the MiddlewareRegistry.- Since:
- 3.4.0-SNAPSHOT
-
Constructor Summary
ConstructorsConstructorDescriptionMiddlewareHandlerLoader(CraftsNet craftsNet) Creates a new instance ofMiddlewareHandlerLoader. -
Method Summary
Modifier and TypeMethodDescriptionbooleanload(Middleware provider) Loads anMiddlewareinto theMiddlewareRegistryfor 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
-
MiddlewareHandlerLoader
Creates a new instance ofMiddlewareHandlerLoader.- Parameters:
craftsNet- The instance ofCraftsNetthat theMiddlewareHandlerLoaderwas registered on.
-
-
Method Details
-
load
Loads anMiddlewareinto theMiddlewareRegistryfor further processing.- Specified by:
loadin interfaceServiceLoader<Middleware>- Parameters:
provider- The instance of theMiddlewareto be loaded.- Returns:
trueif the provider is successfully loaded and registered,falseotherwise.
-