51Degrees Device Detection Java  4.1

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.

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 or not an existing temp file should be used if one is found in the temp directory. More...
DeviceDetectionHashEngineBuilder  setUpdateMatchedUserAgent (boolean update)
Set whether or not 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)
DeviceDetectionHashEngineBuilder  setAllowUnmatched (boolean allow)
DeviceDetectionHashEngineBuilder  setDifference (int difference)
DeviceDetectionHashEngineBuilder  setDrift (int drift)
Set the maximum drift to allow when matching hashes. More...
DeviceDetectionHashEngineBuilder  setUsePerformanceGraph (boolean use)
Set whether or not the performance optimized graph is used for processing. More...
DeviceDetectionHashEngineBuilder  setUsePredictiveGraph (boolean use)
Set whether or not the predictive optimized graph is used for processing. More...

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

 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;

◆ 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. By default this is 0.

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.

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 or not an existing temp file should be used if one is found in the temp directory.

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 or not the matched characters of the User-Agent should be stored to be returned in the results.

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 or not the performance optimized graph is used for processing.

When processing evidence, the performance graph is optimised to find an answer as quick 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.

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 or not 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.

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