Class JaxRsApplication

  • All Implemented Interfaces:
    Uniform

    @Deprecated
    public class JaxRsApplication
    extends Application
    Deprecated.
    Will be removed in next minor release.

    This is the main class to be used for the instantiation of a JAX-RS runtime environment.

    To set up a JAX-RS runtime environment you should instantiate a JaxRsApplication(Context).

    At least add the JaxRsApplication to a Component.

    Concurrency note: instances of this class or its subclasses can be invoked by several threads at the same time and therefore must be thread-safe. You should be especially careful when storing state in member variables.
    • Constructor Detail

      • JaxRsApplication

        public JaxRsApplication()
        Deprecated.
        Creates an new JaxRsApplication.
        See Also:
        JaxRsApplication(Context)
      • JaxRsApplication

        public JaxRsApplication​(Context context)
        Deprecated.
        Creates an new JaxRsApplication. Attach JAX-RS-Applications by using add(Application).
        Parameters:
        context - The application's dedicated context based on the protected parent component's context.
      • JaxRsApplication

        public JaxRsApplication​(Context context,
                                javax.ws.rs.core.Application appConfig)
                         throws java.lang.IllegalArgumentException
        Deprecated.
        Creates an new JaxRsApplication. Attach JAX-RS-Applications by using add(Application).
        Parameters:
        context - The application's dedicated context based on the protected parent component's context.
        appConfig -
        Throws:
        java.lang.IllegalArgumentException
      • JaxRsApplication

        public JaxRsApplication​(javax.ws.rs.core.Application appConfig)
                         throws java.lang.IllegalArgumentException
        Deprecated.
        Parameters:
        appConfig -
        Throws:
        java.lang.IllegalArgumentException
    • Method Detail

      • add

        public boolean add​(javax.ws.rs.core.Application appConfig)
                    throws java.lang.IllegalArgumentException
        Deprecated.

        Attaches a JAX-RS Application to this JaxRsApplication.
        The providers are available for all root resource classes provided to this JaxRsApplication. If you won't mix them, instantiate another JaxRsApplication.

        Parameters:
        appConfig - Contains the classes to load as root resource classes and as providers. Invalid root resource classes and provider classes are ignored, according to JAX-RS specification.
        Returns:
        true, if all resource classes and providers could be added, or false at least one could not be added. Exceptions were logged.
        Throws:
        java.lang.IllegalArgumentException - if the given appConfig is null.
      • createInboundRoot

        public Restlet createInboundRoot()
        Deprecated.
        Description copied from class: Application
        Creates a inbound root Restlet that will receive all incoming calls. In general, instances of Router, Filter or Finder classes will be used as initial application Restlet. The default implementation returns null by default. This method is intended to be overridden by subclasses.
        Overrides:
        createInboundRoot in class Application
        Returns:
        The inbound root Restlet.
      • getObjectFactory

        public ObjectFactory getObjectFactory()
        Deprecated.
        Returns the ObjectFactory for root resource class and provider instantiation, if given.
        Returns:
        the ObjectFactory for root resource class and provider instantiation, if given.
      • getRootResources

        public java.util.Collection<java.lang.Class<?>> getRootResources()
        Deprecated.
        Returns an unmodifiable set with the attached root resource classes.
        Returns:
        an unmodifiable set with the attached root resource classes.
      • getRootUris

        public java.util.Collection<java.lang.String> getRootUris()
        Deprecated.
        Returns an unmodifiable set of supported URIs (relative to this Application).
        Returns:
        an unmodifiable set of supported URIs (relative).
      • setApplications

        public void setApplications​(java.util.Collection<javax.ws.rs.core.Application> apps)
        Deprecated.
        Adds the given applications to the available applications.
        Parameters:
        apps -
      • setContext

        public void setContext​(Context context)
        Deprecated.
        Description copied from class: Restlet
        Sets the context.
        Overrides:
        setContext in class Application
        Parameters:
        context - The context.
      • setObjectFactory

        public void setObjectFactory​(ObjectFactory objectFactory)
        Deprecated.
        Sets the ObjectFactory for root resource class and provider instantiation.
        Parameters:
        objectFactory - the ObjectFactory for root resource class and provider instantiation.