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.

    Version:
    1.1
    Author:
    Rahul Sharma, Roberto Chinnici
    • Method Detail

      • getMessageContext

        MessageContext getMessageContext()
        The method getMessageContext returns the MessageContext targeted for this endpoint instance. This enables the service endpoint instance to acccess the MessageContext propagated by request HandlerChain (and its contained Handler instances) to the target endpoint instance and to share any SOAP message processing related context. The endpoint instance can access and manipulate the MessageContext and share the SOAP message processing related context with the response HandlerChain.
        Returns:
        MessageContext; If there is no associated MessageContext, this method returns null.
        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 a java.security.Principal instance that contains the name of the authenticated user for the current method invocation on the endpoint instance. This method returns null 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; Returns null if there no authenticated user associated with a method invocation.
        See Also:
        Principal
      • getHttpSession

        HttpSession getHttpSession()
        The getHttpSession method returns the current HTTP session (as a javax.servlet.http.HTTPSession). When invoked by the service endpoint within a remote method implementation, the getHttpSession returns the HTTP session associated currently with this method invocation. This method returns null 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 method getServletContext returns the 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.
        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 - a String 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

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

21/08/2025 21:32:48 Cette version de la page est en cache (à la date du 21/08/2025 21:32:48) afin d'accélérer le traitement.
Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.

Document créé le 18/04/2008, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/xml/rpc/server/servletendpointcontext.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, ServletEndpointContext

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.