org.jboss.resteasy.cdi
Class CdiConstructorInjector

java.lang.Object
  extended by org.jboss.resteasy.cdi.CdiConstructorInjector
All Implemented Interfaces:
ConstructorInjector

public class CdiConstructorInjector
extends Object
implements ConstructorInjector

This ConstructorInjector implementation uses CDI's BeanManager to obtain a contextual instance of a bean.

Author:
Jozef Hartinger

Constructor Summary
CdiConstructorInjector(Type type, javax.enterprise.inject.spi.BeanManager manager)
           
 
Method Summary
 Object construct()
          construct outside the scope of an HTTP request.
 Object construct(HttpRequest request, HttpResponse response)
          construct inside the scope of an HTTP request.
 Object[] injectableArguments()
          Create an arguments list from injectable tings outside the scope of an HTTP request.
 Object[] injectableArguments(HttpRequest request, HttpResponse response)
          Create an argument list inside the scope of an HTTP request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CdiConstructorInjector

public CdiConstructorInjector(Type type,
                              javax.enterprise.inject.spi.BeanManager manager)
Method Detail

construct

public Object construct()
Description copied from interface: ConstructorInjector
construct outside the scope of an HTTP request. Useful for singleton factories

Specified by:
construct in interface ConstructorInjector
Returns:

construct

public Object construct(HttpRequest request,
                        HttpResponse response)
                 throws Failure,
                        WebApplicationException,
                        ApplicationException
Description copied from interface: ConstructorInjector
construct inside the scope of an HTTP request.

Specified by:
construct in interface ConstructorInjector
Returns:
Throws:
Failure
WebApplicationException
ApplicationException

injectableArguments

public Object[] injectableArguments()
Description copied from interface: ConstructorInjector
Create an arguments list from injectable tings outside the scope of an HTTP request. Useful for singleton factories in cases where the resource factory wants to allocate the object itself, but wants resteasy to populate the arguments

Specified by:
injectableArguments in interface ConstructorInjector
Returns:

injectableArguments

public Object[] injectableArguments(HttpRequest request,
                                    HttpResponse response)
                             throws Failure
Description copied from interface: ConstructorInjector
Create an argument list inside the scope of an HTTP request. Useful in cases where the resource factory wants to allocate the object itself, but wants resteasy to populate the arguments

Specified by:
injectableArguments in interface ConstructorInjector
Returns:
Throws:
Failure


Copyright © 2011. All Rights Reserved.