public final class WebApplicationImpl extends Object implements WebApplication
| Constructor and Description |
|---|
WebApplicationImpl() |
| Modifier and Type | Method and Description |
|---|---|
WebApplication |
clone()
Clone the WebApplication instance.
|
void |
destroy()
Destroy the Web application.
|
DispatchingListener |
getDispatchingListener()
Get an instance of
DispatchingListener that should be
used to monitor request processing. |
protected ResourceMethodDispatchProvider |
getDispatchProvider() |
ExceptionMapperContext |
getExceptionMapperContext()
Get the exception mapper context that can be used to map exceptions
to responses.
|
FeaturesAndProperties |
getFeaturesAndProperties()
Get the features and properties.
|
MessageBodyWorkers |
getMessageBodyWorkers()
Get the message body workers that can be used for getting
message body readers and writers.
|
javax.ws.rs.ext.Providers |
getProviders()
Get the providers.
|
RequestListener |
getRequestListener()
Get an instance of
RequestListener that should be
used to monitor request processing. |
ResourceContext |
getResourceContext()
Get the ResourceContext
|
ResponseListener |
getResponseListener()
Get an instance of
ResponseListener that should be
used to monitor request processing. |
ServerInjectableProviderFactory |
getServerInjectableProviderFactory()
Get the server injectable provider factory.
|
HttpContext |
getThreadLocalHttpContext()
Get an instance of
HttpContext that is a proxy to
a thread local instance of HttpContext. |
void |
handleRequest(ContainerRequest request,
ContainerResponse response)
Handle an HTTP request by dispatching the request to the appropriate
matching Web resource that produces the response or otherwise producing
the appropriate HTTP error response.
|
void |
handleRequest(ContainerRequest request,
ContainerResponseWriter responseWriter)
Handle an HTTP request by dispatching the request to the appropriate
matching Web resource that produces the response or otherwise producing
the appropriate HTTP error response.
|
void |
initiate(ResourceConfig resourceConfig)
Initiate the Web application.
|
void |
initiate(ResourceConfig rc,
IoCComponentProviderFactory _provider)
Initiate the Web application.
|
boolean |
isInitiated() |
boolean |
isTracingEnabled()
Check if tracing is enabled.
|
void |
trace(String message)
Add a trace message.
|
public FeaturesAndProperties getFeaturesAndProperties()
WebApplicationgetFeaturesAndProperties in interface WebApplicationpublic WebApplication clone()
WebApplication
A new WebApplication instance will be created that is initiated with
the ResourceConfig and IoCComponentProviderFactory instances
that were used to initiate this WebApplication instance.
clone in interface WebApplicationclone in class Objectprotected ResourceMethodDispatchProvider getDispatchProvider()
public RequestListener getRequestListener()
WebApplicationRequestListener that should be
used to monitor request processing.getRequestListener in interface WebApplicationpublic DispatchingListener getDispatchingListener()
WebApplicationDispatchingListener that should be
used to monitor request processing.getDispatchingListener in interface WebApplicationpublic ResponseListener getResponseListener()
WebApplicationResponseListener that should be
used to monitor request processing.getResponseListener in interface WebApplicationpublic boolean isInitiated()
isInitiated in interface WebApplicationpublic void initiate(ResourceConfig resourceConfig)
WebApplicationThis method can only be called once. Further calls will result in an exception.
initiate in interface WebApplicationresourceConfig - the resource configuration containing the set
of Web resources to be managed by the Web application.public void initiate(ResourceConfig rc, IoCComponentProviderFactory _provider)
WebApplicationThis method can only be called once. Further calls will result in an exception.
initiate in interface WebApplicationrc - the resource configuration containing the set
of Web resources to be managed by the Web application._provider - the IoC component provider factory to use, if null the default
component provider factory will be used.public javax.ws.rs.ext.Providers getProviders()
WebApplicationgetProviders in interface WebApplicationpublic ResourceContext getResourceContext()
WebApplicationgetResourceContext in interface WebApplicationpublic MessageBodyWorkers getMessageBodyWorkers()
WebApplicationgetMessageBodyWorkers in interface WebApplicationpublic ExceptionMapperContext getExceptionMapperContext()
WebApplicationgetExceptionMapperContext in interface WebApplicationpublic ServerInjectableProviderFactory getServerInjectableProviderFactory()
WebApplicationgetServerInjectableProviderFactory in interface WebApplicationpublic void handleRequest(ContainerRequest request, ContainerResponseWriter responseWriter) throws IOException
WebApplicationhandleRequest in interface WebApplicationrequest - the HTTP container request.responseWriter - the HTTP container response writer.IOException - if there is an IO error handling the request.public void handleRequest(ContainerRequest request, ContainerResponse response) throws IOException
WebApplicationhandleRequest in interface WebApplicationrequest - the HTTP container request.response - the HTTP container response.IOException - if there is an IO error handling the request.public void destroy()
WebApplication
This method MUST only be called only once. Calls to handlerRequest
MUST not occur while and after this method has been called.
destroy in interface WebApplicationpublic boolean isTracingEnabled()
TraceableisTracingEnabled in interface Traceablepublic void trace(String message)
Traceable
A trace message will be added if Traceable.isTracingEnabled() returns
true and tracing contraints are satisfied.
public HttpContext getThreadLocalHttpContext()
WebApplicationHttpContext that is a proxy to
a thread local instance of HttpContext.getThreadLocalHttpContext in interface WebApplicationCopyright © 2016 Oracle Corporation. All rights reserved.