DataSource.NET
7.1.31.142147-b54558a5
|
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...
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... | |
void | AddJsonChannelListener (INamespace nspace, IJsonChannelListener listener) |
Registers an IJsonChannelListener for the specified namespace. 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... | |
ICachingPublisher | CreateCachingPublisher (INamespace nspace, ICachingDataProvider provider) |
Creates an caching publisher for the specified 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 | |
ICacheManager | CacheManager [get] |
Provides access to the Cache Manager associated with this DataSource. More... | |
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< IPeer > | Peers [get] |
Gets a list of all the configured DataSource peers. More... | |
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.
void Caplin.DataSource.IDataSource.AddChannelListener | ( | INamespace | nspace, |
IChannelListener | listener | ||
) |
Registers an IChannelListener for the specified namespace.
nspace | The namespace defining the subjects within the channel. |
listener | A 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.
listener | The IConnectionListener to be registered |
Once registered, the IConnectionListener will receive event updates whenever the connection status has changed (for details see the description of
).
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
nspace | The namespace defining the subjects within the channel. |
listener | A listener to receive events related to the channel. |
Implemented in Caplin.DataSource.DataSource.
void Caplin.DataSource.IDataSource.AddJsonChannelListener | ( | INamespace | nspace, |
IJsonChannelListener | listener | ||
) |
Registers an IJsonChannelListener for the specified namespace.
nspace | The namespace defining the subjects within the jsonChannel. |
listener | A listener to receive events related to the jsinChannel. |
IActivePublisher Caplin.DataSource.IDataSource.CreateActivePublisher | ( | INamespace | nameSpace, |
IDataProvider | provider | ||
) |
Creates an active publisher for the specified namespace.
nameSpace | The namespace (see remarks). |
provider | Your implementation of IDataProvider that the publisher will call. |
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.
subject | The subject to subscribe to. |
listener | A listener to receive events raised for the IBroadcastSubscription. |
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.
nameSpace | The namespace (see remarks). |
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.
nspace | The namespace defining the subjects to subscribe to. |
listener | A listener to receive events raised for the IBroadcastSubscription. |
All events whose subjects match the namespace defined by the given INameSpace will be passed to the given ISubscriptionListener.
Implemented in Caplin.DataSource.DataSource.
ICachingPublisher Caplin.DataSource.IDataSource.CreateCachingPublisher | ( | INamespace | nspace, |
ICachingDataProvider | provider | ||
) |
Creates an caching publisher for the specified namespace.
nspace | The namespace (see remarks). |
provider | Your implementation of ICachingDataProvider that the publisher will call. |
An ICachingDataProvider publishes updates that are for subjects within the specified INamespace, to all peers that have subscribed to those subjects.
Implemented in Caplin.DataSource.DataSource.
ICompatibilityPublisher Caplin.DataSource.IDataSource.CreateCompatibilityPublisher | ( | INamespace | nameSpace, |
IDataProvider | provider | ||
) |
Creates a compatibility publisher for the specified namespace.
nameSpace | The namespace (see remarks). |
provider | Your implementation of IDataProvider that the publisher will call. |
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.
listener | The 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.
|
get |
Provides access to the Cache Manager associated with this DataSource.
|
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>
.
|
getset |
Gets or sets the logger used by DataSource.NET
The logger.
|
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.
|
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.