PreEmptive Analytics .NET API  1.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
PreEmptive.Analytics.Common.PlatformClient Class Referenceabstract

Class that serves as a bridge between the CoreClient and platforms that cannot directly instatiate the CoreClient. More...

Inherits PreEmptive.Analytics.Common.IPlatformClient.

Public Member Functions

Guid GetActiveDefaultSession ()
 Gets the Session ID that is being used for the current API run. This ID can be passed to other APIs to activate subordinate mode. More...
 
 PlatformClient (string companyID, string applicationID, ILogger logger)
 Constructor for the PlatformClient. More...
 
 PlatformClient (Guid companyID, Guid applicationID, ILogger logger)
 Constructor for the PlatformClient. More...
 
 PlatformClient (Common.Configuration config, ILogger logger)
 Constructor for the PlatformClient. More...
 
virtual bool ApplicationStart (ExtendedKeys keys=null, BinaryInfo binary=null, IFlowController flowController=null)
 Starts the client system if it has not yet been started and sends an application start message. More...
 
virtual void ApplicationStop (ExtendedKeys keys=null, BinaryInfo binary=null, bool immediate=false)
 Stops the PreEmptive Analytics client. More...
 
virtual void ApplicationStopSync (ExtendedKeys keys=null, BinaryInfo binary=null, bool immediate=false)
 Stops the PreEmptive Analytics client in a synchronous manner. More...
 
virtual void ApplicationStopAsync (ExtendedKeys keys=null, BinaryInfo binary=null, bool immediate=false)
 Stops the PreEmptive Analytics client in an asynchronous manner. More...
 
