public class SpiExporterRetriever extends Object implements ExporterRetriever<ExporterDescription>
ExporterRetriever as services.| Constructor and Description |
|---|
SpiExporterRetriever(ClassLoader serviceClassLoader)
Creates a new instance.
|
SpiExporterRetriever(List<? extends ExporterRetriever<?>> elements)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
<V> ModelOutput<V> |
createOutput(DataModelDefinition<V> definition,
ExporterDescription description,
TestContext context)
Creates a
ModelOutput to prepare what the exporter will use. |
<V> DataModelSource |
createSource(DataModelDefinition<V> definition,
ExporterDescription description,
TestContext context)
Creates a
DataModelSource to retrieve what the target exporter had created. |
Class<ExporterDescription> |
getDescriptionClass()
Returns the class of target
ExporterDescription. |
void |
truncate(ExporterDescription description,
TestContext context)
Truncates all resources which the exporter will use.
|
public SpiExporterRetriever(ClassLoader serviceClassLoader)
serviceClassLoader - the class loader to load the registered servicesIllegalArgumentException - if some parameters were nullpublic SpiExporterRetriever(List<? extends ExporterRetriever<?>> elements)
elements - the elements to be composedIllegalArgumentException - if some parameters were nullpublic Class<ExporterDescription> getDescriptionClass()
ExporterRetrieverExporterDescription.getDescriptionClass in interface ExporterRetriever<ExporterDescription>public void truncate(ExporterDescription description, TestContext context) throws IOException
ExporterRetrieverIf target resources do not support truncate operations, this method has no effects.
truncate in interface ExporterRetriever<ExporterDescription>description - the descriptioncontext - the current test contextIOException - if failed to open the targetpublic <V> ModelOutput<V> createOutput(DataModelDefinition<V> definition, ExporterDescription description, TestContext context) throws IOException
ExporterRetrieverModelOutput to prepare what the exporter will use.createOutput in interface ExporterRetriever<ExporterDescription>V - type of modeldefinition - the data model definitiondescription - the descriptioncontext - the current test contextModelOutputIOException - if failed to open the targetpublic <V> DataModelSource createSource(DataModelDefinition<V> definition, ExporterDescription description, TestContext context) throws IOException
ExporterRetrieverDataModelSource to retrieve what the target exporter had created.createSource in interface ExporterRetriever<ExporterDescription>V - type of modeldefinition - the data model definitiondescription - the descriptioncontext - the current test contextDataModelSourceIOException - if failed to open the targetCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.