|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.server.impl.application.WebApplicationImpl
public final class WebApplicationImpl
A Web application that contains a set of resources, each referenced by an absolute URI template.
Constructor Summary | |
---|---|
WebApplicationImpl()
|
Method Summary | |
---|---|
WebApplication |
clone()
Clone the WebApplication instance. |
void |
destroy()
Destroy the Web application. |
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. |
Providers |
getProviders()
Get the providers. |
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. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebApplicationImpl()
Method Detail |
---|
public FeaturesAndProperties getFeaturesAndProperties()
WebApplication
getFeaturesAndProperties
in interface WebApplication
public 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 WebApplication
clone
in class Object
public boolean isInitiated()
isInitiated
in interface WebApplication
public void initiate(ResourceConfig resourceConfig)
WebApplication
This method can only be called once. Further calls will result in an exception.
initiate
in interface WebApplication
resourceConfig
- the resource configuration containing the set
of Web resources to be managed by the Web application.public void initiate(ResourceConfig rc, IoCComponentProviderFactory _provider)
WebApplication
This method can only be called once. Further calls will result in an exception.
initiate
in interface WebApplication
rc
- 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 Providers getProviders()
WebApplication
getProviders
in interface WebApplication
public MessageBodyWorkers getMessageBodyWorkers()
WebApplication
getMessageBodyWorkers
in interface WebApplication
public ExceptionMapperContext getExceptionMapperContext()
WebApplication
getExceptionMapperContext
in interface WebApplication
public ServerInjectableProviderFactory getServerInjectableProviderFactory()
WebApplication
getServerInjectableProviderFactory
in interface WebApplication
public void handleRequest(ContainerRequest request, ContainerResponseWriter responseWriter) throws IOException
WebApplication
handleRequest
in interface WebApplication
request
- 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
WebApplication
handleRequest
in interface WebApplication
request
- 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 WebApplication
public boolean isTracingEnabled()
Traceable
isTracingEnabled
in interface Traceable
public void trace(String message)
Traceable
A trace message will be added if Traceable.isTracingEnabled()
returns
true and tracing contraints are satisfied.
trace
in interface Traceable
message
- the trace message to add.public HttpContext getThreadLocalHttpContext()
WebApplication
HttpContext
that is a proxy to
a thread local instance of HttpContext
.
getThreadLocalHttpContext
in interface WebApplication
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |