PreEmptive Analytics .NET API  1.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Public Attributes | Properties | List of all members
PreEmptive.Analytics.Common.CoreClient Class Reference

Class that handles all of the common functionality for the Client. More...

Inherits PreEmptive.Analytics.Common.IClientToolsProvider.

Public Member Functions

 CoreClient (IPlatform platform, ILogger logger=null)
 The constructor for the Client. More...
 
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...
 
bool ApplicationStart (Configuration configuration, ExtendedKeys keys=null, BinaryInfo binary=null, IFlowController flowController=null)
 
void ApplicationStop (ExtendedKeys keys=null, BinaryInfo binary=null, bool synchronous=true, bool immediate=false)
 Stops the PreEmptive Analytics client. More...
 
void FeatureTick (string name, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a message representing the occurrence of a feature. More...
 
void FeatureTick (string name, Guid?session, BinaryInfo binary=null)
 Sends a message representing the occurrence of a feature. More...
 
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...
 
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...
 
void ReportException (ExceptionInfo exceptionInfo, bool optinOverride=false, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a message representing an exception. More...
 
void ReportTamper (ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null, Configuration config=null)
 Sends a message reporting a tampering of the application. More...
 
void ReportDebugging (bool optinOverride=false, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null, Configuration config=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...
 
void SystemProfile (ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a system profile message. More...
 
void PerformanceProbe (string name, ExtendedKeys keys=null, Guid?session=null, BinaryInfo binary=null)
 Sends a message describing the performance of the device and the applicaion. More...
 
void SendMessages ()
 Signals the Client to send all of the messages that are currently in the queue. More...
 
void SetSendDisabled (bool value)
 Disables or enables the sending of messages for the currently running Client. More...
 
void SetSessionOptIn (bool value, Configuration config=null)
 Enables or disables the optIn setting for the currently running Client. More...
 

Public Attributes

const string InstanceIdKey = "InstanceID"
 Value used to retrieve the instance ID. More...
 
const string GeneratedUserNameKey = "GeneratedUserName"
 The key to retrieve the generated user name. More...
 

Properties

IFlowController FlowController [get, set]
 A FlowController instance used to define the Client's interaction with the server. More...
 
IPlatform Platform [get, set]
 Platform specific implementations of methods. More...
 
ILogger Logger [get, set]
 The current Logger instance being used More...
 
bool AppStarted [get, set]
 If the Client has been started. More...
 
IMessageQueue MessageQueue [get, set]
 The MessageQueue instance that handles the queueing and sending of messages. More...
 
Configuration Configuration [get, set]
 The instance of Configuration that defines the behavior of the Client. More...
 
FeatureCorrelator Correlator [get, set]
 The instance of a FeatureCorrelator that is used by the Client. More...
 
- Properties inherited from PreEmptive.Analytics.Common.IClientToolsProvider
bool AppStarted [get]
 A value representing if the Client is started or not More...
 
- Properties inherited from PreEmptive.Analytics.Common.IConfigurationProvider
Configuration Configuration [get]
 The current Client's Configuration More...
 
- Properties inherited from PreEmptive.Analytics.Common.ILoggerProvider
ILogger Logger [get]
 The logger provided More...
 
- Properties inherited from PreEmptive.Analytics.Common.IPlatformProvider
IPlatform Platform [get]
 The platform provided More...
 

Detailed Description

Class that handles all of the common functionality for the Client.

Constructor & Destructor Documentation

PreEmptive.Analytics.Common.CoreClient.CoreClient ( IPlatform  platform,
ILogger  logger = null 
)

The constructor for the Client.

Parameters
platformThe instance of an IPlatform object that is used to create the Client object.
loggerILogger instance that determines how logging is done.

Member Function Documentation

void PreEmptive.Analytics.Common.CoreClient.ApplicationStop ( ExtendedKeys  keys = null,
BinaryInfo  binary = null,
bool  synchronous = true,
bool  immediate = false 
)

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.
synchronousShould stopping be done synchrounsly?
immediateActually stop the instance, rather than trigger the session extension timer(if configured)
void PreEmptive.Analytics.Common.CoreClient.FeatureStart ( string  name,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null,
Guid?  group = null 
)

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.
void PreEmptive.Analytics.Common.CoreClient.FeatureStop ( string  name,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null,
Guid?  group = null 
)

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.
void PreEmptive.Analytics.Common.CoreClient.FeatureTick ( string  name,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)

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.
void PreEmptive.Analytics.Common.CoreClient.FeatureTick ( string  name,
Guid?  session,
BinaryInfo  binary = null 
)

Sends a message representing the occurrence of a feature.

Parameters
nameA unique name for the feature.
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.
Guid PreEmptive.Analytics.Common.CoreClient.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

summary> Starts the PreEmptive Analytics client.

Before the client system has been started any attempts to send messages of any type are ignored. If the client system is running, i.e. ApplicationStart() has previously been called and ApplicationStop() not yet called, then the start request is ignored.

Parameters
configurationA non-null Configuration instance used to define the configuration of the Client. Minimally the ApplicationID and CompanyID properties must be set.
binaryAn optional BinaryInfo instance used to send additional information about the caller of the method to the server.
keysAn optional ExtendedKeys instance used to send additional information to the server.
flowControllerAn optional FlowController instance used to define the Client's interaction with the server.
Returns
true if the request was accepted and the PA Client is now running
void PreEmptive.Analytics.Common.CoreClient.PerformanceProbe ( string  name,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)

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.
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.
void PreEmptive.Analytics.Common.CoreClient.ReportDebugging ( bool  optinOverride = false,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null,
Configuration  config = null 
)

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.
configThe Configuration instance to use to start the API
void PreEmptive.Analytics.Common.CoreClient.ReportException ( ExceptionInfo  exceptionInfo,
bool  optinOverride = false,
ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)

Sends a message representing an exception.

Parameters
exceptionInfoAn instance of ExceptionInfo that holds information that populates the exception message.
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.
virtual void PreEmptive.Analytics.Common.CoreClient.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.
virtual void PreEmptive.Analytics.Common.CoreClient.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.
void PreEmptive.Analytics.Common.CoreClient.ReportTamper ( ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null,
Configuration  config = null 
)

Sends a message reporting a tampering of the application.

Parameters
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.
configThe Configuration instance to use to start the API
void PreEmptive.Analytics.Common.CoreClient.SendMessages ( )

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

void PreEmptive.Analytics.Common.CoreClient.SetSendDisabled ( bool  value)

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

Parameters
valueWhether or not the sending of messages should be disabled.
void PreEmptive.Analytics.Common.CoreClient.SetSessionOptIn ( bool  value,
Configuration  config = null 
)

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

Parameters
valueThe value to set optIn to.
configIf the opt-in value is true and the API isn't started, use this configuration object to start the client
void PreEmptive.Analytics.Common.CoreClient.SystemProfile ( ExtendedKeys  keys = null,
Guid?  session = null,
BinaryInfo  binary = null 
)

Sends a system profile message.

Member Data Documentation

const string PreEmptive.Analytics.Common.CoreClient.GeneratedUserNameKey = "GeneratedUserName"

The key to retrieve the generated user name.

const string PreEmptive.Analytics.Common.CoreClient.InstanceIdKey = "InstanceID"

Value used to retrieve the instance ID.

Property Documentation

bool PreEmptive.Analytics.Common.CoreClient.AppStarted
getset

If the Client has been started.

Configuration PreEmptive.Analytics.Common.CoreClient.Configuration
getset

The instance of Configuration that defines the behavior of the Client.

FeatureCorrelator PreEmptive.Analytics.Common.CoreClient.Correlator
getset

The instance of a FeatureCorrelator that is used by the Client.

IFlowController PreEmptive.Analytics.Common.CoreClient.FlowController
getset

A FlowController instance used to define the Client's interaction with the server.

ILogger PreEmptive.Analytics.Common.CoreClient.Logger
getset

The current Logger instance being used

IMessageQueue PreEmptive.Analytics.Common.CoreClient.MessageQueue
getset

The MessageQueue instance that handles the queueing and sending of messages.

IPlatform PreEmptive.Analytics.Common.CoreClient.Platform
getset

Platform specific implementations of methods.


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