DataSource.NET
7.1.24.51146-15262a0d
|
This interface allows applications to receive events about the state of DataSource.NET's connection to other DataSource peers. More...
Inherited by Caplin.DataSource.Publisher.PublisherBase.
Public Member Functions | |
void | PeerStatus (IPeerStatusEvent ev) |
Invoked when a DataSource peer changes state. More... | |
void | ServiceStatus (IServiceStatusEvent ev) |
Invoked when a DataService changes state. More... | |
This interface allows applications to receive events about the state of DataSource.NET's connection to other DataSource peers.
Should you wish to receive this information in your DataSource, then you must define a class that implements this interface and register it with DataSource.NET using the AddConnectionListener() method.
Once registered, the implementation will be informed of all changes to peer and DataService status.
The IConnectionListener methods are not called on a dedicated worker thread. Therefore, if any of these methods are likely take a relatively long time to execute, they should be coded to run in a separate thread.
The following class is an example implementation of IConnectionListener that logs connection status change events to the logger.
void Caplin.DataSource.IConnectionListener.PeerStatus | ( | IPeerStatusEvent | ev | ) |
Invoked when a DataSource peer changes state.
ev | An event containing information about the change in the peer's state. |
void Caplin.DataSource.IConnectionListener.ServiceStatus | ( | IServiceStatusEvent | ev | ) |
Invoked when a DataService changes state.
ev | An event containing information about the change in state of the data service. |