![]() |
Diffusion .NET Classic API - Core and Common
5.9.4
|
The class responsible for sending ping messages to the Diffusion server at a specified interval. More...
Public Member Functions | |
DiffusionPingService (IDiffusionTopicConnector topicConnector, IDiffusionPingService receiver) | |
Constructor. More... | |
void | Start () |
Start sending heartbeat messages at the given frequency. More... | |
void | Stop () |
Stops the service. More... | |
void | ServerConnected (IDiffusionClientConnector connector) |
Notification of connection. More... | |
void | ServerConnectionAttemptFailed (IDiffusionClientConnector connector, ServerClosedEventArgs args) |
Notification of a failed connection attempt. More... | |
void | ServerTopicStatusChanged (IDiffusionClientConnector connector, string topicName, TopicStatus statusType) |
Notification that the status for a topic that was subscribed to has changed. More... | |
void | ServerRejectedCredentials (IDiffusionClientConnector connector, V4Credentials credentials) |
Notification of rejected credentials from the server. More... | |
void | ServerDisconnected (IDiffusionClientConnector connector, ServerClosedEventArgs args) |
Notification of disconnection. More... | |
bool | HandleTopicMessage (IMessageSource source, ITopicMessage message) |
Handles a message received from an IMessageSource. More... | |
Properties | |
bool | AutoStop [get, set] |
Determines whether the service should stop itself when it detects that the Diffusion server has closed. Otherwise, the service should be stopped manually. More... | |
int | InactivityPeriod [get, set] |
Get/set the period of inactivity before the heartbeats restart. More... | |
bool | SendingMessages [get, set] |
Is this service sending messages? More... | |
int | Count [get, set] |
Get/set the number of ping messages to send. More... | |
int | Frequency [get, set] |
Get/set the frequency at which to send heartbeat messages. More... | |
Events | |
EventHandler< EventArgs > | Started |
The event fired when the ping service is started. More... | |
EventHandler< EventArgs > | Stopped |
The event fired when the ping service is stopped. More... | |
EventHandler < PingServiceEventArgs > | OnPing |
The event fired when a ping is sent. More... | |
The class responsible for sending ping messages to the Diffusion server at a specified interval.
PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.DiffusionPingService | ( | IDiffusionTopicConnector | topicConnector, |
IDiffusionPingService | receiver | ||
) |
Constructor.
topicConnector | |
receiver | The recipient of the calls. |
bool PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.HandleTopicMessage | ( | IMessageSource | source, |
ITopicMessage | message | ||
) |
Handles a message received from an IMessageSource.
This will handle an incoming message from a specified source.
source | The message source. |
message | The message. |
Implements PushTechnology.DiffusionCore.Messaging.Topic.ITopicListener.
void PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.ServerConnected | ( | IDiffusionClientConnector | connector | ) |
Notification of connection.
This is called when a connection to a server is established.
connector | The server connector. |
Implements PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener.
void PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.ServerConnectionAttemptFailed | ( | IDiffusionClientConnector | connector, |
ServerClosedEventArgs | args | ||
) |
Notification of a failed connection attempt.
The reason for the failure can be established by checking the state of the connection using IDiffusionClientConnector.State.
connector | |
args |
Implements PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener.
void PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.ServerDisconnected | ( | IDiffusionClientConnector | connector, |
ServerClosedEventArgs | args | ||
) |
Notification of disconnection.
The reason for the disconnection can be established by checking the state of the connection using IDiffusionClientConnector.State.
connector | The server connector. |
args | The arguments which can be interrogated for the state and details of a server closure. |
Implements PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener.
void PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.ServerRejectedCredentials | ( | IDiffusionClientConnector | connector, |
V4Credentials | credentials | ||
) |
Notification of rejected credentials from the server.
connector | |
credentials |
Implements PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener.
void PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.ServerTopicStatusChanged | ( | IDiffusionClientConnector | connector, |
string | topicName, | ||
TopicStatus | statusType | ||
) |
Notification that the status for a topic that was subscribed to has changed.
connector | The connector. |
topicName | The name of the topic on which the status has changed. |
statusType | The topic status change type. |
Implements PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener.
void PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.Start | ( | ) |
Start sending heartbeat messages at the given frequency.
void PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.Stop | ( | ) |
Stops the service.
|
getset |
Determines whether the service should stop itself when it detects that the Diffusion server has closed. Otherwise, the service should be stopped manually.
|
getset |
Get/set the number of ping messages to send.
|
getset |
Get/set the frequency at which to send heartbeat messages.
|
getset |
Get/set the period of inactivity before the heartbeats restart.
|
getset |
Is this service sending messages?
EventHandler<PingServiceEventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.OnPing |
The event fired when a ping is sent.
EventHandler<EventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.Started |
The event fired when the ping service is started.
EventHandler<EventArgs> PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.Stopped |
The event fired when the ping service is stopped.