virtual void FeatureTick (string name, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a message representing the occurrence of a feature. More...
 
virtual void FeatureStart (string name, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null, Guid?group=null)
 Sends a message representing the start of a feature. More...
 
virtual void FeatureStartWithGroup (string name, Guid group, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a message representing the start of a feature. More...
 
virtual void FeatureStopWithGroup (string name, Guid group, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a message representing the stop of a feature. More...
 
virtual void FeatureStop (string name, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null, Guid?group=null)
 Sends a message representing the stop of a feature. More...
 
virtual void ReportTamper (ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a message reporting that the application has been tampered with. More...
 
virtual void ReportDebugging (bool optinOverride=false, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a message reporting debugging of the application. More...
 
virtual void ReportExpiration (Guid slid, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a message reporting that the application's license has expired. More...
 
virtual void ReportExpirationWarning (Guid slid, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a message reporting that the user has been warned that the application's license is close to expiration More...
 
virtual void ReportException (ExceptionInfo exceptionInfo)
 Sends a message representing an exception. More...
 
virtual void ReportException (ExceptionInfo exceptionInfo, ExtendedKeys keys, Guid?session=null, BinaryInfo binary=null)
 Sends a message representing an exception. More...
 
virtual void ReportException (ExceptionInfo exceptionInfo, bool optInOverride, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a message representing an exception. More...
 
virtual void SystemProfile (ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a system profile message. More...
 
virtual void PerformanceProbe (string name, ExtendedKeys keys=null, Guid?session=null, BinaryInfo info=null)
 Sends a message describing the performance of the device and the applicaion. More...
 
virtual Guid NewFeatureGroup ()
 Used to get a new Guid for a feature group. More...
 
virtual void SetSendDisabled (bool value)
 Disables or enables the sending of messages for the currently running Client. More...
 
virtual void SendMessages ()
 Signals the Client to send all of the messages that are currently in the queue. More...
 
virtual void SetSessionOptIn (bool value)
 Enables or disables the optIn setting for the currently running Client. More...
 

Static Public Member Functions

static
Configuration.ApplicationStopBehavior 
CoreDefaultStopBehavior ()
 Gets the usual ApplicationStop behavior defaults that are appropriate for most platforms More...
 

Protected Member Functions

abstract IPlatform GetNewPlatform ()
 Retrieves the platform the of the device. More...
 

Properties

Configuration StartupConfiguration [get, set]
 The Configuration object that defines the behavior of the Client. More...
 
ILogger Logger [get, set]
 ILogger instance that determines how logging is done. More...
 
virtual CoreClient Core [get]
 The underlying CoreClient instance used by the PlatformClient. More...
 
- Properties inherited from PreEmptive.Analytics.Common.IPlatformClient
CoreClient Core [get]
 The underlying CoreClient instance used by the PlatformClient. More...
 

Detailed Description

Class that serves as a bridge between the CoreClient and platforms that cannot directly instatiate the CoreClient.

Constructor & Destructor Documentation

PreEmptive.Analytics.Common.PlatformClient.PlatformClient ( string  companyID,
string  applicationID,
ILogger  logger 
)

Constructor for the PlatformClient.

Parameters
companyIDA Guid that represents the companyID.
applicationIDA Guid that represents the applicationID.
loggerILogger instance that determines how logging is done.
PreEmptive.Analytics.Common.PlatformClient.PlatformClient ( Guid  companyID,
Guid  applicationID,
ILogger  logger 
)

Constructor for the PlatformClient.

Parameters
companyIDA Guid that represents the companyID.
applicationIDA Guid that represents the applicationID.
loggerILogger instance that determines how logging is done.
PreEmptive.Analytics.Common.PlatformClient.PlatformClient ( Common.Configuration  config,
ILogger  logger 
)

Constructor for the PlatformClient.

Parameters
configA Configuration object that defines the behavior of the Client.

Modifying the configuration object will have no effect on the behavior of the API after calling ApplicationStart

Parameters
loggerILogger instance that determines how logging is done.

Member Function Documentation

virtual bool PreEmptive.Analytics.Common.PlatformClient.ApplicationStart ( ExtendedKeys  keys = null,
BinaryInfo  binary = null,
IFlowController  flowController = null 
)
virtual

Starts the client system if it has not yet been started and sends an application start message.

Parameters
keysAn optional ExtendedKeys instance used to send additional information to the server.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.
flowControllerAn optional FlowController instance used to define the Client's interaction with the server.
Returns
Returns true if the request was accepted and the PA Client is now running.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.ApplicationStop ( ExtendedKeys  keys = null,
BinaryInfo  binary = null,
bool  immediate = false 
)
virtual

Stops the PreEmptive Analytics client.

This method halts the client system and releases all connections and resources used by it. To continue interaction with the client system ApplicationStart() will need to be called again: all other requests to the Client will be ignored. If the client system is not currently running then the request is ignored.

Parameters
keysAn optional ExtendedKeys instance used to send additional information to the server.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.
immediateIf the API instance is configured for session extension, this can be used to immediately stop the API

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.ApplicationStopAsync ( ExtendedKeys  keys = null,
BinaryInfo  binary = null,
bool  immediate = false 
)
virtual

Stops the PreEmptive Analytics client in an asynchronous manner.

This method halts the client system and releases all connections and resources used by it. To continue interaction with the client system ApplicationStart() will need to be called again: all other requests to the Client will be ignored. If the client system is not currently running then the request is ignored.

Parameters
keysAn optional ExtendedKeys instance used to send additional information to the server.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.
immediateIf the API instance is configured for session extension, this can be used to immediately stop the API

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.ApplicationStopSync ( ExtendedKeys  keys = null,
BinaryInfo  binary = null,
bool  immediate = false 
)
virtual

Stops the PreEmptive Analytics client in a synchronous manner.

This method halts the client system and releases all connections and resources used by it. To continue interaction with the client system ApplicationStart() will need to be called again: all other requests to the Client will be ignored. If the client system is not currently running then the request is ignored.

Parameters
keysAn optional ExtendedKeys instance used to send additional information to the server.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.
immediateIf the API instance is configured for session extension, this can be used to immediately stop the API

Implements PreEmptive.Analytics.Common.IPlatformClient.

static Configuration.ApplicationStopBehavior PreEmptive.Analytics.Common.PlatformClient.CoreDefaultStopBehavior ( )
static

Gets the usual ApplicationStop behavior defaults that are appropriate for most platforms

Returns
virtual void PreEmptive.Analytics.Common.PlatformClient.FeatureStart ( string  name,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null,
Guid?  group = null 
)
virtual

Sends a message representing the start of a feature.

Parameters
nameA unique name for the feature.
keysAn optional ExtendedKeys instance used to send additional information to the server.
sessionA Guid defining the session for the Client.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.
groupA Guid representing the message group.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.FeatureStartWithGroup ( string  name,
Guid  group,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)
virtual

Sends a message representing the start of a feature.

Parameters
nameA unique name for the feature.
groupA Guid representing the message group.
keysAn optional ExtendedKeys instance used to send additional information to the server.
sessionA Guid defining the session for the Client.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.FeatureStop ( string  name,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null,
Guid?  group = null 
)
virtual

Sends a message representing the stop of a feature.

Parameters
nameA unique name for the feature.
groupA Guid representing the message group.
keysAn optional ExtendedKeys instance used to send additional information to the server.
sessionA Guid defining the session for the Client.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.FeatureStopWithGroup ( string  name,
Guid  group,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)
virtual

Sends a message representing the stop of a feature.

Parameters
nameA unique name for the feature.
groupA Guid representing the message group.
keysAn optional ExtendedKeys instance used to send additional information to the server.
sessionA Guid defining the session for the Client.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.FeatureTick ( string  name,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)
virtual

Sends a message representing the occurrence of a feature.

Parameters
nameA unique name for the feature.
keysAn optional ExtendedKeys instance used to send additional information to the server.
sessionA Guid defining the session for the Client.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.

Implements PreEmptive.Analytics.Common.IPlatformClient.

Guid PreEmptive.Analytics.Common.PlatformClient.GetActiveDefaultSession ( )

Gets the Session ID that is being used for the current API run. This ID can be passed to other APIs to activate subordinate mode.

Returns
The Session ID
abstract IPlatform PreEmptive.Analytics.Common.PlatformClient.GetNewPlatform ( )
protectedpure virtual

Retrieves the platform the of the device.

Returns
An object that defines the platform.
virtual Guid PreEmptive.Analytics.Common.PlatformClient.NewFeatureGroup ( )
virtual

Used to get a new Guid for a feature group.

Returns
Returns a new Guid.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.PerformanceProbe ( string  name,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  info = null 
)
virtual

Sends a message describing the performance of the device and the applicaion.

Parameters
nameA name that describes the point at which the performance probe is performend. The name must not be null or empty.
keysAn ExtendedKeys instance used to send additional information to the server.
infoAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.
sessionA Guid defining the session for the Client.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.ReportDebugging ( bool  optinOverride = false,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)
virtual

Sends a message reporting debugging of the application.

Parameters
optinOverrideDetermines if the currently configured OptIn setting should be ignored.
keysAn ExtendedKeys instance used to send additional information to the server.
sessionA Guid defining the session for the Client.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.ReportException ( ExceptionInfo  exceptionInfo)
virtual

Sends a message representing an exception.

Parameters
exceptionInfoAn instance of ExceptionInfo that holds information that populates the exception message.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.ReportException ( ExceptionInfo  exceptionInfo,
ExtendedKeys  keys,
Guid?  session = null,
BinaryInfo  binary = null 
)
virtual

Sends a message representing an exception.

Parameters
exceptionInfoAn instance of ExceptionInfo that holds information that populates the exception message.
keysAn ExtendedKeys instance used to send additional information to the server.
sessionA Guid defining the session for the Client.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.ReportException ( ExceptionInfo  exceptionInfo,
bool  optInOverride,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)
virtual

Sends a message representing an exception.

Parameters
exceptionInfoAn instance of ExceptionInfo that holds information that populates the exception message.
optInOverrideShould the optIn setting be overridden.
keysAn ExtendedKeys instance used to send additional information to the server.
sessionA Guid defining the session for the Client.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.ReportExpiration ( Guid  slid,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)
virtual

Sends a message reporting that the application's license has expired.

Parameters
slidThe shelflife ID of the application
sessionA Guid that identifies the current session.
keysExtended key information to be sent with the message.
binaryBinary info that describes the application where the request originated.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.ReportExpirationWarning ( Guid  slid,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)
virtual

Sends a message reporting that the user has been warned that the application's license is close to expiration

Parameters
slidThe shelflife ID of the application
sessionA Guid that identifies the current session.
keysExtended key information to be sent with the message.
binaryBinary info that describes the application where the request originated.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.ReportTamper ( ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)
virtual

Sends a message reporting that the application has been tampered with.

Parameters
keysAn optional ExtendedKeys instance used to send additional information to the server.
sessionA Guid defining the session for the Client.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.SendMessages ( )
virtual

Signals the Client to send all of the messages that are currently in the queue.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.SetSendDisabled ( bool  value)
virtual

Disables or enables the sending of messages for the currently running Client.

Parameters
valueWhether or not the sending of messages should be disabled.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.SetSessionOptIn ( bool  value)
virtual

Enables or disables the optIn setting for the currently running Client.

Parameters
valueThe value to set optIn to.

Implements PreEmptive.Analytics.Common.IPlatformClient.

virtual void PreEmptive.Analytics.Common.PlatformClient.SystemProfile ( ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)
virtual

Sends a system profile message.

Parameters
keysAn ExtendedKeys instance used to send additional information to the server.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.
sessionA Guid defining the session for the Client.

Implements PreEmptive.Analytics.Common.IPlatformClient.

Property Documentation

virtual CoreClient PreEmptive.Analytics.Common.PlatformClient.Core
get

The underlying CoreClient instance used by the PlatformClient.

ILogger PreEmptive.Analytics.Common.PlatformClient.Logger
getset

ILogger instance that determines how logging is done.

Configuration PreEmptive.Analytics.Common.PlatformClient.StartupConfiguration
getset

The Configuration object that defines the behavior of the Client.


The documentation for this class was generated from the following file: