public interface ServletEndpointContext
ServletEndpointContext provides an endpoint
context maintained by the underlying servlet container based
JAX-RPC runtime system. For service endpoints deployed on a
servlet container based JAX-RPC runtime system, the context
parameter in the
ServiceLifecycle.init method is
required to be of the Java type
A servlet container based JAX-RPC runtime system implements
ServletEndpointContext interface. The JAX-RPC
runtime system is required to provide appropriate session,
message context, servlet context and user principal information
per method invocation on the endpoint class.
Returns a boolean indicating whether the authenticated user for the current method invocation on the endpoint instance is included in the specified logical "role".
MessageContexttargeted for this endpoint instance. This enables the service endpoint instance to acccess the
MessageContextpropagated by request
HandlerChain(and its contained
Handlerinstances) to the target endpoint instance and to share any SOAP message processing related context. The endpoint instance can access and manipulate the
MessageContextand share the SOAP message processing related context with the response
java.security.Principalinstance that contains the name of the authenticated user for the current method invocation on the endpoint instance. This method returns
nullif there is no associated principal yet. The underlying JAX-RPC runtime system takes the responsibility of providing the appropriate authenticated principal for a remote method invocation on the service endpoint instance.
java.security.Principalfor the authenticated principal associated with the current invocation on the servlet endpoint instance; Returns
nullif there no authenticated user associated with a method invocation.
getHttpSessionmethod returns the current HTTP session (as a
javax.servlet.http.HTTPSession). When invoked by the service endpoint within a remote method implementation, the
getHttpSessionreturns the HTTP session associated currently with this method invocation. This method returns
nullif there is no HTTP session currently active and associated with this service endpoint. An endpoint class should not rely on an active HTTP session being always there; the underlying JAX-RPC runtime system is responsible for managing whether or not there is an active HTTP session.
The getHttpSession method throws
if invoked by an non HTTP bound endpoint.
nullif there is no active session.
JAXRPCException- If this method invoked by any non-HTTP bound endpoint
ServletContext associated with the web application that contain this endpoint. According to the Servlet specification, There is one context per web application (installed as a WAR) per JVM . A servlet based service endpoint is deployed as part of a web application.
boolean isUserInRole(java.lang.String role)
Stringspecifying the name of the role
booleanindicating whether the authenticated user associated with the current method invocation belongs to a given role;
falseif the user has not been authenticated