|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.server.ApplicationHandler
public final class ApplicationHandler
Jersey server-side application handler.
Container implementations use the ApplicationHandler API to process requests
by invoking the handle(requestContext)
method on a configured application handler instance.
ResourceConfig,
ContainerProvider| Constructor Summary | |
|---|---|
ApplicationHandler()
Create a new Jersey application handler using a default configuration. |
|
ApplicationHandler(Application application)
Create a new Jersey server-side application handler configured by an instance of a JAX-RS Application sub-class. |
|
ApplicationHandler(Class<? extends Application> jaxrsApplicationClass)
Create a new Jersey server-side application handler configured by a JAX-RS Application (sub-)class. |
|
| Method Summary | |
|---|---|
Future<ContainerResponse> |
apply(ContainerRequest requestContext)
Invokes a request and returns the response future. |
Future<ContainerResponse> |
apply(ContainerRequest requestContext,
OutputStream outputStream)
Invokes a request and returns the response future. |
ResourceConfig |
getConfiguration()
Get the application configuration. |
ServiceLocator |
getServiceLocator()
Returns ServiceLocator relevant to current application. |
void |
handle(ContainerRequest requestContext)
The main request/response processing entry point for Jersey container implementations. |
void |
registerAdditionalBinders(Set<Binder> binders)
Registers HK2 binders into the HK2 service register. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ApplicationHandler()
public ApplicationHandler(Class<? extends Application> jaxrsApplicationClass)
JAX-RS Application (sub-)class.
jaxrsApplicationClass - JAX-RS Application (sub-)class that will be
instantiated and used to configure the new Jersey
application handler.public ApplicationHandler(Application application)
JAX-RS Application sub-class.
application - an instance of a JAX-RS Application (sub-)class that
will be used to configure the new Jersey application handler.| Method Detail |
|---|
public void registerAdditionalBinders(Set<Binder> binders)
binders - binders to be registered.public Future<ContainerResponse> apply(ContainerRequest requestContext)
response future.
requestContext - request data.
public Future<ContainerResponse> apply(ContainerRequest requestContext,
OutputStream outputStream)
response future.
requestContext - request data.outputStream - response output stream.
public void handle(ContainerRequest requestContext)
The method invokes the request processing of the provided
container request context and uses the
container response writer to suspend & resume the processing
as well as write the response back to the container.
The the security context stored in the container request context
is bound as an injectable instance in the scope of the processed request context.
Also, any custom scope injections
are initialized in the current request scope.
requestContext - container request context of the current request.public ServiceLocator getServiceLocator()
ServiceLocator relevant to current application.
ServiceLocator instance.public ResourceConfig getConfiguration()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||