Interface ApplicationProvider

  • All Known Implementing Classes:
    BaseApplicationProvider

    public interface ApplicationProvider
    This is an OSGi service interface for registering Restlet applications with a server servlet. Users are expected to register an instance as an OSGi service. It is recommended that you use the BaseApplicationProvider implementation. You may extend it if necessary, or for complete control, provide your own implementation of ApplicationProvider. A server servlet will be created and registered with the web container at the specified alias. The application will then be registered with the servlet.
    Author:
    Bryan Hunt, Wolfgang Werner
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SERVLET_CONFIG_ATTRIBUTE
      The key constant that may be used to look up the ServletConfig instance from the child context
      static java.lang.String SERVLET_CONTEXT_ATTRIBUTE
      The key constant that may be used to look up the ServletContext instance from the child context
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.restlet.Application createApplication​(org.restlet.Context context)  
      java.lang.String getAlias()
      The alias is passed to HttpService.registerServlet(String alias, Servlet servlet, Dictionary initparams, HttpContext context) when the servlet is registered.
      org.osgi.service.http.HttpContext getContext()
      The context is passed to HttpService.registerServlet(String alias, Servlet servlet, Dictionary initparams, HttpContext context) when the servlet is registered.
      java.util.Dictionary<java.lang.String,​java.lang.Object> getInitParms()
      The parameters are passed to HttpService.registerServlet(String alias, Servlet servlet, Dictionary initparams, HttpContext context) when the servlet is registered.
    • Field Detail

      • SERVLET_CONFIG_ATTRIBUTE

        static final java.lang.String SERVLET_CONFIG_ATTRIBUTE
        The key constant that may be used to look up the ServletConfig instance from the child context
        See Also:
        Constant Field Values
      • SERVLET_CONTEXT_ATTRIBUTE

        static final java.lang.String SERVLET_CONTEXT_ATTRIBUTE
        The key constant that may be used to look up the ServletContext instance from the child context
        See Also:
        Constant Field Values
    • Method Detail

      • createApplication

        org.restlet.Application createApplication​(org.restlet.Context context)
        Returns:
        the application to be register at the specified alias.
      • getAlias

        java.lang.String getAlias()
        The alias is passed to HttpService.registerServlet(String alias, Servlet servlet, Dictionary initparams, HttpContext context) when the servlet is registered.
        Returns:
        the alias used to register with the server servlet.
      • getContext

        org.osgi.service.http.HttpContext getContext()
        The context is passed to HttpService.registerServlet(String alias, Servlet servlet, Dictionary initparams, HttpContext context) when the servlet is registered.
        Returns:
        the context to use with the server servlet.
      • getInitParms

        java.util.Dictionary<java.lang.String,​java.lang.Object> getInitParms()
        The parameters are passed to HttpService.registerServlet(String alias, Servlet servlet, Dictionary initparams, HttpContext context) when the servlet is registered.
        Returns:
        the initialization parameters to use with the server servlet.