public class ReferenceSetAugmentorImpl extends Object implements ReferenceSetAugmentor
Constructor and Description |
---|
ReferenceSetAugmentorImpl()
Default constructor to make life easier when using Spring.
|
Modifier and Type | Method and Description |
---|---|
Set<ExternalReferenceSPI> |
augmentReferenceSet(ReferenceSet references,
Set<Class<ExternalReferenceSPI>> targetReferenceTypes,
ReferenceContext context)
Attempts to modify the supplied ReferenceSet such that it contains an
implementation of at least one of the ExternalReferenceSPI classes
specified.
|
void |
augmentReferenceSetAsynch(ReferenceSet references,
Set<Class<ExternalReferenceSPI>> targetReferenceTypes,
ReferenceContext context,
ReferenceSetAugmentorCallback callback)
As with
ReferenceSetAugmentor.augmentReferenceSet(ReferenceSet, Set, ReferenceContext)
but called in an asynchronous fashion. |
void |
buildersUpdated(Object service,
Map<?,?> properties) |
void |
setBuilders(List<ExternalReferenceBuilderSPI<?>> builders)
Inject a list containing all known implementations of
ExternalReferenceBuilderSPI.
|
void |
setTranslators(List<ExternalReferenceTranslatorSPI<?,?>> translators)
Inject a list containing all known implementations of
ExternalReferenceTranslatorSPI.
|
void |
translatorsUpdated(Object service,
Map<?,?> properties) |
protected void |
update() |
public ReferenceSetAugmentorImpl()
public void setBuilders(List<ExternalReferenceBuilderSPI<?>> builders)
IllegalStateException
- if this has already been set, the instance registries should
only be set on bean construction.public void setTranslators(List<ExternalReferenceTranslatorSPI<?,?>> translators)
IllegalStateException
- if this has already been set, the instance registries should
only be set on bean construction.protected final void update()
public final Set<ExternalReferenceSPI> augmentReferenceSet(ReferenceSet references, Set<Class<ExternalReferenceSPI>> targetReferenceTypes, ReferenceContext context) throws ReferenceSetAugmentationException
ReferenceSetAugmentor
augmentReferenceSet
in interface ReferenceSetAugmentor
references
- reference set object to augmenttargetReferenceTypes
- a set of Class objects, this method succeeds if it can create
an instance of at least one of these pointing to the same data
as the other external references in the supplied reference setcontext
- a reference resolution context, potentially required for
access to the existing references or for creation of the
augmentationsReferenceSetAugmentationException
- if a problem occurs either in configuration of the
ReferenceSetAugmentor or in the augmentation process itself.
Any other exception types are wrapped in this and re-thrown.public final void augmentReferenceSetAsynch(ReferenceSet references, Set<Class<ExternalReferenceSPI>> targetReferenceTypes, ReferenceContext context, ReferenceSetAugmentorCallback callback) throws ReferenceSetAugmentationException
ReferenceSetAugmentor
ReferenceSetAugmentor.augmentReferenceSet(ReferenceSet, Set, ReferenceContext)
but called in an asynchronous fashion. Returns immediately and uses the
supplied instance of ReferenceSetAugmentorCallback
to provide
either the augmented ReferenceSet
or an exception indicating a
failure in the augmentation process.augmentReferenceSetAsynch
in interface ReferenceSetAugmentor
callback
- callback object used to indicate failure or to return the
modified reference setReferenceSetAugmentationException
- if the ReferenceSetAugmentor is missing critical
configuration. Exceptions that happen during augmentation or
as a result of a failure to find an appropriate augmentation
path are signalled by calls to the callback object, this
method only throws the exception if it can't even try to do
the augmentation for some reason.Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.