Diffusion .NET Classic API - Core and Common  5.9.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener Interface Reference

The interface for any object that is to listen for events from a server connection. More...

Inheritance diagram for PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener:
PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionService< TClient > PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService

Public Member Functions

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...
 

Detailed Description

The interface for any object that is to listen for events from a server connection.

When such a listener is used for more than one connection then it is important that any processing within the implemented methods is thread safe as a method could be called from more than one thread at the same time. The easiest way to achieve this would be simply to synchronize the methods themselves.

Member Function Documentation

void PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener.ServerConnected ( IDiffusionClientConnector  connector)

Notification of connection.

This is called when a connection to a server is established.

Parameters
connectorThe server connector.

Implemented in PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionService< TClient >, and PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.

void PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener.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.

Parameters
connector
args

Implemented in PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionService< TClient >, and PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.

void PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener.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.

Parameters
connectorThe server connector.
argsThe arguments which can be interrogated for the state and details of a server closure.

Implemented in PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionService< TClient >, and PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.

void PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener.ServerRejectedCredentials ( IDiffusionClientConnector  connector,
V4Credentials  credentials 
)

Notification of rejected credentials from the server.

Parameters
connector
credentials

Implemented in PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionService< TClient >, and PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.

void PushTechnology.DiffusionCore.Connection.Interfaces.IServerConnectionListener.ServerTopicStatusChanged ( IDiffusionClientConnector  connector,
string  topicName,
TopicStatus  statusType 
)

Notification that the status for a topic that was subscribed to has changed.

Parameters
connectorThe connector.
topicNameThe name of the topic on which the status has changed.
statusTypeThe topic status change type.

Implemented in PushTechnology.DiffusionCore.Connection.Services.DiffusionConnectionService< TClient >, and PushTechnology.DiffusionCore.Connection.Services.DiffusionPingService.