-
public interface ServletEndpointContext
TheServletEndpointContext
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 theServiceLifecycle.init
method is required to be of the Java typejavax.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.- Version:
- 1.1
- Author:
- Rahul Sharma, Roberto Chinnici
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description HttpSession
getHttpSession()
ThegetHttpSession
method returns the current HTTP session (as ajavax.servlet.http.HTTPSession
).MessageContext
getMessageContext()
The methodgetMessageContext
returns theMessageContext
targeted for this endpoint instance.ServletContext
getServletContext()
The methodgetServletContext
returns theServletContex
t associated with the web application that contain this endpoint.Principal
getUserPrincipal()
Returns ajava.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".
-
-
-
Method Detail
-
getMessageContext
MessageContext getMessageContext()
The methodgetMessageContext
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
.- Returns:
- MessageContext; If there is no associated
MessageContext
, this method returnsnull
. - Throws:
IllegalStateException
- if this method is invoked outside a remote method implementation by a service endpoint instance.- See Also:
MessageContext
,HandlerChain
,Handler
-
getUserPrincipal
Principal getUserPrincipal()
Returns ajava.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.- Returns:
- 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. - See Also:
Principal
-
getHttpSession
HttpSession getHttpSession()
ThegetHttpSession
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.- Returns:
- The HTTP session associated with the current
invocation or
null
if there is no active session. - Throws:
JAXRPCException
- If this method invoked by any non-HTTP bound endpoint- See Also:
HttpSession
-
getServletContext
ServletContext getServletContext()
The methodgetServletContext
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.- Returns:
ServletContext
- See Also:
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".- Parameters:
role
- aString
specifying the name of the role- Returns:
- 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
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/xml/rpc/server/servletendpointcontext.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.