Class JaxrsWhiteboardConstants


  • public final class JaxrsWhiteboardConstants
    extends java.lang.Object
    Defines standard constants for the JAX-RS Whiteboard services.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String JAX_RS_APPLICATION_BASE
      Service property specifying the base URI mapping for a JAX-RS application service.
      static java.lang.String JAX_RS_APPLICATION_SELECT
      Service property specifying the target application for a JAX-RS resource or extension service.
      static java.lang.String JAX_RS_APPLICATION_SERVICE_PROPERTIES
      The property key which can be used to find the application service properties inside an injected Configuration
      static java.lang.String JAX_RS_DEFAULT_APPLICATION
      The name of the default JAX-RS application in every Whiteboard instance.
      static java.lang.String JAX_RS_EXTENSION
      Service property specifying that a JAX-RS resource should be processed by the whiteboard.
      static java.lang.String JAX_RS_EXTENSION_SELECT
      A Service property specifying one or more target filters used to select the set of JAX-RS extension services required to support this whiteboard service.
      static java.lang.String JAX_RS_MEDIA_TYPE
      A service property specifying that a JAX-RS extension service, JAX-RS application service, or JAX-RS Whiteboard implementation provides support for reading from and writing to a specific media type.
      static java.lang.String JAX_RS_NAME
      Service property specifying the name of a JAX-RS whiteboard service.
      static java.lang.String JAX_RS_RESOURCE
      Service property specifying that a JAX-RS resource should be processed by the whiteboard.
      static java.lang.String JAX_RS_WHITEBOARD_IMPLEMENTATION
      The name of the implementation capability for the JAX-RS Whiteboard specification
      static java.lang.String JAX_RS_WHITEBOARD_SPECIFICATION_VERSION
      The version of the implementation capability for the JAX-RS Whiteboard specification
      static java.lang.String JAX_RS_WHITEBOARD_TARGET
      Service property specifying the target filter to select the JAX-RS Whiteboard implementation to process the service.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • JAX_RS_NAME

        public static final java.lang.String JAX_RS_NAME
        Service property specifying the name of a JAX-RS whiteboard service.

        This name is provided as a property on the registered Endpoint service so that the URI for a particular JAX-RS service can be identified. If this service property is not specified, then no Endpoint information will be registered for this resource.

        Resource names must be unique among all services associated with a single Whiteboard implementation. If a clashing name is registered then the lower ranked service will be failed with a cause of DTOConstants.FAILURE_REASON_DUPLICATE_NAME

        The value of this service property must be of type String.

        See Also:
        Constant Field Values
      • JAX_RS_RESOURCE

        public static final java.lang.String JAX_RS_RESOURCE
        Service property specifying that a JAX-RS resource should be processed by the whiteboard.

        The value of this service property must be of type String or Boolean and set to "true" or true.

        See Also:
        Constant Field Values
      • JAX_RS_APPLICATION_BASE

        public static final java.lang.String JAX_RS_APPLICATION_BASE
        Service property specifying the base URI mapping for a JAX-RS application service.

        The specified uri is used to determine whether a request should be mapped to the resource. Services without this service property are ignored.

        The value of this service property must be of type String, and will have a "/" prepended if no "/" exists.

        If two applications are registered with the same base uri then the lower ranked service is failed with a cause of DTOConstants.FAILURE_REASON_SHADOWED_BY_OTHER_SERVICE

        See Also:
        Constant Field Values
      • JAX_RS_APPLICATION_SELECT

        public static final java.lang.String JAX_RS_APPLICATION_SELECT
        Service property specifying the target application for a JAX-RS resource or extension service.

        The specified filter is used to determine whether a resource should be included in a particular application. Services without this service property are bound to the default Application.

        If a filter property is registered and no application running in the whiteboard matches the filter then the service will be failed with a cause of DTOConstants.FAILURE_REASON_REQUIRED_APPLICATION_UNAVAILABLE

        The value of this service property must be of type String, and be a valid OSGi filter.

        See Also:
        Constant Field Values
      • JAX_RS_APPLICATION_SERVICE_PROPERTIES

        public static final java.lang.String JAX_RS_APPLICATION_SERVICE_PROPERTIES
        The property key which can be used to find the application service properties inside an injected Configuration
        See Also:
        Constant Field Values
      • JAX_RS_DEFAULT_APPLICATION

        public static final java.lang.String JAX_RS_DEFAULT_APPLICATION
        The name of the default JAX-RS application in every Whiteboard instance.
        See Also:
        Constant Field Values
      • JAX_RS_EXTENSION

        public static final java.lang.String JAX_RS_EXTENSION
        Service property specifying that a JAX-RS resource should be processed by the whiteboard.

        The value of this service property must be of type String or Boolean and set to "true" or true.

        A service providing this property must be registered as one or more of the following types:

        • MessageBodyReader
        • MessageBodyWriter
        • ContainerRequestFilter
        • ContainerResponseFilter
        • ReaderInterceptor
        • WriterInterceptor
        • ContextResolver
        • ExceptionMapper
        • ParamConverterProvider
        • Feature
        • DynamicFeature

        If a service with this property does not match any of the defined types then it is registered as a failure DTO with the error code DTOConstants.FAILURE_REASON_NOT_AN_EXTENSION_TYPE,

        See Also:
        Constant Field Values
      • JAX_RS_EXTENSION_SELECT

        public static final java.lang.String JAX_RS_EXTENSION_SELECT
        A Service property specifying one or more target filters used to select the set of JAX-RS extension services required to support this whiteboard service.

        A JAX-RS Whiteboard service may require one or more extensions to be available so that it can function. For example a resource which declares that it @Produces("text/json") requires a MessageBodyWriter which supports JSON to be available.

        This service property provides a String+ set of LDAP filters which will be applied to the service properties of all extensions available in the JAX-RS container. If all of the filters are satisfied then this service is eligible to be hosted by the JAX-RS container.

        This service property may be declared by any JAX-RS whiteboard service, whether it is a resource, or an extension.

        If this service property is not specified, then no extensions are required.

        If one or more filter properties are registered and no suitable extension(s) are available then the service will be failed with a cause of DTOConstants.FAILURE_REASON_REQUIRED_EXTENSIONS_UNAVAILABLE

        The value of this service property must be of type String and be a valid filter string.

        See Also:
        Constant Field Values
      • JAX_RS_MEDIA_TYPE

        public static final java.lang.String JAX_RS_MEDIA_TYPE
        A service property specifying that a JAX-RS extension service, JAX-RS application service, or JAX-RS Whiteboard implementation provides support for reading from and writing to a specific media type.

        The value of this property will be one or more media type identifiers, and where possible IANA registered names, such as application/json should be used. The value must not be a wildcard type. Support for multiple media types that use the same suffix should be supported by registering the media type associated with the suffix.

        See Also:
        Constant Field Values
      • JAX_RS_WHITEBOARD_TARGET

        public static final java.lang.String JAX_RS_WHITEBOARD_TARGET
        Service property specifying the target filter to select the JAX-RS Whiteboard implementation to process the service.

        A JAX-RS Whiteboard implementation can define any number of service properties which can be referenced by the target filter. The service properties should always include the osgi.jaxrs.endpoint service property if the endpoint information is known.

        If this service property is not specified, then all JAX-RS Whiteboard implementations can process the service.

        The value of this service property must be of type String and be a valid filter string.

        See Also:
        Constant Field Values
      • JAX_RS_WHITEBOARD_IMPLEMENTATION

        public static final java.lang.String JAX_RS_WHITEBOARD_IMPLEMENTATION
        The name of the implementation capability for the JAX-RS Whiteboard specification
        See Also:
        Constant Field Values
      • JAX_RS_WHITEBOARD_SPECIFICATION_VERSION

        public static final java.lang.String JAX_RS_WHITEBOARD_SPECIFICATION_VERSION
        The version of the implementation capability for the JAX-RS Whiteboard specification
        See Also:
        Constant Field Values