org.restlet.ext.jaxrs
Interface ObjectFactory


public interface ObjectFactory

Implement this interface to instantiate JAX-RS root resource classes and providers yourself and register it by JaxRsApplication.setObjectFactory(ObjectFactory).

When using a ObjectFactory, no JAX-RS constructor dependency injection will be performed, but instance variable and bean setter injection will still be done.

Author:
Bruno Dumon
See Also:
JaxRsApplication.setObjectFactory(ObjectFactory), JaxRsRestlet.setObjectFactory(ObjectFactory)

Method Summary
<T> T
getInstance(java.lang.Class<T> jaxRsClass)
          Creates an instance of the given class.
If the concrete instance could not instantiate the given class, it could return null.
 

Method Detail

getInstance

<T> T getInstance(java.lang.Class<T> jaxRsClass)
              throws InstantiateException
Creates an instance of the given class.
If the concrete instance could not instantiate the given class, it could return null. Than the constructor specified by the JAX-RS specification (section 4.2) is used.

Type Parameters:
T -
Parameters:
jaxRsClass - the root resource class or provider class.
Returns:
The created instance.
Throws:
InstantiateException


Copyright © 2005-2008 Noelios Technologies.