Class GuiceRegistry
java.lang.Object
com.peterphi.std.guice.apploader.impl.GuiceRegistry
Registry that holds the Injector and the applications currently registered to be injected with the latest Guice
objects.
Uses
Uses
GuiceBuilder
to acquire a GuiceSetup
which defines the Guice Modules to use to build this
environment.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.inject.Injector
void
register
(GuiceApplication service, boolean durable) Request that an application be registered with this GuiceRegistryvoid
restart()
Restart Guice servicesvoid
stop()
Shutdown all services
-
Constructor Details
-
GuiceRegistry
public GuiceRegistry() -
GuiceRegistry
-
-
Method Details
-
getBuilder
-
register
Request that an application be registered with this GuiceRegistry- Parameters:
service
- the service to register (must not be null)durable
- true if the application registration should be durable (durable applications receive lifecycle updates and are reconfigured shouldrestart()
be called
-
getInjector
public com.google.inject.Injector getInjector() -
stop
public void stop()Shutdown all services -
restart
public void restart()Restart Guice services
-