javax.ws.rs.ext

Class RuntimeDelegate


  • public abstract class RuntimeDelegate
    extends Object
    Implementations of JAX-RS provide a concrete subclass of RuntimeDelegate and various JAX-RS API methods defer to methods of RuntimeDelegate for their functionality. Regular users of JAX-RS are not expected to use this class directly and overriding an implementation of this class with a user supplied subclass may cause unexpected behavior.
    Since:
    1.0
    Author:
    Paul Sandoz, Marc Hadley
    • Constructor Detail

      • RuntimeDelegate

        protected RuntimeDelegate()
        Allows custom implementations to extend the RuntimeDelegate class.
    • Method Detail

      • getInstance

        public static RuntimeDelegate getInstance()
        Obtain a RuntimeDelegate instance. If an instance had not already been created and set via setInstance(RuntimeDelegate), the first invocation will create an instance which will then be cached for future use.

        The algorithm used to locate the RuntimeDelegate subclass to use consists of the following steps:

        • If a resource with the name of META-INF/services/javax.ws.rs.ext.RuntimeDelegate exists, then its first line, if present, is used as the UTF-8 encoded name of the implementation class.
        • If the $java.home/lib/jaxrs.properties file exists and it is readable by the java.util.Properties.load(InputStream) method and it contains an entry whose key is javax.ws.rs.ext.RuntimeDelegate, then the value of that entry is used as the name of the implementation class.
        • If a system property with the name javax.ws.rs.ext.RuntimeDelegate is defined, then its value is used as the name of the implementation class.
        • Finally, a default implementation class name is used.
        Returns:
        an instance of RuntimeDelegate.
      • setInstance

        public static void setInstance(RuntimeDelegate rd)
        Set the runtime delegate that will be used by JAX-RS classes. If this method is not called prior to getInstance() then an implementation will be sought as described in getInstance().
        Parameters:
        rd - the runtime delegate instance
        Throws:
        SecurityException - if there is a security manager and the permission ReflectPermission("suppressAccessChecks") has not been granted.
      • createUriBuilder

        public abstract UriBuilder createUriBuilder()
        Create a new instance of a UriBuilder.
        Returns:
        new UriBuilder instance.
        See Also:
        UriBuilder
      • createEndpoint

        public abstract <T> T createEndpoint(Application application,
                                             Class<T> endpointType)
                                      throws IllegalArgumentException,
                                             UnsupportedOperationException
        Create a configured instance of the supplied endpoint type. How the returned endpoint instance is published is dependent on the type of endpoint.
        Type Parameters:
        T - endpoint type.
        Parameters:
        application - the application configuration.
        endpointType - the type of endpoint instance to be created.
        Returns:
        a configured instance of the requested type.
        Throws:
        IllegalArgumentException - if application is null or the requested endpoint type is not supported.
        UnsupportedOperationException - if the implementation supports no endpoint types.

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 18:34:10 Cette version de la page est en cache (à la date du 21/08/2025 18:34:10) 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 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/ws/rs/ext/runtimedelegate.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

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.