Package com.yahoo.jdisc.application
Class ContainerBuilder
- java.lang.Object
-
- com.yahoo.jdisc.application.ContainerBuilder
-
public class ContainerBuilder extends java.lang.Object
This is the inactive, mutable
Container
. Because it requires references to the application internals, it should always be injected by guice or created by callingContainerActivator.newContainerBuilder()
. Once the builder has been configured, it is activated by callingContainerActivator.activateContainer(ContainerBuilder)
. You may use thesetAppContext(Object)
method to attach an arbitrary object to a Container, which will be available in the correspondingDeactivatedContainer
.- Author:
- Simon Thoresen Hult
-
-
Constructor Summary
Constructors Constructor Description ContainerBuilder(java.lang.Iterable<com.google.inject.Module> guiceModules)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,BindingSet<RequestHandler>>
activateClientBindings()
java.util.Map<java.lang.String,BindingSet<RequestHandler>>
activateServerBindings()
java.lang.Object
appContext()
BindingRepository<RequestHandler>
clientBindings()
BindingRepository<RequestHandler>
clientBindings(java.lang.String setName)
<T> T
getInstance(com.google.inject.Key<T> key)
<T> T
getInstance(java.lang.Class<T> type)
GuiceRepository
guiceModules()
static <T> java.lang.Class<T>
safeClassCast(java.lang.Class<T> baseClass, java.lang.Class<?> someClass)
static java.util.List<java.lang.String>
safeStringSplit(java.lang.Object obj, java.lang.String delim)
BindingRepository<RequestHandler>
serverBindings()
BindingRepository<RequestHandler>
serverBindings(java.lang.String setName)
ServerRepository
serverProviders()
void
setAppContext(java.lang.Object ctx)
-
-
-
Method Detail
-
setAppContext
public void setAppContext(java.lang.Object ctx)
-
appContext
public java.lang.Object appContext()
-
guiceModules
public GuiceRepository guiceModules()
-
getInstance
public <T> T getInstance(com.google.inject.Key<T> key)
-
getInstance
public <T> T getInstance(java.lang.Class<T> type)
-
serverProviders
public ServerRepository serverProviders()
-
serverBindings
public BindingRepository<RequestHandler> serverBindings()
-
serverBindings
public BindingRepository<RequestHandler> serverBindings(java.lang.String setName)
-
activateServerBindings
public java.util.Map<java.lang.String,BindingSet<RequestHandler>> activateServerBindings()
-
clientBindings
public BindingRepository<RequestHandler> clientBindings()
-
clientBindings
public BindingRepository<RequestHandler> clientBindings(java.lang.String setName)
-
activateClientBindings
public java.util.Map<java.lang.String,BindingSet<RequestHandler>> activateClientBindings()
-
safeClassCast
public static <T> java.lang.Class<T> safeClassCast(java.lang.Class<T> baseClass, java.lang.Class<?> someClass)
-
safeStringSplit
public static java.util.List<java.lang.String> safeStringSplit(java.lang.Object obj, java.lang.String delim)
-
-