51Degrees Device Detection Java  4.4

Device detection services for 51Degrees Pipeline

fiftyone.devicedetection.examples.console.OfflineProcessing Class Reference

Detailed Description

Provides an example of processing a YAML file containing evidence for device detection.

There are 20,000 examples in the supplied file of evidence representing HTTP Headers. For example:

  header.user-agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36'
  header.sec-ch-ua: '" Not A;Brand";v="99", "Chromium";v="98", "Google Chrome";v="98"'
  header.sec-ch-ua-full-version: '"98.0.4758.87"'
  header.sec-ch-ua-mobile: '?0'
  header.sec-ch-ua-platform: '"Android"'

We create a device detection pipeline to read the data and find out about the associated devices, we write this data to a YAML formatted output stream.

As well as explaining the basic operation of offline processing using the defaults, for advanced operation this example can be used to experiment with tuning device detection for performance and predictive power using Performance Profile, Graph and Difference and Drift settings.

Collaboration diagram for fiftyone.devicedetection.examples.console.OfflineProcessing:


Static Public Member Functions

static void  main (String[] args) throws Exception
static void  run (String dataFile, InputStream is, OutputStream os) throws Exception
Process a YAML representation of evidence - and create a YAML output containing the processed evidence. More...

Static Public Attributes

static final String  LITE_V_4_1_HASH
static final String  HEADER_EVIDENCE_YML

Member Function Documentation

◆ run()

static void fiftyone.devicedetection.examples.console.OfflineProcessing.run ( String   dataFile,
InputStream   is,
OutputStream   os  
) throws Exception

Process a YAML representation of evidence - and create a YAML output containing the processed evidence.

dataFile - the 51Degrees on premise data file containing information about devices
is - an InputStream containing YAML documents - one per device
os - an OutputStream for the processed data

Member Data Documentation


final String fiftyone.devicedetection.examples.console.OfflineProcessing.HEADER_EVIDENCE_YML
Initial value:
"device-detection-data/20000 Evidence Records.yml"


final String fiftyone.devicedetection.examples.console.OfflineProcessing.LITE_V_4_1_HASH
Initial value:
On This Page