Class GuicedRestlet

  • All Implemented Interfaces:
    org.restlet.Uniform

    public class GuicedRestlet
    extends org.restlet.resource.Finder
    Extends the Restlet Finder to use Guice to create an instance of the specified ServerResource class.
    Since:
    12.0.0
    • Constructor Summary

      Constructors 
      Constructor Description
      GuicedRestlet​(org.restlet.Context context, Class<? extends org.restlet.resource.ServerResource> serverResource)
      Constructs a new GuicedRestlet.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.restlet.resource.ServerResource create​(org.restlet.Request request, org.restlet.Response response)
      Creates an instance of the ServerResource specified at construction.
      • Methods inherited from class org.restlet.resource.Finder

        create, createFinder, find, getTargetClass, handle, setTargetClass, toString
      • Methods inherited from class org.restlet.Restlet

        createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner, start, stop
    • Constructor Detail

      • GuicedRestlet

        public GuicedRestlet​(org.restlet.Context context,
                             Class<? extends org.restlet.resource.ServerResource> serverResource)
        Constructs a new GuicedRestlet.
        Parameters:
        context - The Restlet context.
        serverResource - The ServerResource class to create.
    • Method Detail

      • create

        public org.restlet.resource.ServerResource create​(org.restlet.Request request,
                                                          org.restlet.Response response)
        Creates an instance of the ServerResource specified at construction.
        Overrides:
        create in class org.restlet.resource.Finder
        Parameters:
        request -
        response -
        Returns: