\r\n

51Degrees Pipeline Java  4.4

51Degrees Pipeline for Java

fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder Class Reference

Detailed Description

Builder for the CloudRequestEngine.

Inheritance diagram for fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder:

[legend]

Collaboration diagram for fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder:

[legend]

Public Member Functions

 CloudRequestEngineBuilder (ILoggerFactory loggerFactory)
 CloudRequestEngineBuilder (ILoggerFactory loggerFactory, HttpClient httpClient)
CloudRequestEngine  build () throws Exception
CloudRequestEngineBuilder  setEndpoint (String uri)
The root endpoint which the CloudRequestsEngine will query. More...
CloudRequestEngineBuilder  setDataEndpoint (String uri)
The endpoint the CloudRequestEngine will query to get a processing result. More...
CloudRequestEngineBuilder  setPropertiesEndpoint (String uri)
The endpoint the cloudRequestEngine will query to get the available properties. More...
CloudRequestEngineBuilder  setEvidenceKeysEndpoint (String uri)
The endpoint the cloudRequestEngine will query to get the required evidence keys. More...
CloudRequestEngineBuilder  setResourceKey (String resourceKey)
The resource key to query the endpoint with. More...
CloudRequestEngineBuilder  setLicenseKey (String licenseKey)
The license key to query the endpoint with. More...
CloudRequestEngineBuilder  setTimeOutSeconds (int timeout)
Timeout in seconds for the request to the endpoint. More...
CloudRequestEngineBuilder  setCloudRequestOrigin (String cloudRequestOrigin)
The value to set for the Origin header when making requests to the cloud service. More...
CloudRequestEngineBuilder  setCacheSize (int size)
Configure the size of a fiftyone.caching.LruPutCache cache to use. More...

Public Member Functions inherited from fiftyone.pipeline.engines.flowelements.AspectEngineBuilderBase< TBuilder extends AspectEngineBuilderBase< TBuilder, TEngine, TEngine extends AspectEngine >

 AspectEngineBuilderBase ()
Default constructor which uses the ILoggerFactory implementation returned by LoggerFactory#getILoggerFactory().
 AspectEngineBuilderBase (ILoggerFactory loggerFactory)
Construct a new instance using the ILoggerFactory supplied. More...
TBuilder  setProperties (Set< AspectPropertyMetaData > set)
Configure the properties that the engine will populate in the response. More...
TBuilder  setProperty (String s)
Add a property to the list of properties that the engine will populate in the response. More...
TBuilder  setProperties (List< String > properties)
Configure the properties that the engine will populate in the response. More...
TBuilder  setProperties (String properties)
Configure the properties that the engine will populate in the response. More...
TBuilder  setProperty (AspectPropertyMetaData aspectProperty)
Add a property to the list of properties that the engine will populate in the response. More...
TBuilder  setLazyLoading (LazyLoadingConfiguration configuration)
Configure lazy loading of results. More...
TBuilder  setCache (CacheConfiguration cacheConfiguration)
Configure the results cache that will be used by the Pipeline to cache results from this engine. More...

Protected Member Functions

CloudRequestEngine  newEngine (List< String > properties) throws Exception

Protected Member Functions inherited from fiftyone.pipeline.engines.flowelements.AspectEngineBuilderBase< TBuilder extends AspectEngineBuilderBase< TBuilder, TEngine, TEngine extends AspectEngine >

List< String >  getProperties ()
Get the list of properties that have been added to the builder. More...
void  configureEngine (TEngine engine) throws Exception
Called by the buildEngine() method to handle configuration of the engine after it is built. More...
void  preCreateEngine ()
Called by the buildEngine() method to handle anything that needs doing before the engine is built. More...
abstract TEngine  newEngine (List< String > properties) throws Exception
Called by the buildEngine() method to handle creation of the engine instance. More...
TEngine  buildEngine () throws Exception
Build an engine using the configured options. More...

Member Function Documentation

◆ setCacheSize()

CloudRequestEngineBuilder fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder.setCacheSize ( int   size )

Configure the size of a fiftyone.caching.LruPutCache cache to use.

Default is that there is no cache unless one is configured using this method or by using AspectEngineBuilderBase#setCache(CacheConfiguration) - or if it is set in a pipelineBuilder e.g. fiftyone.pipeline.engines.flowelements.PrePackagedPipelineBuilderBase#useResultsCache()

Parameters
size - the size of the cache
Returns
this builder

◆ setCloudRequestOrigin()

CloudRequestEngineBuilder fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder.setCloudRequestOrigin ( String   cloudRequestOrigin )

The value to set for the Origin header when making requests to the cloud service.

This is used by the cloud service to check that the request is being made from a origin matching those allowed by the resource key. For more detail, see the 'Request Headers' section in the cloud documentation.

There is no default value

Parameters
cloudRequestOrigin - The value to use for the Origin header.
Returns
this builder

◆ setDataEndpoint()

CloudRequestEngineBuilder fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder.setDataEndpoint ( String   uri )

The endpoint the CloudRequestEngine will query to get a processing result.

By default, this is the endpoint value suffixed with the resourcekey and ".json"

Parameters
uri - data endpoint
Returns
this builder

◆ setEndpoint()

CloudRequestEngineBuilder fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder.setEndpoint ( String   uri )

The root endpoint which the CloudRequestsEngine will query.

This will set the data, properties and evidence keys endpoints.

By default, "https://cloud.51degrees.com/api/v4"

Parameters
uri - root endpoint
Returns
this builder

◆ setEvidenceKeysEndpoint()

CloudRequestEngineBuilder fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder.setEvidenceKeysEndpoint ( String   uri )

The endpoint the cloudRequestEngine will query to get the required evidence keys.

By default, this is the endpoint value suffixed with "evidencekeys"

Parameters
uri - evidence keys endpoint
Returns
this builder

◆ setLicenseKey()

CloudRequestEngineBuilder fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder.setLicenseKey ( String   licenseKey )

The license key to query the endpoint with.

There is no default

Parameters
licenseKey - license key
Returns
this builder

◆ setPropertiesEndpoint()

CloudRequestEngineBuilder fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder.setPropertiesEndpoint ( String   uri )

The endpoint the cloudRequestEngine will query to get the available properties.

By default, this is the endpoint value suffixed with "accessibleproperties"

Parameters
uri - properties endpoint
Returns
this builder

◆ setResourceKey()

CloudRequestEngineBuilder fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder.setResourceKey ( String   resourceKey )

The resource key to query the endpoint with.

No default, a value must be supplied

Parameters
resourceKey - resource key
Returns
this builder

◆ setTimeOutSeconds()

CloudRequestEngineBuilder fiftyone.pipeline.cloudrequestengine.flowelements.CloudRequestEngineBuilder.setTimeOutSeconds ( int   timeout )

Timeout in seconds for the request to the endpoint.

Default value is 100 seconds

Parameters
timeout - in seconds
Returns
this builder
On This Page