Class ResourceInjectingApplication

  • All Implemented Interfaces:
    org.restlet.Uniform

    public abstract class ResourceInjectingApplication
    extends org.restlet.Application
    Application with support for creating Router instances that arrange for member injection of resource instances.
    Author:
    Tim Peierls
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.restlet.resource.Finder createFinder​(java.lang.Class<? extends org.restlet.resource.ServerResource> targetClass)  
      org.restlet.routing.Router newRouter()
      Returns a new instance of Router linked to this application.
      static org.restlet.resource.Finder wrapFinderWithMemberInjection​(org.restlet.resource.Finder finder, org.restlet.ext.guice.SelfInjectingServerResource.MembersInjector membersInjector)
      Wraps a Finder returned by createFinder(Class) to do member injection using the passed in MembersInjector.
      • Methods inherited from class org.restlet.Application

        createInboundRoot, createOutboundRoot, getConnectorService, getConnegService, getConverterService, getCurrent, getDecoderService, getEncoderService, getInboundRoot, getMetadataService, getOutboundRoot, getRangeService, getRole, getRoles, getServices, getStatusService, getTaskService, getTunnelService, handle, isDebugging, setConnectorService, setConnegService, setContext, setConverterService, setCurrent, setDebugging, setDecoderService, setEncoderService, setInboundRoot, setInboundRoot, setMetadataService, setOutboundRoot, setOutboundRoot, setRangeService, setRoles, setStatusService, setTaskService, setTunnelService, start, stop
      • Methods inherited from class org.restlet.Restlet

        finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setDescription, setFinderClass, setName, setOwner
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResourceInjectingApplication

        public ResourceInjectingApplication()
    • Method Detail

      • wrapFinderWithMemberInjection

        public static org.restlet.resource.Finder wrapFinderWithMemberInjection​(org.restlet.resource.Finder finder,
                                                                                org.restlet.ext.guice.SelfInjectingServerResource.MembersInjector membersInjector)
        Wraps a Finder returned by createFinder(Class) to do member injection using the passed in MembersInjector.
        Parameters:
        finder - The finder.
        membersInjector - The instance of MembersInjector.
        Returns:
        A wrapped Finder.
      • createFinder

        public org.restlet.resource.Finder createFinder​(java.lang.Class<? extends org.restlet.resource.ServerResource> targetClass)
        Overrides:
        createFinder in class org.restlet.Restlet
      • newRouter

        public org.restlet.routing.Router newRouter()
        Returns a new instance of Router linked to this application.
        Returns:
        A new instance of Router.