51Degrees Pipeline Java  4.1

51Degrees Pipeline for Java

fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration > Class Template Reference abstract

Detailed Description

Builder class that is used to create instances of DataFileConfiguration objects.

Parameters
<TBuilder> - the type of the builder implementation
<TConfig> - the type of configuration returned by the builder

Inheritance diagram for fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration >:

[legend]

Collaboration diagram for fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration >:

[legend]

Public Member Functions

TBuilder  setDataFileIdentifier (String identifier)
Set the identifier of the data file that this configuration information applies to. More...
TBuilder  setDataUpdateUrl (String url)
Configure the engine to use the specified URL when looking for an updated data file. More...
TBuilder  setDataUpdateUrlFormatter (DataUpdateUrlFormatter formatter)
Specify a DataUpdateUrlFormatter to be used by the DataUpdateService when building the complete URL to query for updated data. More...
TBuilder  setDataUpdateVerifyMd5 (boolean verify)
Set a value indicating if the DataUpdateService should expect the response from the data update URL to contain a 'content-md5' HTTP header that can be used to verify the integrity of the content. More...
TBuilder  setDataUpdateDecompress (boolean decompress)
Set a value indicating if the DataUpdateService should expect content from the configured data update URL to be compressed or not. More...
TBuilder  setAutoUpdate (boolean enabled)
Enable or disable automatic updates for this engine. More...
TBuilder  setDataFileSystemWatcher (boolean enabled)
The DataUpdateService has the ability to watch a data file on disk and automatically refresh the engine as soon as the file is updated. More...
TBuilder  setUpdatePollingInterval (int pollingIntervalSeconds)
Set the time between checks for a new data file made by the DataUpdateService. More...
TBuilder  setUpdatePollingInterval (long pollingIntervalMillis)
Set the time between checks for a new data file made by the DataUpdateService. More...
TBuilder  setUpdateRandomisationMax (long maximumDeviationMillis)
A random element can be added to the DataUpdateService polling interval. More...
TBuilder  setVerifyIfModifiedSince (boolean enabled)
Set if DataUpdateService sends the If-Modified-Since header in the request for a new data file. More...
TBuilder  setDataUpdateLicenseKey (String key)
Set the license key to use when updating the Engine's data file. More...
TBuilder  setUpdateOnStartup (boolean enabled)
Configure the data file to update on startup or not. More...
TBuilder  setDataUpdateLicenseKeys (String[] keys)
Set the license keys to use when updating the Engine's data file. More...
TConfig  build (String filename, boolean createTempCopy)
Called to indicate that configuration of this file is complete and the user can continue to configure the engine that the data file will be used by. More...
TConfig  build (byte[] data)
Called to indicate that configuration of this file is complete and the user can continue to configure the engine that the data file will be used by. More...

Protected Member Functions

List< String >  getDataUpdateLicenseKeys ()
Get the license keys to use when updating the Engine's data file. More...
abstract TConfig  createConfig ()

Member Function Documentation

◆ setAutoUpdate()

TBuilder fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration >.setAutoUpdate ( boolean   enabled )

Enable or disable automatic updates for this engine.

Parameters
enabled - if true, the engine will update it's data file with no manual intervention. If false, the engine will never update it's data file unless the manual update method is called on DataUpdateService
Returns
this builder instance

◆ setDataFileIdentifier()

TBuilder fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration >.setDataFileIdentifier ( 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 - the identifier to use
Returns
this builder instance

◆ setDataFileSystemWatcher()

TBuilder fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration >.setDataFileSystemWatcher ( boolean   enabled )

The DataUpdateService has the ability to watch a data file on disk and automatically refresh the engine as soon as the file is updated.

This setting enables/disables that feature.

The setAutoUpdate(boolean) feature must also be enabled in order for the file system watcher to work. If the engine is built from a byte[] then this setting does nothing.

Parameters
enabled - the cache configuration to use
Returns
this builder instance

◆ setDataUpdateDecompress()

TBuilder fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration >.setDataUpdateDecompress ( boolean   decompress )

Set a value indicating if the DataUpdateService should expect content from the configured data update URL to be compressed or not.

Parameters
decompress - true if the content from the data update URL needs to be decompressed. False otherwise
Returns
this builder instance

◆ setDataUpdateVerifyMd5()

TBuilder fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration >.setDataUpdateVerifyMd5 ( boolean   verify )

Set a value indicating if the DataUpdateService should expect the response from the data update URL to contain a 'content-md5' HTTP header that can be used to verify the integrity of the content.

Parameters
verify - true if the content should be verified with the Md5 hash. False otherwise
Returns
this builder instance

◆ setUpdateOnStartup()

TBuilder fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration >.setUpdateOnStartup ( boolean   enabled )

Configure the data file to update on startup or not.

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

Parameters
enabled - 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
Returns
this builder

◆ setUpdatePollingInterval() [1/2]

TBuilder fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration >.setUpdatePollingInterval ( int   pollingIntervalSeconds )

Set the time between checks for a new data file made by the DataUpdateService.

Default = 30 minutes.

Generally, the DataUpdateService will not check for a new data file until the 'expected update time' that is stored in the current data file. This interval is the time to wait between checks after that time if no update is initially found. If automatic updates are disabled then this setting does nothing.

Parameters
pollingIntervalSeconds - the number of seconds between checks
Returns
this builder instance

◆ setUpdatePollingInterval() [2/2]

TBuilder fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration >.setUpdatePollingInterval ( long   pollingIntervalMillis )

Set the time between checks for a new data file made by the DataUpdateService.

Default = 30 minutes.

Generally, the will not check for a new data file until the 'expected update time' that is stored in the current data file. This interval is the time to wait between checks after that time if no update is initially found. If automatic updates are disabled then this setting does nothing.

Parameters
pollingIntervalMillis - the time between checks
Returns
this builder instance

◆ setUpdateRandomisationMax()

TBuilder fiftyone.pipeline.engines.configuration.DataFileConfigurationBuilderBase< TBuilder extends DataFileConfigurationBuilderBase< TBuilder, TConfig, TConfig extends DataFileConfiguration >.setUpdateRandomisationMax ( long   maximumDeviationMillis )

A random element can be added to the DataUpdateService polling interval.

This option sets the maximum length of this random addition. Default = 10 minutes.

Parameters
maximumDeviationMillis - the maximum time added to the data update polling interval
Returns
this builder instance