|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WebApplication
A Web application that manages a set of resource classes.
The web application will dispatch HTTP requests to the matching resource method on the matching resource class.
Method Summary | |
---|---|
WebApplication |
clone()
Clone the WebApplication instance. |
ComponentProvider |
getComponentProvider()
Get the component provider that can be used for instantiating components other than resource classes. |
MessageBodyWorkers |
getMessageBodyWorkers()
Get the message body workers that can be used for getting message body readers and writers. |
ComponentProvider |
getResourceComponentProvider()
Get the component provider that can be used for instantiating resource classes. |
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 resourceConfig,
ComponentProvider provider)
Initiate the Web application. |
Method Detail |
---|
void initiate(ResourceConfig resourceConfig) throws java.lang.IllegalArgumentException, ContainerException
This method can only be called once. Further calls will result in an exception.
resourceConfig
- the resource configuration containing the set
of Web resources to be managed by the Web application.
java.lang.IllegalArgumentException
- if resourceConfig is null.
ContainerException
- if a second or further call to the method
is invoked.void initiate(ResourceConfig resourceConfig, ComponentProvider provider) throws java.lang.IllegalArgumentException, ContainerException
This method can only be called once. Further calls will result in an exception.
resourceConfig
- the resource configuration containing the set
of Web resources to be managed by the Web application.provider
- the component provider to use, if null the default
component provider will be used.
java.lang.IllegalArgumentException
- if resourceConfig is null.
ContainerException
- if a second or further call to the method
is invoked.WebApplication clone()
A new WebApplication instance will be created that is initiated with
the ResourceConfig
and ComponentProvider
instances
that were used to initiate this WebApplication instance.
MessageBodyWorkers getMessageBodyWorkers()
ComponentProvider getComponentProvider()
ComponentProvider getResourceComponentProvider()
HttpContext getThreadLocalHttpContext()
HttpContext
that is a proxy to
a thread local instance of HttpContext
.
void handleRequest(ContainerRequest request, ContainerResponseWriter responseWriter) throws java.io.IOException
request
- the HTTP container request.responseWriter
- the HTTP container response writer.
java.io.IOException
- if there is an IO error handling the request.void handleRequest(ContainerRequest request, ContainerResponse response) throws java.io.IOException
request
- the HTTP container request.response
- the HTTP container response.
java.io.IOException
- if there is an IO error handling the request.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |