Restlet Framework 2.2.2
OSGi Environments

org.restlet.ext.guice
Class ResourceInjectingApplication

java.lang.Object
  extended by org.restlet.Restlet
      extended by org.restlet.Application
          extended by org.restlet.ext.guice.ResourceInjectingApplication
All Implemented Interfaces:
Uniform

public abstract class ResourceInjectingApplication
extends Application

Application with support for creating Router instances that arrange for member injection of resource instances.

Author:
Tim Peierls

Constructor Summary
ResourceInjectingApplication()
           
 
Method Summary
 Finder createFinder(Class<? extends ServerResource> targetClass)
           
 Router newRouter()
          Returns a new instance of Router linked to this application.
static Finder wrapFinderWithMemberInjection(Finder finder, 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, setConnectorService, setConnegService, setContext, setConverterService, setCurrent, 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 Finder wrapFinderWithMemberInjection(Finder finder,
                                                   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 Finder createFinder(Class<? extends ServerResource> targetClass)
Overrides:
createFinder in class Restlet

newRouter

public Router newRouter()
Returns a new instance of Router linked to this application.

Returns:
A new instance of Router.

Restlet Framework 2.2.2
OSGi Environments

Copyright © 2005-2014 Restlet.