DataSource.NET  6.2.20.310828
Caplin.DataSource.IDataSource Interface Reference

This interface defines the main interface of DataSoure.NET. In order to obtain an instance of this interface, you must create an instance of Caplin.DataSource.DataSource. More...

Inheritance diagram for Caplin.DataSource.IDataSource:
Caplin.DataSource.DataSource

Public Member Functions

void AddChannelListener (INamespace nspace, IChannelListener listener)
 Registers an IChannelListener for the specified namespace. More...
 
void AddConnectionListener (IConnectionListener listener)
 Adds a connection listener that receives status events about the state of the DataSource application's connection to other peers. More...
 
void AddGenericChannelListener (INamespace nspace, Caplin.DataSource.Channel.IChannelListener listener)
 Registers an IChannelListener for the specified namespace. Use for Generic Messages More...
 
IActivePublisher CreateActivePublisher (INamespace nameSpace, IDataProvider provider)
 Creates an active publisher for the specified namespace. More...
 
IActiveSubscription CreateActiveSubscription (string subject, ISubscriptionListener listener)
 Creates an active subscription to an individual subject. More...
 
IBroadcastPublisher CreateBroadcastPublisher (INamespace nameSpace)
 Creates a broadcast publisher for the specified namespace. More...
 
IBroadcastSubscription CreateBroadcastSubscription (INamespace nspace, ISubscriptionListener listener)
 Creates a subscription to many subjects. The scope of the subscription is defined by a namespace. More...
 
ICompatibilityPublisher CreateCompatibilityPublisher (INamespace nameSpace, IDataProvider provider)
 Creates a compatibility publisher for the specified namespace. More...
 
void RemoveConnectionListener (IConnectionListener listener)
 Removes a previously registered connection listener. More...
 
void SetStatusDown ()
 Sets the status of this DataSource application to down. More...
 
void SetStatusUp ()
 Sets the status of this DataSource application to up. More...
 
void Start ()
 Starts this DataSource. More...
 
void Stop ()
 

Properties

IFieldManager FieldManager [get]
 Provides access to the Field Manager associated with this DataSource. More...
 
ILogger Logger [get, set]
 Gets or sets the logger used by DataSource.NET More...
 
IMonitoringServer MonitoringServer [get]
 Gets the monitoring server for this DataSource. More...
 
IList< IPeerPeers [get]
 Gets a list of all the configured DataSource peers. More...
 

Detailed Description

This interface defines the main interface of DataSoure.NET. In order to obtain an instance of this interface, you must create an instance of Caplin.DataSource.DataSource.

This interface is provided for ease of unit testing.

Member Function Documentation

void Caplin.DataSource.IDataSource.AddChannelListener ( INamespace  nspace,
IChannelListener  listener 
)

Registers an IChannelListener for the specified namespace.

Parameters
nspaceThe namespace defining the subjects within the channel.
listenerA listener to receive events related to the channel.
void Caplin.DataSource.IDataSource.AddConnectionListener ( IConnectionListener  listener)

Adds a connection listener that receives status events about the state of the DataSource application's connection to other peers.

Parameters
listenerThe IConnectionListener to be registered

Once registered, the IConnectionListener will receive event updates whenever the connection status has changed (for details see the description of

See also
IConnectionListener

).

You can register more than one IConnectionListener with DataSource. Each registered IConnectionListener will receive events for changes to all peers' connection statuses.

Implemented in Caplin.DataSource.DataSource.

void Caplin.DataSource.IDataSource.AddGenericChannelListener ( INamespace  nspace,
Caplin.DataSource.Channel.IChannelListener  listener 
)

Registers an IChannelListener for the specified namespace. Use for Generic Messages

Parameters
nspaceThe namespace defining the subjects within the channel.
listenerA listener to receive events related to the channel.

Implemented in Caplin.DataSource.DataSource.

IActivePublisher Caplin.DataSource.IDataSource.CreateActivePublisher ( INamespace  nameSpace,
IDataProvider  provider 
)

Creates an active publisher for the specified namespace.

Parameters
nameSpaceThe namespace (see remarks).
providerYour implementation of IDataProvider that the publisher will call.
Returns
A active publisher for the supplied namespace.

An IActivePublisher publishes updates that are for subjects within the specified INamespace, to all peers that have subscribed to those subjects. Because it does not maintain a cache, this publisher passes all requests and the final discard for such subjects on to the IDataProvider.

Implemented in Caplin.DataSource.DataSource.

IActiveSubscription Caplin.DataSource.IDataSource.CreateActiveSubscription ( string  subject,
ISubscriptionListener  listener 
)

