\r\n

51Degrees Device Detection Java  4.4

Device detection services for 51Degrees Pipeline

fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder Class Reference

Detailed Description

Builder for the DeviceDetectionHashEngine.

All options for the engine should be set here.

Default values are taken from device-detection-cxx/src/hash/hash.c

Inheritance diagram for fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder:

[legend]

Collaboration diagram for fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder:

[legend]

Public Member Functions

 DeviceDetectionHashEngineBuilder ()
Default constructor which uses the ILoggerFactory implementation returned by LoggerFactory#getILoggerFactory().
 DeviceDetectionHashEngineBuilder (ILoggerFactory loggerFactory)
Construct a new instance using the ILoggerFactory supplied. More...
 DeviceDetectionHashEngineBuilder (ILoggerFactory loggerFactory, DataUpdateService dataUpdateService)
Construct a new instance using the ILoggerFactory and DataUpdateService supplied. More...
DeviceDetectionHashEngineBuilder  setReuseTempFile (boolean reuse)
Set whether an existing temp file should be used if one is found in the temp directory. More...
DeviceDetectionHashEngineBuilder  setUpdateMatchedUserAgent (boolean update)
Set whether the matched characters of the User-Agent should be stored to be returned in the results. More...
DeviceDetectionHashEngineBuilder  setPerformanceProfile (String profileName)
Set the performance profile to use when constructing the data set. More...
DeviceDetectionHashEngineBuilder  setPerformanceProfile (PerformanceProfiles profile)
DeviceDetectionHashEngineBuilder  setConcurrency (int concurrency)
Provide a hint as to how many threads will access the pipeline simultaneously. More...
DeviceDetectionHashEngineBuilder  setAllowUnmatched (boolean allow)
Whether to return a default profile if no match. More...
DeviceDetectionHashEngineBuilder  setDifference (int difference)
The difference tolerance allows for User-Agents where some characters differ slightly from what is expected. More...
DeviceDetectionHashEngineBuilder  setDrift (int drift)
Set the maximum drift to allow when matching hashes. More...
DeviceDetectionHashEngineBuilder  setUsePerformanceGraph (boolean use)
Set whether the performance optimized graph is used for processing. More...
DeviceDetectionHashEngineBuilder  setUsePredictiveGraph (boolean use)
Set whether the predictive optimized graph is used for processing. More...
DeviceDetectionHashEngineBuilder  setCache (CacheConfiguration cacheConfiguration)

Public Member Functions inherited from fiftyone.devicedetection.shared.flowelements.OnPremiseDeviceDetectionEngineBuilderBase< TBuilder extends OnPremiseDeviceDetectionEngineBuilderBase< TBuilder, TEngine, TEngine extends FiftyOneAspectEngine<? extends AspectData, ? extends AspectPropertyMetaData >

 OnPremiseDeviceDetectionEngineBuilderBase ()
Default constructor which uses the ILoggerFactory implementation returned by LoggerFactory#getILoggerFactory().
 OnPremiseDeviceDetectionEngineBuilderBase (ILoggerFactory loggerFactory)
Construct a new instance using the ILoggerFactory supplied. More...
 OnPremiseDeviceDetectionEngineBuilderBase (ILoggerFactory loggerFactory, DataUpdateService dataUpdateService)
Construct a new instance using the ILoggerFactory and DataUpdateService supplied. More...
abstract TBuilder  setDifference (int difference)
Set the maximum difference to allow when processing HTTP headers. More...
abstract TBuilder  setAllowUnmatched (boolean allow)
If set to false, a non-matching User-Agent will result in properties without set values. More...

Protected Member Functions

String  getDefaultDataDownloadType ()
The default value to use for the 'Type' parameter when sending a request to the Distributor. More...
DeviceDetectionHashEngine  newEngine (List< String > properties)

Constructor & Destructor Documentation

◆ DeviceDetectionHashEngineBuilder() [1/2]

fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder.DeviceDetectionHashEngineBuilder ( ILoggerFactory   loggerFactory )

Construct a new instance using the ILoggerFactory supplied.

Parameters
loggerFactory - the logger factory to use

◆ DeviceDetectionHashEngineBuilder() [2/2]

fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder.DeviceDetectionHashEngineBuilder ( ILoggerFactory   loggerFactory,
DataUpdateService   dataUpdateService  
)

Construct a new instance using the ILoggerFactory and DataUpdateService supplied.

Parameters
loggerFactory - the logger factory to use
dataUpdateService - the DataUpdateService to use when automatic updates happen on the data file

Member Function Documentation

◆ getDefaultDataDownloadType()

String fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder.getDefaultDataDownloadType ( )
protected

The default value to use for the 'Type' parameter when sending a request to the Distributor.

Returns
default data download type;

◆ setAllowUnmatched()

DeviceDetectionHashEngineBuilder fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder.setAllowUnmatched ( boolean   allow )

Whether to return a default profile if no match.

Default false

See also
No Match Found
Parameters
allow - true if results with no matched hash nodes should be considered valid
Returns
this builder

◆ setDifference()

DeviceDetectionHashEngineBuilder fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder.setDifference ( int   difference )

The difference tolerance allows for User-Agents where some characters differ slightly from what is expected.

Default is 0.

See also
Hash Algorithm
Parameters
difference - to allow
Returns
this builder

◆ setDrift()

DeviceDetectionHashEngineBuilder fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder.setDrift ( int   drift )

Set the maximum drift to allow when matching hashes.

If the drift is exceeded, the result is considered invalid and values will not be returned.

Default is 0.

See also
Hash Algorithm
Parameters
drift - to set
Returns
this builder

◆ setPerformanceProfile()

DeviceDetectionHashEngineBuilder fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder.setPerformanceProfile ( String   profileName )

Set the performance profile to use when constructing the data set.

Default value is Balanced.

Parameters
profileName - name of the profile to use
Returns
this builder

◆ setReuseTempFile()

DeviceDetectionHashEngineBuilder fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder.setReuseTempFile ( boolean   reuse )

Set whether an existing temp file should be used if one is found in the temp directory.

Default is false.

Parameters
reuse - true if an existing file should be used
Returns
this builder

◆ setUpdateMatchedUserAgent()

DeviceDetectionHashEngineBuilder fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder.setUpdateMatchedUserAgent ( boolean   update )

Set whether the matched characters of the User-Agent should be stored to be returned in the results.

Default is true

Parameters
update - true if the matched User-Agent should be stored
Returns
this builder

◆ setUsePerformanceGraph()

DeviceDetectionHashEngineBuilder fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder.setUsePerformanceGraph ( boolean   use )

Set whether the performance optimized graph is used for processing.

When processing evidence, the performance graph is optimized to find an answer as quickly as possible. However, this can be at the expense of finding the best match for evidence which was not in the training data. If the predictive graph is also enabled, it will be used next if there was no match in the performance graph.

Default is false

See also
Hash Algorithm
Parameters
use - true if the performance graph should be used
Returns
this builder

◆ setUsePredictiveGraph()

DeviceDetectionHashEngineBuilder fiftyone.devicedetection.hash.engine.onpremise.flowelements.DeviceDetectionHashEngineBuilder.setUsePredictiveGraph ( boolean   use )

Set whether the predictive optimized graph is used for processing.

When processing evidence, the predictive graph is optimised to find the best answer for evidence which was not in the training data. However, this is at the expense of processing time, as more possibilities are taken into consideration.

Default is true

See also
Hash Algorithm
Parameters
use - true if the predictive graph should be used
Returns
this builder
On This Page