public interface ReferenceSetAugmentor
ExternalReferenceTranslatorSPI
and
ExternalReferenceBuilderSPI
to build external references from,
respectively, other external references and from streams. These are then used
to augment the contents of implementations of ReferenceSet
with
additional ExternalReferenceSPI
implementations.
Methods in this interface throw the runtime exception
ReferenceSetAugmentationException
for all problems, other exceptions
are wrapped in this type and re-thrown.
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
augmentReferenceSet(ReferenceSet, Set, ReferenceContext)
but called in an asynchronous fashion. |
Set<ExternalReferenceSPI> augmentReferenceSet(ReferenceSet references, Set<Class<ExternalReferenceSPI>> targetReferenceTypes, ReferenceContext context) throws ReferenceSetAugmentationException
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.void augmentReferenceSetAsynch(ReferenceSet references, Set<Class<ExternalReferenceSPI>> targetReferenceTypes, ReferenceContext context, ReferenceSetAugmentorCallback callback) throws ReferenceSetAugmentationException
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.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.