Package org.jboss.resteasy.core
Class ConstructorInjectorImpl
- java.lang.Object
-
- org.jboss.resteasy.core.ConstructorInjectorImpl
-
- All Implemented Interfaces:
ConstructorInjector
public class ConstructorInjectorImpl extends Object implements ConstructorInjector
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected Constructor
constructor
protected ValueInjector[]
params
-
Constructor Summary
Constructors Constructor Description ConstructorInjectorImpl(Constructor constructor, ResteasyProviderFactory factory)
ConstructorInjectorImpl(ResourceConstructor constructor, ResteasyProviderFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
construct(boolean unwrapAsync)
Construct outside the scope of an HTTP request.Object
construct(HttpRequest request, HttpResponse httpResponse, boolean unwrapAsync)
Construct inside the scope of an HTTP request.protected Object
constructInRequest(Object[] args)
protected Object
constructOutsideRequest(Object[] args)
Object
injectableArguments(boolean unwrapAsync)
Create an arguments list from injectable tings outside the scope of an HTTP request.Object
injectableArguments(HttpRequest input, HttpResponse response, boolean unwrapAsync)
Create an argument list inside the scope of an HTTP request.
-
-
-
Field Detail
-
constructor
protected Constructor constructor
-
params
protected ValueInjector[] params
-
-
Constructor Detail
-
ConstructorInjectorImpl
public ConstructorInjectorImpl(ResourceConstructor constructor, ResteasyProviderFactory factory)
-
ConstructorInjectorImpl
public ConstructorInjectorImpl(Constructor constructor, ResteasyProviderFactory factory)
-
-
Method Detail
-
injectableArguments
public Object injectableArguments(HttpRequest input, HttpResponse response, boolean unwrapAsync)
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 interfaceConstructorInjector
- Parameters:
input
- http requestresponse
- http responseunwrapAsync
- unwrap async- Returns:
- array of arguments or a CompletionStage
-
injectableArguments
public Object injectableArguments(boolean unwrapAsync)
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 interfaceConstructorInjector
- Parameters:
unwrapAsync
- unwrap async- Returns:
- array of arguments or a CompletionStage
-
construct
public Object construct(HttpRequest request, HttpResponse httpResponse, boolean unwrapAsync) throws Failure, ApplicationException, jakarta.ws.rs.WebApplicationException
Description copied from interface:ConstructorInjector
Construct inside the scope of an HTTP request.- Specified by:
construct
in interfaceConstructorInjector
- Parameters:
request
- http requesthttpResponse
- http responseunwrapAsync
- unwrap async- Returns:
- constructed object or a CompletionStage
- Throws:
Failure
- if failure occurredApplicationException
- if application exception occurredjakarta.ws.rs.WebApplicationException
- if application exception occurred
-
construct
public Object construct(boolean unwrapAsync)
Description copied from interface:ConstructorInjector
Construct outside the scope of an HTTP request. Useful for singleton factories.- Specified by:
construct
in interfaceConstructorInjector
- Parameters:
unwrapAsync
- unwrap async- Returns:
- constructed object or a CompletionStage
-
-