Class DependencyProvider
java.lang.Object
org.veupathdb.lib.container.jaxrs.providers.DependencyProvider
-
Method Summary
Modifier and TypeMethodDescriptionvoid
closeAndRemove
(String name) Removes and closes the dependency with the given name.static DependencyProvider
boolean
Returns whether there is a dependency registered with the given name.Attempts to fetch a dependency by name.void
register
(Dependency dep) Register a new dependency.void
Registers a source of extra or ephemeral dependencies that should not or cannot be registered normally.void
shutDown()
Attempts to shut down all dependencies currently registered.Runs the test method on all currently registered dependencies and returns a map of the test results keyed on dependency name.
-
Method Details
-
lookup
Attempts to fetch a dependency by name.- Returns:
- An option that will be empty if no dependency was found with the given name.
-
has
Returns whether there is a dependency registered with the given name. -
register
Register a new dependency. -
closeAndRemove
-
registerDependencySource
Registers a source of extra or ephemeral dependencies that should not or cannot be registered normally.- Parameters:
source
- Extra dependency source.
-
testDependencies
Runs the test method on all currently registered dependencies and returns a map of the test results keyed on dependency name. -
shutDown
public void shutDown()Attempts to shut down all dependencies currently registered. -
getInstance
-