|
||||||||||
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 Web resource.
Method Summary | |
---|---|
void |
addInjectable(java.lang.reflect.Type fieldType,
Injectable injectable)
Add an injectable resource to the set maintained by the application. |
ComponentProvider |
getComponentProvider()
Get the component provider that can be used for instantiating components. |
MessageBodyContext |
getMessageBodyContext()
Get the message body context that can be used for getting message body readers and writers. |
HttpContextAccess |
getThreadLocalHttpContext()
Get an instance of HttpContextAccess that is a proxy to
a thread local instance of HttpContextAccess . |
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 |
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.MessageBodyContext getMessageBodyContext()
ComponentProvider getComponentProvider()
void addInjectable(java.lang.reflect.Type fieldType, Injectable injectable)
fieldType
- the type of the field that will be injectedinjectable
- the injectable for the fieldHttpContextAccess getThreadLocalHttpContext()
HttpContextAccess
that is a proxy to
a thread local instance of HttpContextAccess
.
void handleRequest(ContainerRequest request, ContainerResponse response) throws ContainerException
request
- the HTTP container request.response
- the HTTP container response.
ContainerException
- if there is an error that the container
should manage.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |