org.glassfish.jersey.server.spi
Interface ContainerRequestContext

All Known Implementing Classes:
JerseyContainerRequestContext

public interface ContainerRequestContext

Request context passed by the container to the JerseyApplication for each request.

Author:
Marek Potociar (marek.potociar at oracle.com)

Method Summary
 javax.ws.rs.core.Request getRequest()
          Get the processed request.
 RequestScopedInitializer getRequestScopedInitializer()
          Custom container extensions initializer for the current request.
 ContainerResponseWriter getResponseWriter()
          Get the container response writer for the current request.
 javax.ws.rs.core.SecurityContext getSecurityContext()
          Get the security context of the current request.
 

Method Detail

getRequest

javax.ws.rs.core.Request getRequest()
Get the processed request.

Returns:
current request. Must not be null.

getResponseWriter

ContainerResponseWriter getResponseWriter()
Get the container response writer for the current request.

Returns:
container response writer. Must not be null.

getSecurityContext

javax.ws.rs.core.SecurityContext getSecurityContext()
Get the security context of the current request. The SecurityContext.getUserPrincipal() must return null if the current request has not been authenticated by the container.

Returns:
security context. Must not be null.

getRequestScopedInitializer

RequestScopedInitializer getRequestScopedInitializer()
Custom container extensions initializer for the current request. The initializer is guaranteed to be run from within the request scope of the current request.

Returns:
custom container extensions initializer or null if not available.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.