javax.ws.rs.core

Interface Configuration


  • public interface Configuration
    A configuration state associated with a configurable JAX-RS context. Defines the components as well as additional meta-data for the configured context.

    A configuration state may be used to retrieve configuration information about of the associated JAX-RS context (e.g. application, resource method, etc.) or component (e.g. Client, WebTarget, etc.). Configuration information consists of properties, registered JAX-RS component classes and/or instances.

    This interface can be injected using the Context annotation.

    Since:
    2.0
    Author:
    Marek Potociar
    • Method Detail

      • getRuntimeType

        RuntimeType getRuntimeType()
        Get the runtime type of this configuration context.
        Returns:
        configuration context runtime type.
      • getProperties

        Map<String,Object> getProperties()
        Get the immutable bag of configuration properties.
        Returns:
        the immutable view of configuration properties.
      • getProperty

        Object getProperty(String name)
        Get the value for the property with a given name.
        Parameters:
        name - property name.
        Returns:
        the property value for the specified property name or null if the property with such name is not configured.
      • isEnabled

        boolean isEnabled(Feature feature)
        Check if a particular feature instance has been previously enabled in the runtime configuration context.

        Method returns true only in case an instance equal to the feature instance is already present among the features previously successfully enabled in the configuration context.

        Parameters:
        feature - a feature instance to test for.
        Returns:
        true if the feature instance has been previously enabled in this configuration context, false otherwise.
      • isEnabled

        boolean isEnabled(Class<? extends Feature> featureClass)
        Check if a feature instance of featureClass class has been previously enabled in the runtime configuration context.

        Method returns true in case any instance of the featureClass class is already present among the features previously successfully enabled in the configuration context.

        Parameters:
        featureClass - a feature class to test for.
        Returns:
        true if a feature of a given class has been previously enabled in this configuration context, false otherwise.
      • isRegistered

        boolean isRegistered(Object component)
        Check if a particular JAX-RS component instance (such as providers or features) has been previously registered in the runtime configuration context.

        Method returns true only in case an instance equal to the component instance is already present among the components previously registered in the configuration context.

        Parameters:
        component - a component instance to test for.
        Returns:
        true if the component instance has been previously registered in this configuration context, false otherwise.
        See Also:
        isEnabled(Feature)
      • isRegistered

        boolean isRegistered(Class<?> componentClass)
        Check if a JAX-RS component of the supplied componentClass class has been previously registered in the runtime configuration context.

        Method returns true in case a component of the supplied componentClass class is already present among the previously registered component classes or instances in the configuration context.

        Parameters:
        componentClass - a component class to test for.
        Returns:
        true if a component of a given class has been previously registered in this configuration context, false otherwise.
        See Also:
        isEnabled(Class)
      • getContracts

        Map<Class<?>,Integer> getContracts(Class<?> componentClass)
        Get the extension contract registration information for a component of a given class. For component classes that are not configured in this configuration context the method returns an empty Map. Method does not return null.
        Returns:
        map of extension contracts and their priorities for which the component class is registered. May return an empty map in case the component has not been registered for any extension contract supported by the implementation.
      • getClasses

        Set<Class<?>> getClasses()
        Get the immutable set of registered JAX-RS component (such as provider or feature) classes to be instantiated, injected and utilized in the scope of the configurable instance.

        For each component type, there can be only a single class-based or instance-based registration present in the configuration context at any given time.

        Returns:
        the immutable set of registered JAX-RS component classes. The returned value may be empty but will never be null.
        See Also:
        getInstances()
      • getInstances

        Set<Object> getInstances()
        Get the immutable set of registered JAX-RS component (such as provider or feature) instances to be utilized by the configurable instance. Fields and properties of returned instances are injected with their declared dependencies (see Context) by the runtime prior to use.

        For each component type, there can be only a single class-based or instance-based registration present in the configuration context at any given time.

        Returns:
        the immutable set of registered JAX-RS component instances. The returned value may be empty but will never be null.
        See Also:
        getClasses()

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 18/08/2025 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-javaee-rf-javax/ws/rs/core/configuration.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur van deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.