Creates an active subscription to an individual subject.

Parameters
subjectThe subject to subscribe to.
listenerA listener to receive events raised for the IBroadcastSubscription.
Returns
An IActiveSubscription that represents the subscription to the subject.

If a data service has been configured that matches the given subject and active peers within that data service are connected, a request will be made to those peers for the specified subject.

Implemented in Caplin.DataSource.DataSource.

IBroadcastPublisher Caplin.DataSource.IDataSource.CreateBroadcastPublisher ( INamespace  nameSpace)

Creates a broadcast publisher for the specified namespace.

Parameters
nameSpaceThe namespace (see remarks).
Returns
A broadcast publisher

An IBroadcastPublisher permits a DataSource to broadcast, to all connected peers, updates that are for subjects within the specified INamespace

Implemented in Caplin.DataSource.DataSource.

IBroadcastSubscription Caplin.DataSource.IDataSource.CreateBroadcastSubscription ( INamespace  nspace,
ISubscriptionListener  listener 
)

Creates a subscription to many subjects. The scope of the subscription is defined by a namespace.

Parameters
nspaceThe namespace defining the subjects to subscribe to.
listenerA listener to receive events raised for the IBroadcastSubscription.
Returns
An IBroadcastSubscription that represents the subscription to the namespace.

All events whose subjects match the namespace defined by the given INameSpace will be passed to the given ISubscriptionListener.

Implemented in Caplin.DataSource.DataSource.

ICompatibilityPublisher Caplin.DataSource.IDataSource.CreateCompatibilityPublisher ( INamespace  nameSpace,
IDataProvider  provider 
)

Creates a compatibility publisher for the specified namespace.

Parameters
nameSpaceThe namespace (see remarks).
providerYour implementation of IDataProvider that the publisher will call.
Returns
A compatibility for the supplied namespace.

An ICompatibilityPublisher publishes updates that are for subjects within the specified INamespace, to all peers that have subscribed to those subjects. Because it does not maintain a cache, this publisher passes all requests and discards for such subjects on to the IDataProvider.

Implemented in Caplin.DataSource.DataSource.

void Caplin.DataSource.IDataSource.RemoveConnectionListener ( IConnectionListener  listener)

Removes a previously registered connection listener.

Parameters
listenerThe IConnectionListener to be deregistered.

Once removed, the IConnectionListener will no longer receive event updates whenever the connection status has changed.

Implemented in Caplin.DataSource.DataSource.

void Caplin.DataSource.IDataSource.SetStatusDown ( )

Sets the status of this DataSource application to down.

Calling this method will cause this DataSource to stop connection attempts to other DataSource peers, close any existing connections and reject any connection attempts from DataSource peers.

Implemented in Caplin.DataSource.DataSource.

void Caplin.DataSource.IDataSource.SetStatusUp ( )

Sets the status of this DataSource application to up.

Calling this method will cause this DataSource to start connection attempts to other DataSource peers and allow connection attempts from remote DataSource peers.

Implemented in Caplin.DataSource.DataSource.

void Caplin.DataSource.IDataSource.Start ( )

Starts this DataSource.

Following a call to this method, DataSource.NET will start connecting to its peers.

This call will immediately return with DataSource running in a background thread. You should take care to ensure that your application does not exit immediately after calling Start().

Implemented in Caplin.DataSource.DataSource.

void Caplin.DataSource.IDataSource.Stop ( )

Stops this DataSource.

Following a call to this method, DataSource.NET will disconnect from all of its peers.

Implemented in Caplin.DataSource.DataSource.

Property Documentation

IFieldManager Caplin.DataSource.IDataSource.FieldManager
get

Provides access to the Field Manager associated with this DataSource.

The returned Field Manager provides access to the field definitions. These are defined in the DataSource configuration file using the format add-field <FieldName> <FieldNumber>.

ILogger Caplin.DataSource.IDataSource.Logger
getset

Gets or sets the logger used by DataSource.NET

The logger.

IMonitoringServer Caplin.DataSource.IDataSource.MonitoringServer
get

Gets the monitoring server for this DataSource.

Using the monitoring server it is possible to publish attributes and expose operations over, for example, JMX.

IList<IPeer> Caplin.DataSource.IDataSource.Peers
get

Gets a list of all the configured DataSource peers.

This method is provided to allow a DataSource application to control the connectivity of individual peers, and for information purposes.

The configured peers.


Generated on Wed Jan 24 2018 12:22:40 for DataSource.NET