51Degrees Pipeline Java  4.1

51Degrees Pipeline for Java

fiftyone.pipeline.engines.configuration.DataFileConfiguration Interface Reference

Detailed Description

Interface representing the configuration parameters controlling the automatic update checks for a specific data file.

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

[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.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ getCreateTempDataCopy()

boolean fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ getData()

byte [] fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ getDataFilePath()

String fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ getIdentifier()

String fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ getMaxRandomisationSeconds()

int fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ getUpdateOnStartup()

boolean fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ setAutomaticUpdatesEnabled()

void fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ setCreateTempCopy()

void fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ setData()

void fiftyone.pipeline.engines.configuration.DataFileConfiguration.setData ( byte []   data ) 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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ setCreateTempCopy()

void fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ setData()

void fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ setFileSystemWatcherEnabled()

void fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ setIdentifier()

void fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ setMaxRandomisationSeconds()

void fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ setUpdateOnStartup()

void fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.

◆ setVerifyMd5()

void fiftyone.pipeline.engines.configuration.DataFileConfiguration.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

Implemented in fiftyone.pipeline.engines.configuration.DataFileConfigurationDefault.