\r\n

51Degrees Pipeline Java  4.4

51Degrees Pipeline for Java

fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageElement Class Reference

Detailed Description

Flow element that sends usage data to 51Degrees for analysis.

See also
Specification

Inheritance diagram for fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageElement:

[legend]

Collaboration diagram for fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageElement:

[legend]

Classes

class  ReplacedString
replace characters that cause problems in XML with the "Replacement character" More...

Protected Member Functions

void  sendUsageData ()
Take data from the queue until there are fewer entries than the minimum batch size.
void  sendAsXML (List< ShareUsageData > allData) throws Exception
void  writeXmlData (XMLStreamWriter writer, ShareUsageData data) throws XMLStreamException
Output the data as XML. More...
void  writeXmlElement (XMLStreamWriter writer, String elementName, String elementContent) throws XMLStreamException
void  legacySendAsXML (List< ShareUsageData > allData) throws Exception
If there is an HttpClient we will use this as a legacy. More...

Protected Member Functions inherited from fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBase

 ShareUsageBase (Logger logger, double sharePercentage, int minimumEntriesPerMessage, int maximumQueueSize, int addTimeout, int takeTimeout, int repeatEvidenceIntervalMinutes, boolean trackSession, String shareUsageUrl, List< String > blockedHttpHeaders, List< String > includedQueryStringParameters, List< Map.Entry< String, String >> ignoreDataEvidenceFilter)
Constructor. More...
 ShareUsageBase (Logger logger, double sharePercentage, int minimumEntriesPerMessage, int maximumQueueSize, int addTimeout, int takeTimeout, int repeatEvidenceIntervalMinutes, boolean trackSession, String shareUsageUrl, List< String > blockedHttpHeaders, List< String > includedQueryStringParameters, List< Map.Entry< String, String >> ignoreDataEvidenceFilter, String sessionCookieName)
Constructor. More...
 ShareUsageBase (Logger logger, double sharePercentage, int minimumEntriesPerMessage, int maximumQueueSize, int addTimeout, int takeTimeout, int repeatEvidenceIntervalMinutes, boolean trackSession, String shareUsageUrl, List< String > blockedHttpHeaders, List< String > includedQueryStringParameters, List< Map.Entry< String, String >> ignoreDataEvidenceFilter, String sessionCookieName, Tracker tracker)
Constructor. More...
List< String >  getFlowElements ()
Return a list of FlowElement in the pipeline. More...
String  getHostAddress ()
Get the IP address of the machine that this code is running on. More...
void  processInternal (FlowData flowData)
void  cancel ()
Cancel the sending of usage data.
void  managedResourcesCleanup ()
void  unmanagedResourcesCleanup ()
void  trySendData ()
Attempt to send the data to the remote service. More...
abstract void  sendUsageData () throws HttpException

Protected Member Functions inherited from fiftyone.pipeline.core.flowelements.FlowElementBase< TData extends ElementData, TProperty extends ElementPropertyMetaData >

abstract void  processInternal (FlowData data) throws Exception
Abstract method to be overridden by a FlowElement author. More...
abstract void  managedResourcesCleanup ()
Cleanup any managed resources that the element is using.
abstract void  unmanagedResourcesCleanup ()
Cleanup any unmanaged resources that the element is using.
void  close (boolean closing)

Protected Attributes

int  httpSendTimeout = SHARE_USAGE_DEFAULT_HTTP_POST_TIMEOUT
Map< String, String >  headers = new HashMap<>() HttpClient  httpClient DataUploader  dataUploader = new DataUploaderHttp(shareUsageUrl, headers, httpSendTimeout) XMLOutputFactory  xmlOutputFactory

Protected Attributes inherited from fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageBase

final ExecutorService  executor = Executors.newSingleThreadExecutor()
Executor service used to start data sending threads.
BlockingQueue< ShareUsageData >  evidenceCollection
Queue used to store entries in memory prior to them being sent to 51Degrees.
int  takeTimeout
Timeout to use when taking from the queue.
final int  minEntriesPerMessage
The minimum number of request entries per message sent to 51Degrees.
final String  shareUsageUrl
The URL to send data to.
final String  osVersion
Version of the OS the pipeline is being run on, as reported by System.getProperty("os.name").
final String  languageVersion
The Java version the pipeline is being run on, as reported by System.getProperty("java.version")
final String  coreVersion
The version of the pipeline package.
long  lostData
Keep a count of data lost.
long  lostDataReset = LOST_DATA_RESET_DEFAULT
lostData is rest when it exceeds this value

Protected Attributes inherited from fiftyone.pipeline.core.flowelements.FlowElementBase< TData extends ElementData, TProperty extends ElementPropertyMetaData >

final Logger  logger TypedKey< TData >  typedKey = null

Member Function Documentation

◆ legacySendAsXML()

void fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageElement.legacySendAsXML ( List< ShareUsageData >   allData ) throws Exception
protected

If there is an HttpClient we will use this as a legacy.

Parameters
allData - data to send

◆ writeXmlData()

void fiftyone.pipeline.engines.fiftyone.flowelements.ShareUsageElement.writeXmlData ( XMLStreamWriter   writer,
ShareUsageData   data  
) throws XMLStreamException
protected

Output the data as XML.

Parameters
writer - an XMLWriter
data - the data to write
On This Page