\r\n

51Degrees Pipeline Java  4.4

51Degrees Pipeline for Java

fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault Class Reference

Detailed Description

This class contains the automatic update configuration parameters that can be supplied to an engine for a particular data file that the engine uses.

See also
Specification

Inheritance diagram for fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault:

[legend]

Collaboration diagram for fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault:

[legend]

Public Member Functions

String  getIdentifier ()
Get the identifier of the data file that this configuration information applies to. More...
void  setIdentifier (String identifier)
Set the identifier of the data file that this configuration information applies to. More...
String  getDataFilePath ()
Get the complete file path to the location of the data file. More...
void  setDataFilePath (String dataFilePath)
Set the complete file path to the location of the data file. More...
boolean  getCreateTempDataCopy ()
Get whether a temporary copy of the data file should be used rather than using the on at the location provided directly. More...
void  setCreateTempCopy (boolean createTempCopy)
Set to true if the engine should create a temporary copy of the data file rather than using the one at the location provided directly. More...
byte []  getData ()
If set, this byte array contains an in-memory representation of the data used by the engine. More...
void  setData (byte[] data)
Set the data file as a byte array. More...
String  getDataUpdateUrl ()
Get the URL to check when looking for updates to the data file. More...
void  setDataUpdateUrl (String url)
Set the URL to check when looking for updates to the data file. More...
boolean  getAutomaticUpdatesEnabled ()
Flag that indicates if updates to the data file will be checked for and applied to the engine automatically or not. More...
void  setAutomaticUpdatesEnabled (boolean enabled)
Set the flag that indicates if updates to the data file will be checked for and applied to the engine automatically or not. More...
List< String >  getDataUpdateLicenseKeys ()
Get a list of license keys to use when checking for updates using the getDataUpdateUrl(). More...
void  setDataUpdateLicenseKeys (List< String > licenseKeys)
Set the list of license keys to use when checking for updates using the getDataUpdateUrl(). More...
WatchKey  getWatchKey ()
Get the WatchKey used to watch the file system for file changes. More...
void  setWatchKey (WatchKey watchKey)
Set the WatchKey used to watch the file system for file changes. More...
boolean  getFileSystemWatcherEnabled ()
If true, a WatchKey will be created to watch the file at getDataFilePath(). More...
void  setFileSystemWatcherEnabled (boolean enabled)
If true, a WatchKey will be created to watch the file at getDataFilePath(). More...
int  getPollingIntervalSeconds ()
Get the interval between checks for updates for this data file using the specified getDataUpdateUrl(). More...
void  setPollingIntervalSeconds (int seconds)
Set the interval between checks for updates for this data file using the specified getDataUpdateUrl(). More...
int  getMaxRandomisationSeconds ()
Get the maximum time in seconds that the polling interval may be randomized by. More...
void  setMaxRandomisationSeconds (int seconds)
Set the maximum time in seconds that the polling interval may be randomized by. More...
DataUpdateUrlFormatter  getUrlFormatter ()
Get the formatter to use when getting the data update URL with query string parameters set. More...
void  setUrlFormatter (DataUpdateUrlFormatter formatter)
Set the formatter to use when getting the data update URL with query string parameters set. More...
boolean  getDecompressContent ()
Must return true if the data downloaded from the getDataUpdateUrl() is compressed and false otherwise. More...
void  setDecompressContent (boolean decompress)
Set whether the data downloaded from the getDataUpdateUrl() is compressed. More...
boolean  getVerifyMd5 ()
Must return true if the response from the getDataUpdateUrl() is expected to include a 'Content-Md5' HTTP header that contains an MD5 hash that can be used to check the integrity of the downloaded content. More...
void  setVerifyMd5 (boolean verify)
Set whether the response from the getDataUpdateUrl() is expected to include a 'Content-Md5' HTTP header that contains an MD5 hash that can be used to check the integrity of the downloaded content. More...
boolean  getVerifyModifiedSince ()
Must return true if the request to the getDataUpdateUrl() supports the 'If-Modified-Since' header and false if it does not. More...
void  setVerifyModifiedSince (boolean verify)
Set whether the request to the getDataUpdateUrl() supports the 'If-Modified-Since' header and false if it does not. More...
boolean  getUpdateOnStartup ()
If true then when this file is registered with the data update service, it will immediately try to download the latest copy of the file. More...
void  setUpdateOnStartup (boolean enabled)
Set if when this file is registered with the data update service, it will immediately try to download the latest copy of the file. More...

Member Function Documentation

◆ getAutomaticUpdatesEnabled()

boolean fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.getAutomaticUpdatesEnabled ( )

