public interface CurrentContainer
Container
. Note that a Container
which has not been closed
will actively keep it alive, preventing it
from shutting down when expired. Failure to call close() will eventually lead to an OutOfMemoryError
. A
ServerProvider
should have an instance of this class injected in its constructor, and simply use the appropriate Request constructor
to avoid having to worry about the keep-alive
issue.Modifier and Type | Method and Description |
---|---|
Container |
newReference(URI uri)
Returns a reference to the currently active
Container . |
Container newReference(URI uri)
Container
. Until SharedResource.release()
has been called,
the Container can not shut down.uri
- The identifier used to match this Request to an appropriate ClientProvider
or RequestHandler
. The hostname must be "localhost" or a fully qualified domain name.NoBindingSetSelectedException
- If no BindingSet
was selected by the BindingSetSelector
.BindingSetNotFoundException
- If the named BindingSet was not found.ContainerNotReadyException
- If no active Container was found, this can only happen during initial
setup.Copyright © 2018. All rights reserved.