51Degrees Pipeline Java  4.1

51Degrees Pipeline for Java

fiftyone.pipeline.cloudrequestengine.flowelements.CloudAspectEngineBase< TData extends AspectData > Class Template Reference abstract

Detailed Description

Base class for 51Degrees cloud aspect engines.

Contains functionality for getting property meta-data and exposing that information to callers.

Inheritance diagram for fiftyone.pipeline.cloudrequestengine.flowelements.CloudAspectEngineBase< TData extends AspectData >:

[legend]

Collaboration diagram for fiftyone.pipeline.cloudrequestengine.flowelements.CloudAspectEngineBase< TData extends AspectData >:

[legend]

Classes

class  RequestEngineAccessor
Internal class that is used to retrieve the CloudRequestEngine that will be making requests of behalf of this engine. More...

Public Member Functions

 CloudAspectEngineBase (Logger logger, ElementDataFactory< TData > aspectDataFactory)
Construct a new instance of the CloudAspectEngineBase. More...
String  getDataSourceTier ()
List< AspectPropertyMetaData >  getProperties ()
TypedKey< TData >  getTypedDataKey ()

Public Member Functions inherited from fiftyone.pipeline.engines.flowelements.AspectEngineBase< TData extends AspectData, TProperty extends AspectPropertyMetaData >

 AspectEngineBase (Logger logger, ElementDataFactory< TData > aspectDataFactory)
Construct a new instance of the AspectEngine. More...
TypedKey< TData >  getTypedDataKey ()
abstract List< TProperty >  getProperties ()
abstract String  getDataSourceTier ()
void  setCache (FlowCache cache)
void  setLazyLoading (LazyLoadingConfiguration configuration)
LazyLoadingConfiguration  getLazyLoadingConfiguration ()
ExecutorService  getExecutor ()

Public Member Functions inherited from fiftyone.pipeline.core.flowelements.FlowElementBase< TData extends ElementData, TProperty extends ElementPropertyMetaData >

 FlowElementBase (Logger logger, ElementDataFactory< TData > elementDataFactory)
Construct a new instance of the FlowElement. More...
void  addPipeline (Pipeline pipeline)
List< Pipeline >  getPipelines ()
Get a unmodifiable list of the Pipelines that this element has been added to. More...
abstract String  getElementDataKey ()
abstract EvidenceKeyFilter  getEvidenceKeyFilter ()
abstract List< TProperty >  getProperties ()
TProperty  getProperty (String name)
TypedKey< TData >  getTypedDataKey ()
void  process (FlowData data) throws Exception
DataFactory< TData >  getDataFactory ()
boolean  isConcurrent ()
boolean  isClosed ()
void  close () throws Exception

Public Member Functions inherited from fiftyone.pipeline.core.flowelements.FlowElement< TData, TProperty >

void  process (FlowData data) throws Exception
Carry out whatever operations this element is designed to do using the FlowData passed. More...
void  addPipeline (Pipeline pipeline)
Called when this element is added to a pipeline. More...
EvidenceKeyFilter  getEvidenceKeyFilter ()
Get a filter that will only include the evidence keys that this element can make use of. More...
String  getElementDataKey ()
Get the string name of the key used to access the data populated by this element in the FlowData. More...
TypedKey< TData >  getTypedDataKey ()
Get the typed data key used for retrieving strongly typed element data. More...
List< TProperty >  getProperties ()
Get details of the properties that this element can populate. More...
TProperty  getProperty (String name)
Get a property from the properties that this element can populate using its name. More...
boolean  isConcurrent ()
if true, requires that the Pipeline guards against concurrent access to FlowData structures More...
boolean  isClosed ()
Indicates whether the element has been closed using the close() method, either explicitly or as a result of a 'try with resource'. More...
DataFactory< TData >  getDataFactory ()
Get the factory used to create the element data instances that are populated by this flow element. More...

Public Member Functions inherited from fiftyone.pipeline.engines.flowelements.AspectEngine< TData, TProperty >

void  setCache (FlowCache cache)
Set the results cache. More...
String  getDataSourceTier ()
Get the tier to which the current data source belongs. More...
void  setLazyLoading (LazyLoadingConfiguration configuration)
Configure lazy loading of results. More...
LazyLoadingConfiguration  getLazyLoadingConfiguration ()
Get the lazy loading configuration used for loading of results. More...
ExecutorService  getExecutor ()
Get the executor service to use when starting processing threads which are lazily loaded. More...

Protected Member Functions

RequestEngineAccessor  getRequestEngine ()
Used to access the CloudRequestEngine that will be making HTTP requests on behalf of this engine. More...
void  setRequestEngine (RequestEngineAccessor requestEngine)
Map< String, Object >  createAPVMap (Map< String, Object > cloudData, List< ElementPropertyMetaData > propertyMetaData)
Use the supplied cloud data to create a map of AspectPropertyValue instances. More...

Protected Member Functions inherited from fiftyone.pipeline.engines.flowelements.AspectEngineBase< TData extends AspectData, TProperty extends AspectPropertyMetaData >

abstract void  processEngine (FlowData flowData, TData aspectData) throws Exception
Extending classes must implement this method. More...
final void  processInternal (FlowData flowData) throws Exception
Implementation of method from the base class FlowElementBase. More...
void  managedResourcesCleanup ()

Protected Member Functions inherited from fiftyone.pipeline.core.flowelements.FlowElementBase< TData extends ElementData, TProperty extends ElementPropertyMetaData >

abstract void  processInternal (FlowData data) throws Exception
Abstract method to be overridden by a FlowElement author. More...
abstract void  managedResourcesCleanup ()
Cleanup any managed resources that the element is using.
abstract void  unmanagedResourcesCleanup ()
Cleanup any unmanaged resources that the element is using.
void  close (boolean closing)
void  finalize () throws Throwable

Constructor & Destructor Documentation

Member Function Documentation

◆ createAPVMap()

Map<String, Object> fiftyone.pipeline.cloudrequestengine.flowelements.CloudAspectEngineBase< TData extends AspectData >.createAPVMap ( Map< String, Object >   cloudData,
List< ElementPropertyMetaData >   propertyMetaData  
)
protected

Use the supplied cloud data to create a map of AspectPropertyValue instances.

A new instance of AspectPropertyValue will be created for each value and the value from the cloud data assigned to it. If the value is null, then the code will look for a property in the cloud data with the same name suffixed with 'nullreason'. If it exists, then its value will be used to set the no value message in the new AspectPropertyValue.

Parameters
cloudData - the cloud data to be processed. Keys are flat property names (i.e. no '.' separators)
propertyMetaData - the meta data for the properties in the data. This will usually be the list from getProperties() but will be different if dealing with sub-properties
Returns
a map containing the original values converted to AspectPropertyValue instances. Any entries in the source map where the key ends with 'nullreason' will not appear in the output