Package com.yahoo.jdisc.service
Interface CurrentContainer
-
- All Known Implementing Classes:
ActiveContainer
,ApplicationLoader
,TestDriver
public interface CurrentContainer
This interface declares a method to retrieve a reference to the currentContainer
. Note that aContainer
which has not beenclosed
will actively keep it alive, preventing it from shutting down when expired. Failure to call close() will eventually lead to anOutOfMemoryError
. AServerProvider
should have an instance of this class injected in its constructor, and simply use theappropriate Request constructor
to avoid having to worry about the keep-alive issue.- Author:
- Simon Thoresen Hult
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Container
newReference(URI uri)
default Container
newReference(URI uri, Object context)
Returns a reference to the currently activeContainer
.
-
-
-
Method Detail
-
newReference
default Container newReference(URI uri, Object context)
Returns a reference to the currently activeContainer
. UntilSharedResource.release()
has been called, the Container can not shut down.- 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.
- Throws:
NoBindingSetSelectedException
- If noBindingSet
was selected by theBindingSetSelector
.BindingSetNotFoundException
- If the named BindingSet was not found.ContainerNotReadyException
- If no active Container was found, this can only happen during initial setup.
-
-