Package com.yahoo.jdisc.core
Class ActiveContainer
- java.lang.Object
-
- com.yahoo.jdisc.AbstractResource
-
- com.yahoo.jdisc.core.ActiveContainer
-
- All Implemented Interfaces:
CurrentContainer
,SharedResource
public class ActiveContainer extends AbstractResource implements CurrentContainer
- Author:
- Simon Thoresen Hult, bjorncs
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.yahoo.jdisc.SharedResource
SharedResource.Debug
-
-
Field Summary
-
Fields inherited from interface com.yahoo.jdisc.SharedResource
DEBUG, SYSTEM_PROPERTY_NAME_DEBUG
-
-
Constructor Summary
Constructors Constructor Description ActiveContainer(ContainerBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,BindingSet<RequestHandler>>
clientBindings()
BindingSet<RequestHandler>
clientBindings(String setName)
protected void
destroy()
This method signals that this AbstractResource can dispose of any internal resources, and commence with shut down of any internal threads.com.google.inject.Injector
guiceInjector()
com.yahoo.jdisc.core.ContainerSnapshot
newReference(URI uri, Object context)
Returns a reference to the currently activeContainer
.Map<String,BindingSet<RequestHandler>>
serverBindings()
BindingSet<RequestHandler>
serverBindings(String setName)
Iterable<ServerProvider>
serverProviders()
ContainerTermination
shutdown()
-
Methods inherited from class com.yahoo.jdisc.AbstractResource
currentState, refer, refer, release, retainCount
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.yahoo.jdisc.service.CurrentContainer
newReference
-
-
-
-
Constructor Detail
-
ActiveContainer
public ActiveContainer(ContainerBuilder builder)
-
-
Method Detail
-
destroy
protected void destroy()
Description copied from class:AbstractResource
This method signals that this AbstractResource can dispose of any internal resources, and commence with shut down of any internal threads. This will be called once the reference count of this resource reaches zero.
- Overrides:
destroy
in classAbstractResource
-
shutdown
public ContainerTermination shutdown()
-
guiceInjector
public com.google.inject.Injector guiceInjector()
-
serverProviders
public Iterable<ServerProvider> serverProviders()
-
serverBindings
public Map<String,BindingSet<RequestHandler>> serverBindings()
-
serverBindings
public BindingSet<RequestHandler> serverBindings(String setName)
-
clientBindings
public Map<String,BindingSet<RequestHandler>> clientBindings()
-
clientBindings
public BindingSet<RequestHandler> clientBindings(String setName)
-
newReference
public com.yahoo.jdisc.core.ContainerSnapshot newReference(URI uri, Object context)
Description copied from interface:CurrentContainer
Returns a reference to the currently activeContainer
. UntilSharedResource.release()
has been called, the Container can not shut down.- Specified by:
newReference
in interfaceCurrentContainer
- Parameters:
uri
- The identifier used to match this Request to an appropriateClientProvider
orRequestHandler
. The hostname must be "localhost" or a fully qualified domain name.context
- that can be attached for reference tracking- Returns:
- A reference to the current Container.
-
-