|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个 CLASS | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
javax.xml.rpc.server Interface ServletEndpointContext
public interface ServletEndpointContext
The 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
javax.xml.rpc.server.ServletEndpointContext
.
A servlet container based JAX-RPC runtime system implements
the 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.
- 版本:
- 1.1
- 作者:
- Rahul Sharma, Roberto Chinnici
方法摘要 | |
---|---|
HttpSession |
getHttpSession()
The getHttpSession method returns the current
HTTP session (as a javax.servlet.http.HTTPSession ). |
MessageContext |
getMessageContext()
The method getMessageContext returns the
MessageContext targeted for this endpoint instance. |
ServletContext |
getServletContext()
The method getServletContext returns the
ServletContex t associated with the web
application that contain this endpoint. |
Principal |
getUserPrincipal()
Returns a java.security.Principal instance that
contains the name of the authenticated user for the current
method invocation on the endpoint instance. |
boolean |
isUserInRole(String role)
Returns a boolean indicating whether the authenticated user for the current method invocation on the endpoint instance is included in the specified logical "role". |
方法详细信息 |
---|
getMessageContext
MessageContext getMessageContext()
- The method
getMessageContext
returns theMessageContext
targeted for this endpoint instance. This enables the service endpoint instance to acccess theMessageContext
propagated by requestHandlerChain
(and its containedHandler
instances) to the target endpoint instance and to share any SOAP message processing related context. The endpoint instance can access and manipulate theMessageContext
and share the SOAP message processing related context with the responseHandlerChain
. - 返回:
- MessageContext; If there is no associated
MessageContext
, this method returnsnull
. - 抛出异常:
IllegalStateException
- if this method is invoked outside a remote method implementation by a service endpoint instance.- 另请参见:
MessageContext
,HandlerChain
,Handler
getUserPrincipal
Principal getUserPrincipal()
- Returns a
java.security.Principal
instance that contains the name of the authenticated user for the current method invocation on the endpoint instance. This method returnsnull
if 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. - 返回:
- A
java.security.Principal
for the authenticated principal associated with the current invocation on the servlet endpoint instance; Returnsnull
if there no authenticated user associated with a method invocation. - 另请参见:
Principal
getHttpSession
HttpSession getHttpSession()
- The
getHttpSession
method returns the current HTTP session (as ajavax.servlet.http.HTTPSession
). When invoked by the service endpoint within a remote method implementation, thegetHttpSession
returns the HTTP session associated currently with this method invocation. This method returnsnull
if 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
JAXRPCException
if invoked by an non HTTP bound endpoint. - 返回:
- The HTTP session associated with the current
invocation or
null
if there is no active session. - 抛出异常:
JAXRPCException
- If this method invoked by any non-HTTP bound endpoint- 另请参见:
HttpSession
getServletContext
ServletContext getServletContext()
- The method
getServletContext
returns theServletContex
t 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. - 返回:
ServletContext
- 另请参见:
ServletContext
isUserInRole
boolean isUserInRole(String role)
- Returns a boolean indicating whether the authenticated user
for the current method invocation on the endpoint instance
is included in the specified logical "role".
- 参数:
role
- aString
specifying the name of the role- 返回:
- a
boolean
indicating whether the authenticated user associated with the current method invocation belongs to a given role;false
if the user has not been authenticated
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个 CLASS | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
提交错误或意见
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.