Flag that indicates if updates to the data file will be checked for and applied to the engine automatically or not.

Returns
true if data file updates should be scheduled

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ getCreateTempDataCopy()

boolean fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.getCreateTempDataCopy ( )

Get whether a temporary copy of the data file should be used rather than using the on at the location provided directly.

Returns
true if the engine should create a temporary data file

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ getData()

byte [] fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.getData ( )

If set, this byte array contains an in-memory representation of the data used by the engine.

This will be null unless this instance has specifically been created from a byte array.

Returns
data file as a byte array or null

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ getDataFilePath()

String fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.getDataFilePath ( )

Get the complete file path to the location of the data file.

This value will be null if the file has been supplied from a byte[] in memory.

Returns
data file path or null

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ getFileSystemWatcherEnabled()

boolean fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.getFileSystemWatcherEnabled ( )

If true, a WatchKey will be created to watch the file at getDataFilePath().

If the file is modified then the engine will automatically be notified so that it can refresh it's internal data structures.

Returns
true if file watcher is enabled

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ getIdentifier()

String fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.getIdentifier ( )

Get the identifier of the data file that this configuration information applies to.

If the engine only supports a single data file then this value will be ignored.

Returns
data file identifier

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ getMaxRandomisationSeconds()

int fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.getMaxRandomisationSeconds ( )

Get the maximum time in seconds that the polling interval may be randomized by.

I.e. each polling interval will be the configured interval + or - a random amount between zero and this value. This settings is intended to be used to allow multiple instances of a system stagger their update requests to reduce chance of conflict errors or slow update downloads.

Returns
maximum randomisation in seconds

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ getUpdateOnStartup()

boolean fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.getUpdateOnStartup ( )

If true then when this file is registered with the data update service, it will immediately try to download the latest copy of the file.

This action will block execution until the download is complete and the engine has loaded the new file.

Returns
true if the data file should be updated during startup

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ getVerifyMd5()

boolean fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.getVerifyMd5 ( )

Must return true if the response from the getDataUpdateUrl() is expected to include a 'Content-Md5' HTTP header that contains an MD5 hash that can be used to check the integrity of the downloaded content.

Returns
true if data MD5 should be verified

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ setAutomaticUpdatesEnabled()

void fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.setAutomaticUpdatesEnabled ( boolean   enabled )

Set the flag that indicates if updates to the data file will be checked for and applied to the engine automatically or not.

Parameters
enabled - true if data file updates should be scheduled

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ setCreateTempCopy()

void fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.setCreateTempCopy ( boolean   createTempCopy )

Set to true if the engine should create a temporary copy of the data file rather than using the one at the location provided directly.

This setting must be set to true if automatic updates are required.

Parameters
createTempCopy - true if the engine should create a temporary data file

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ setData()

void fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.setData ( byte []   data )

Set the data file as a byte array.

If set, this byte array contains an in-memory representation of the data used by the engine.

Parameters
data - data file as a byte array

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ setFileSystemWatcherEnabled()

void fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.setFileSystemWatcherEnabled ( boolean   enabled )

If true, a WatchKey will be created to watch the file at getDataFilePath().

If the file is modified then the engine will automatically be notified so that it can refresh it's internal data structures.

Parameters
enabled - true if file watcher should be

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ setIdentifier()

void fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.setIdentifier ( String   identifier )

Set the identifier of the data file that this configuration information applies to.

If the engine only supports a single data file then this value will be ignored.

Parameters
identifier - data file identifier

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ setMaxRandomisationSeconds()

void fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.setMaxRandomisationSeconds ( int   seconds )

Set the maximum time in seconds that the polling interval may be randomized by.

I.e. each polling interval will be the configured interval + or - a random amount between zero and this value. This settings is intended to be used to allow multiple instances of a system stagger their update requests to reduce chance of conflict errors or slow update downloads.

Parameters
seconds - maximum randomisation in seconds

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ setUpdateOnStartup()

void fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.setUpdateOnStartup ( boolean   enabled )

Set if when this file is registered with the data update service, it will immediately try to download the latest copy of the file.

This action will block execution until the download is complete and the engine has loaded the new file.

Parameters
enabled - true if the data file should be updated during startup

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.

◆ setVerifyMd5()

void fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.setVerifyMd5 ( boolean   verify )

Set whether the response from the getDataUpdateUrl() is expected to include a 'Content-Md5' HTTP header that contains an MD5 hash that can be used to check the integrity of the downloaded content.

Parameters
verify - true if data MD5 should be verified

Implements fiftyone.pipeline.engines.configuration.DataFileConfiguration.