51Degrees Device Detection Java  4.1

Device detection services for 51Degrees Pipeline

fiftyone.devicedetection.DeviceDetectionPipelineBuilder Class Reference

Detailed Description

Builder used to create a Pipeline with a device detection engine.

Collaboration diagram for fiftyone.devicedetection.DeviceDetectionPipelineBuilder:

[legend]

Public Member Functions

 DeviceDetectionPipelineBuilder ()
Constructor.
 DeviceDetectionPipelineBuilder (ILoggerFactory loggerFactory)
Constructor. More...
 DeviceDetectionPipelineBuilder (ILoggerFactory loggerFactory, HttpClient httpClient)
Constructor. More...
 DeviceDetectionPipelineBuilder (ILoggerFactory loggerFactory, HttpClient httpClient, DataUpdateService dataUpdateService)
Constructor. More...
DeviceDetectionOnPremisePipelineBuilder  useOnPremise (String datafile, boolean createTempDataCopy) throws Exception
Use a 51Degrees on-premise device detection engine to perform device detection. More...
DeviceDetectionOnPremisePipelineBuilder  useOnPremise (byte[] data, Enums.DeviceDetectionAlgorithm algorithm)
Use a 51Degrees on-premise device detection engine to perform device detection. More...
DeviceDetectionCloudPipelineBuilder  useCloud (String resourceKey)
Use the 51Degrees Cloud service to perform device detection. More...

Protected Attributes

final ILoggerFactory  loggerFactory

Constructor & Destructor Documentation

◆ DeviceDetectionPipelineBuilder() [1/3]

fiftyone.devicedetection.DeviceDetectionPipelineBuilder.DeviceDetectionPipelineBuilder ( ILoggerFactory   loggerFactory )

Constructor.

Parameters
loggerFactory - The factory to use for creating loggers within the pipeline.

◆ DeviceDetectionPipelineBuilder() [2/3]

fiftyone.devicedetection.DeviceDetectionPipelineBuilder.DeviceDetectionPipelineBuilder ( ILoggerFactory   loggerFactory,
HttpClient   httpClient  
)

Constructor.

Parameters
loggerFactory - The factory to use for creating loggers within the pipeline.
httpClient - The HTTP Client to use within the pipeline.

◆ DeviceDetectionPipelineBuilder() [3/3]

fiftyone.devicedetection.DeviceDetectionPipelineBuilder.DeviceDetectionPipelineBuilder ( ILoggerFactory   loggerFactory,
HttpClient   httpClient,
DataUpdateService   dataUpdateService  
)

Constructor.

Parameters
loggerFactory - The factory to use for creating loggers within the pipeline.
httpClient - The HTTP Client to use within the pipeline.
dataUpdateService - The DataUpdateService to use when checking for data updates.

Member Function Documentation

◆ useCloud()

DeviceDetectionCloudPipelineBuilder fiftyone.devicedetection.DeviceDetectionPipelineBuilder.useCloud ( String   resourceKey )

Use the 51Degrees Cloud service to perform device detection.

Parameters
resourceKey - The resource key to use when querying the cloud service. Obtain one from https://configure.51degrees.com
Returns
A builder that can be used to configure and build a pipeline that will use the cloud device detection engine.

◆ useOnPremise() [1/2]

DeviceDetectionOnPremisePipelineBuilder fiftyone.devicedetection.DeviceDetectionPipelineBuilder.useOnPremise ( String   datafile,
boolean   createTempDataCopy  
) throws Exception

Use a 51Degrees on-premise device detection engine to perform device detection.

Parameters
datafile - The full path to the device detection data file.
createTempDataCopy - If true, the engine will create a temporary copy of the data file rather than using the data file directly.
Returns
A builder that can be used to configure and build a pipeline that will use the on-premise detection engine.
Exceptions
Exception - Thrown if a required parameter is null.

◆ useOnPremise() [2/2]

DeviceDetectionOnPremisePipelineBuilder fiftyone.devicedetection.DeviceDetectionPipelineBuilder.useOnPremise ( byte []   data,
Enums.DeviceDetectionAlgorithm   algorithm  
)

Use a 51Degrees on-premise device detection engine to perform device detection.

Parameters
data - The device detection data file as a byte array.
algorithm - The detection algorithm that the supplied data supports.
Returns
A builder that can be used to configure and build a pipeline that will use the on-premise detection engine.