public abstract class AbstractResourceInjector extends Object implements ResourceInjector
ResourceInjector
for sagas that injects field and method resources. Resources
are provided by the concrete implementation.Constructor and Description |
---|
AbstractResourceInjector() |
Modifier and Type | Method and Description |
---|---|
protected abstract <R> Optional<R> |
findResource(Class<R> requiredType)
Returns a resource of given
requiredType or an empty Optional if the resource is not registered with the
injector. |
protected String[] |
injectorAnnotationNames()
Provides an array with fully qualified class names of the annotation that indicate an injection point for a
resource.
|
void |
injectResources(Object saga)
Inject required resources into the given
saga . |
public void injectResources(Object saga)
ResourceInjector
saga
.injectResources
in interface ResourceInjector
saga
- The saga to inject resources intoprotected abstract <R> Optional<R> findResource(Class<R> requiredType)
requiredType
or an empty Optional if the resource is not registered with the
injector.R
- the resource typerequiredType
- the class of the resource to findprotected String[] injectorAnnotationNames()
javax.inject.Inject
, and org.springframework.beans.factory.annotation.Autowired
Copyright © 2010–2017. All rights reserved.