Diffusion .NET Classic API - Core and Common  5.9.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper Class Reference

Handles connections to the Diffusion server and optionally retries the connection. More...

Inheritance diagram for PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper:
PushTechnology.DiffusionCore.Connection.Services.IDiffusionReconnectorEvents

Public Member Functions

 DiffusionConnectionHelper (IDiffusionClientEvents eventHandler)
 Constructor. More...
 
void Start ()
 Starts the service, that is, the timer controlling reconnection attempts. More...
 
void Stop (bool notify=true)
 Stops the service. More...
 

Properties

bool Enabled [get, set]
 Indicates whether the service is enabled. If false, no connection retries will be performed. More...
 
bool StopRequested [get, set]
 Flag to request that the service stops when it has finished its most recent reconnection attempt. More...
 
bool IsRunning [get, set]
 Indicates whether the service is running. More...
 
int ReconnectAttempts [get, set]
 The number of reconnection attempts. Defaults to 10. More...
 
int ReconnectInterval [get, set]
 The interval between retry attempts (ms). Defaults to 1000 (1 second). More...
 

Events

EventHandler< EventArgs > OnConnect
 The event fired to notify subscribers that they should attempt to connect. More...
 
EventHandler
< DiffusionReconnectionEventArgs
Started
 The event fired when the service has started. More...
 
EventHandler
< DiffusionReconnectionEventArgs
Stopped
 The event fired when the service has stopped. More...
 
EventHandler
< DiffusionReconnectionEventArgs
Reconnecting
 The event fired when the service is attempting to reconnect. More...
 
EventHandler
< DiffusionReconnectionEventArgs
Completed
 The event fired when the service has completed, i.e. it has tried to connect ReconnectAttempts times. More...
 
EventHandler
< DiffusionReconnectionEventArgs
EnabledChanged
 The event fired when the state of the 'Enabled' flag changes. More...
 
- Events inherited from PushTechnology.DiffusionCore.Connection.Services.IDiffusionReconnectorEvents
EventHandler< EventArgs > OnConnect
 The event fired to notify subscribers that they should attempt to connect. More...
 
EventHandler
< DiffusionReconnectionEventArgs
Started
 The event fired when the service has started. More...
 
EventHandler
< DiffusionReconnectionEventArgs
Stopped
 The event fired when the service has stopped. More...
 
EventHandler
< DiffusionReconnectionEventArgs
Reconnecting
 The event fired when the service is attempting to reconnect. More...
 
EventHandler
< DiffusionReconnectionEventArgs
Completed
 The event fired when the service has completed, i.e. it has tried to connect 'ReconnectAttempts' times. More...
 
EventHandler
< DiffusionReconnectionEventArgs
EnabledChanged
 The event fired when the state of the 'Enabled' flag changes. More...
 

Detailed Description

Handles connections to the Diffusion server and optionally retries the connection.

Constructor & Destructor Documentation

PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.DiffusionConnectionHelper ( IDiffusionClientEvents  eventHandler)

Constructor.

Parameters
eventHandler

Member Function Documentation

void PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Start ( )

Starts the service, that is, the timer controlling reconnection attempts.

void PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Stop ( bool  notify = true)

Stops the service.

Property Documentation

bool PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Enabled
getset

Indicates whether the service is enabled. If false, no connection retries will be performed.

bool PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.IsRunning
getset

Indicates whether the service is running.

int PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.ReconnectAttempts
getset

The number of reconnection attempts. Defaults to 10.

int PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.ReconnectInterval
getset

The interval between retry attempts (ms). Defaults to 1000 (1 second).

bool PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.StopRequested
getset

Flag to request that the service stops when it has finished its most recent reconnection attempt.

Event Documentation

EventHandler<DiffusionReconnectionEventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Completed

The event fired when the service has completed, i.e. it has tried to connect ReconnectAttempts times.

EventHandler<DiffusionReconnectionEventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.EnabledChanged

The event fired when the state of the 'Enabled' flag changes.

EventHandler<EventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.OnConnect

The event fired to notify subscribers that they should attempt to connect.

EventHandler<DiffusionReconnectionEventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Reconnecting

The event fired when the service is attempting to reconnect.

EventHandler<DiffusionReconnectionEventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Started

The event fired when the service has started.

EventHandler<DiffusionReconnectionEventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionHelper.Stopped

The event fired when the service has stopped.