📄 servletendpointcontext.html
字号:
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getMessageContext()"><!-- --></A><H3>getMessageContext</H3><PRE>public <A HREF="../../../../javax/xml/rpc/handler/MessageContext.html" title="interface in javax.xml.rpc.handler">MessageContext</A> <B>getMessageContext</B>()</PRE><DL><DD>The method <code>getMessageContext</code> returns the <code>MessageContext</code> targeted for this endpoint instance. This enables the service endpoint instance to acccess the <code>MessageContext</code> propagated by request <code>HandlerChain</code> (and its contained <code>Handler</code> instances) to the target endpoint instance and to share any SOAP message processing related context. The endpoint instance can access and manipulate the <code>MessageContext</code> and share the SOAP message processing related context with the response <code>HandlerChain</code>.<P><DD><DL><DT><B>Returns:</B><DD>MessageContext; If there is no associated <code>MessageContext</code>, this method returns <code>null</code>.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this method is invoked outside a remote method implementation by a service endpoint instance.<DT><B>See Also:</B><DD><A HREF="../../../../javax/xml/rpc/handler/MessageContext.html" title="interface in javax.xml.rpc.handler"><CODE>MessageContext</CODE></A>, <A HREF="../../../../javax/xml/rpc/handler/HandlerChain.html" title="interface in javax.xml.rpc.handler"><CODE>HandlerChain</CODE></A>, <A HREF="../../../../javax/xml/rpc/handler/Handler.html" title="interface in javax.xml.rpc.handler"><CODE>Handler</CODE></A></DL></DD></DL><HR><A NAME="getUserPrincipal()"><!-- --></A><H3>getUserPrincipal</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/security/Principal.html" title="class or interface in java.security">Principal</A> <B>getUserPrincipal</B>()</PRE><DL><DD>Returns a <code>java.security.Principal</code> instance that contains the name of the authenticated user for the current method invocation on the endpoint instance. This method returns <code>null</code> 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.<P><DD><DL><DT><B>Returns:</B><DD>A <code>java.security.Principal</code> for the authenticated principal associated with the current invocation on the servlet endpoint instance; Returns <code>null</code> if there no authenticated user associated with a method invocation.<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/security/Principal.html" title="class or interface in java.security"><CODE>Principal</CODE></A></DL></DD></DL><HR><A NAME="getHttpSession()"><!-- --></A><H3>getHttpSession</H3><PRE>public <A HREF="../../../../javax/servlet/http/HttpSession.html" title="interface in javax.servlet.http">HttpSession</A> <B>getHttpSession</B>()</PRE><DL><DD>The <code>getHttpSession</code> method returns the current HTTP session (as a <code>javax.servlet.http.HTTPSession</code>). When invoked by the service endpoint within a remote method implementation, the <code>getHttpSession</code> returns the HTTP session associated currently with this method invocation. This method returns <code>null</code> 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. <p>The getHttpSession method throws <code>JAXRPCException</code> if invoked by an non HTTP bound endpoint.<P><DD><DL><DT><B>Returns:</B><DD>The HTTP session associated with the current invocation or <code>null</code> if there is no active session.<DT><B>Throws:</B><DD><CODE>JAXRPCException</CODE> - If this method invoked by any non-HTTP bound endpoint<DT><B>See Also:</B><DD><A HREF="../../../../javax/servlet/http/HttpSession.html" title="interface in javax.servlet.http"><CODE>HttpSession</CODE></A></DL></DD></DL><HR><A NAME="getServletContext()"><!-- --></A><H3>getServletContext</H3><PRE>public <A HREF="../../../../javax/servlet/ServletContext.html" title="interface in javax.servlet">ServletContext</A> <B>getServletContext</B>()</PRE><DL><DD>The method <code>getServletContext</code> returns the <code>ServletContex</code>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.<P><DD><DL><DT><B>Returns:</B><DD><code>ServletContext</code><DT><B>See Also:</B><DD><A HREF="../../../../javax/servlet/ServletContext.html" title="interface in javax.servlet"><CODE>ServletContext</CODE></A></DL></DD></DL><HR><A NAME="isUserInRole(java.lang.String)"><!-- --></A><H3>isUserInRole</H3><PRE>public boolean <B>isUserInRole</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> role)</PRE><DL><DD>Returns a boolean indicating whether the authenticated user for the current method invocation on the endpoint instance is included in the specified logical "role".<P><DD><DL><DT><B>Parameters:</B><DD><CODE>role</CODE> - a <code>String</code> specifying the name of the role<DT><B>Returns:</B><DD>a <code>boolean</code> indicating whether the authenticated user associated with the current method invocation belongs to a given role; <code>false</code> if the user has not been authenticated</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../javax/xml/rpc/server/ServiceLifecycle.html" title="interface in javax.xml.rpc.server"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="ServletEndpointContext.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -