\r\n

51Degrees Pipeline Java  4.4

51Degrees Pipeline for Java

fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase > Class Template Reference abstract

Detailed Description

Abstract base class for ShareUsageElement builders.

Parameters
<T> - element type

Inheritance diagram for fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >:

[legend]

Collaboration diagram for fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >:

[legend]

Public Member Functions

 ShareUsageBuilderBase (ILoggerFactory loggerFactory)
Constructor. More...
 ShareUsageBuilderBase (ILoggerFactory loggerFactory, Logger logger)
Constructor. More...
ShareUsageBuilderBase< T >  setIncludedQueryStringParameters (List< String > queryStringParameterNames)
By default, query string parameters are not shared. More...
ShareUsageBuilderBase< T >  setIncludedQueryStringParameters (String queryStringParameterNames)
By default, query string parameters are not shared. More...
ShareUsageBuilderBase< T >  setIncludedQueryStringParameter (String queryStringParameterName)
By default, query string parameters are not shared. More...
ShareUsageBuilderBase< T >  setBlockedHttpHeaders (List< String > blockedHeaders)
By default, all HTTP headers (excluding a few such as 'cookies', if they don't start with 51D_) are shared. More...
ShareUsageBuilderBase< T >  setBlockedHttpHeaders (String blockedHeaders)
By default, all HTTP headers (excluding a few such as 'cookies', if they don't start with 51D_) are shared. More...
ShareUsageBuilderBase< T >  setBlockedHttpHeader (String blockedHeader)
By default, all HTTP headers (excluding a few such as 'cookies', if they don't start with 51D_) are shared. More...
ShareUsageBuilderBase< T >  setIgnoreFlowDataEvidenceFilter (String evidenceFilter)
This setter can be used to stop the usage sharing element from sharing anything about specific requests. More...
ShareUsageBuilderBase< T >  setSharePercentage (double sharePercentage)
Set the percentage of data that the ShareUsageElement should be sharing. More...
ShareUsageBuilderBase< T >  setMinimumEntriesPerMessage (int minimumEntriesPerMessage)
The usage element will group data into single requests before sending it. More...
ShareUsageBuilderBase< T >  setMaximumQueueSize (int size)
Set the maximum number of entries to be stored in the queue to be sent. More...
int  getMaximumQueueSize ()
Get the maximum number of entries to be stored in the queue to be sent. More...
ShareUsageBuilderBase< T >  setAddTimeout (int milliseconds)
Set the timeout in milliseconds to allow when attempting to add an item to the queue. More...
ShareUsageBuilderBase< T >  setAddTimeoutMillis (int milliseconds)
Set the timeout in milliseconds to allow when attempting to add an item to the queue. More...
ShareUsageBuilderBase< T >  setTakeTimeout (int milliseconds)
Set the timeout in milliseconds to allow when attempting to take an item from the queue in order to send to the remote service. More...
ShareUsageBuilderBase< T >  setTakeTimeoutMillis (int milliseconds)
Set the timeout in milliseconds to allow when attempting to take an item from the queue in order to send to the remote service. More...
ShareUsageBuilderBase< T >  setShareUsageUrl (String shareUsageUrl)
Set the URL to use when sharing usage data. More...
ShareUsageBuilderBase< T >  setSessionCookieName (String cookieName)
Set the name of the cookie that contains the session id. More...
ShareUsageBuilderBase< T >  setRepeatEvidenceIntervalMinutes (int interval)
If exactly the same evidence values are seen multiple times within this time limit then they will only be shared once. More...
ShareUsageBuilderBase< T >  setTrackSession (boolean track)
If set to true, the configured session cookie will be used to identify user sessions. More...
abstract T  build () throws IOException

Protected Attributes

final ILoggerFactory  loggerFactory
final Logger  logger
int  repeatEvidenceInterval = Constants.SHARE_USAGE_DEFAULT_REPEAT_EVIDENCE_MINUTES
double  sharePercentage = Constants.SHARE_USAGE_DEFAULT_SHARE_PERCENTAGE
int  minimumEntriesPerMessage = Constants.SHARE_USAGE_DEFAULT_MIN_ENTRIES_PER_MESSAGE
int  maximumQueueSize = Constants.SHARE_USAGE_DEFAULT_MAX_QUEUE_SIZE int  addTimeout = Constants.SHARE_USAGE_DEFAULT_ADD_TIMEOUT int  takeTimeout = Constants.SHARE_USAGE_DEFAULT_TAKE_TIMEOUT String  shareUsageUrl = Constants.SHARE_USAGE_DEFAULT_URL String  sessionCookieName = fiftyone.pipeline.engines.Constants.DEFAULT_SESSION_COOKIE_NAME List< String >  blockedHttpHeaders = new ArrayList<>() final List< String >  includedQueryStringParameters = new ArrayList<>() final List< Map.Entry< String, String > >  ignoreDataEvidenceFilter = new ArrayList<>() boolean  trackSession

Constructor & Destructor Documentation

◆ ShareUsageBuilderBase() [1/2]

Constructor.

Parameters
loggerFactory - the ILoggerFactory to use when creating loggers for a ShareUsageBuilderBase

◆ ShareUsageBuilderBase() [2/2]

fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >.ShareUsageBuilderBase ( ILoggerFactory   loggerFactory,
Logger   logger  
)

Constructor.

Parameters
loggerFactory - the ILoggerFactory to use when creating loggers for a ShareUsageBuilderBase
logger - the Logger to use for ShareUsageElement

Member Function Documentation

◆ build()

abstract T fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >.build ( ) throws IOException
abstract

Create the ShareUsageElement.

Returns
the newly created target instance
Exceptions
IOException - if there was an exception creating the element

◆ getMaximumQueueSize()

Get the maximum number of entries to be stored in the queue to be sent.

Returns
the maximum queue size

◆ setAddTimeout()

Set the timeout in milliseconds to allow when attempting to add an item to the queue.

Deprecated:
Use setAddTimeoutMillis
Parameters
milliseconds - timeout to set
Returns
this builder

◆ setAddTimeoutMillis()

Set the timeout in milliseconds to allow when attempting to add an item to the queue.

Default is 0. i.e. if the item cannot be added then it is discarded.

Parameters
milliseconds - timeout to set
Returns
this builder

◆ setBlockedHttpHeader()

By default, all HTTP headers (excluding a few such as 'cookies', if they don't start with 51D_) are shared.

Individual headers can be excluded from sharing by adding them to this list.

This setter allows you to add the name of a header to block.

Parameters
blockedHeader - the (case-insensitive) name of the header to block
Returns
this builder

◆ setBlockedHttpHeaders() [1/2]

ShareUsageBuilderBase<T> fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >.setBlockedHttpHeaders ( List< String >   blockedHeaders )

By default, all HTTP headers (excluding a few such as 'cookies', if they don't start with 51D_) are shared.

Individual headers can be excluded from sharing by adding them to this list.

This setter replaces the current list

Parameters
blockedHeaders - the (case-insensitive) names of the headers to block
Returns
this builder

◆ setBlockedHttpHeaders() [2/2]

ShareUsageBuilderBase<T> fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >.setBlockedHttpHeaders ( String   blockedHeaders )

By default, all HTTP headers (excluding a few such as 'cookies', if they don't start with 51D_) are shared.

Individual headers can be excluded from sharing by adding them to this list.

This setter adds to the blocked headers

Parameters
blockedHeaders - a comma separated list of (case-insensitive) names of the headers to include
Returns
this builder

◆ setIgnoreFlowDataEvidenceFilter()

ShareUsageBuilderBase<T> fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >.setIgnoreFlowDataEvidenceFilter ( String   evidenceFilter )

This setter can be used to stop the usage sharing element from sharing anything about specific requests.

By default, no values are suppressed.

This setter adds to the filter

For example, if you wanted to stop sharing any details from requests where the user-agent header was 'ABC', you would set this to "header.user-agent:ABC"

Parameters
evidenceFilter - Comma separated string containing entries in the format [evidenceKey]:[evidenceValue]. Any requests with evidence matching these entries will not be shared.
Returns
this builder

◆ setIncludedQueryStringParameter()

ShareUsageBuilderBase<T> fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >.setIncludedQueryStringParameter ( String   queryStringParameterName )

By default, query string parameters are not shared.

This setting adds the name of a parameter to share with 51Degrees if needed.

Parameters
queryStringParameterName - the (case-insensitive) name of the query string parameter to include
Returns
this builder

◆ setIncludedQueryStringParameters() [1/2]

ShareUsageBuilderBase<T> fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >.setIncludedQueryStringParameters ( List< String >   queryStringParameterNames )

By default, query string parameters are not shared.

This setter replaces the current list, if any

This setting allows you to share these parameters with 51Degrees if needed.

Parameters
queryStringParameterNames - the (case-insensitive) names of the query string parameters to include
Returns
this builder

◆ setIncludedQueryStringParameters() [2/2]

ShareUsageBuilderBase<T> fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >.setIncludedQueryStringParameters ( String   queryStringParameterNames )

By default, query string parameters are not shared.

This setter replaces the current list, if any

This setting allows you to share these parameters with 51Degrees if needed.

Parameters
queryStringParameterNames - a comma separated list of (case-insensitive) names of the query string parameters to include
Returns
this builder

◆ setMaximumQueueSize()

Set the maximum number of entries to be stored in the queue to be sent.

This must be more than the minimum entries per message. If the queue reaches this size and a new item cannot be enqueued within the add timeout the item will be dropped.

By default, the value is 20* the default minimum entries per message, i.e. 1000 entries.

Parameters
size - the size to set
Returns
this builder

◆ setMinimumEntriesPerMessage()

ShareUsageBuilderBase<T> fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >.setMinimumEntriesPerMessage ( int   minimumEntriesPerMessage )

The usage element will group data into single requests before sending it.

This setting controls the minimum number of entries before data is sent. If you are sharing large amounts of data, increasing this value is recommended in order to reduce the overhead of sending HTTP messages.

The default value is 50.

Parameters
minimumEntriesPerMessage - the minimum number of entries to be aggregated by the ShareUsageElement before they are sent to the remote service
Returns
this builder

◆ setRepeatEvidenceIntervalMinutes()

ShareUsageBuilderBase<T> fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBuilderBase< T extends ShareUsageBase >.setRepeatEvidenceIntervalMinutes ( int   interval )

If exactly the same evidence values are seen multiple times within this time limit then they will only be shared once.

The default value for this is 0 - meaning always share.

Parameters
interval - the interval in minutes
Returns
this builder

◆ setSessionCookieName()

Set the name of the cookie that contains the session id.

The default value is "JSESSIONID"

This setting has no effect if TrackSession is false.

Parameters
cookieName - the name of the cookie that contains the session id
Returns
this builder

◆ setSharePercentage()

Set the percentage of data that the ShareUsageElement should be sharing.

Default is 100% represented as 1.0.

Parameters
sharePercentage - the proportion of events sent to the pipeline that should be shared to 51Degrees. 1 = 100%, 0.5 = 50%, etc.
Returns
this builder

◆ setShareUsageUrl()

Set the URL to use when sharing usage data.

The default is to send to 51Degrees - see Constants#SHARE_USAGE_DEFAULT_URL

Parameters
shareUsageUrl - the URL to use when sharing usage data
Returns
this builder

◆ setTakeTimeout()

Set the timeout in milliseconds to allow when attempting to take an item from the queue in order to send to the remote service.

Deprecated:
use setTakeTimeoutMillis(int)
Parameters
milliseconds - timeout to set
Returns
this builder

◆ setTakeTimeoutMillis()

Set the timeout in milliseconds to allow when attempting to take an item from the queue in order to send to the remote service.

Default value is 0, i.e. if there are no more items available, send straight away.

Parameters
milliseconds - timeout to set
Returns
this builder

◆ setTrackSession()

If set to true, the configured session cookie will be used to identify user sessions.

This will help to differentiate duplicate values that should not be shared.

Default value is false

Parameters
track - boolean value sets whether the usage element should track sessions
Returns
this builder
On This Page