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()

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/ws/rs/core/Configuration.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

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com, Configuration (Java(TM) EE 7 Specification APIs)

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.