DataSource.NET
7.1.23.41524-1415d4ff
|
This is the main class in Datasource.NET. Your application must create an instance of this class to use the functionality provided by DataSource More...
Public Member Functions | |
void | AddChannelListener (INamespace nspace, Caplin.DataSource.Channel.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, Caplin.DataSource.Channel.IJsonChannelListener listener) |
Registers an IJsonChannelListener for the specified namespace. More... | |
IActivePublisher | CreateActivePublisher (INamespace nameSpace, IDataProvider provider) |
Creates a multiple request single discard 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 a caching JSON publisher for the specified namespace. More... | |
ICompatibilityPublisher | CreateCompatibilityPublisher (INamespace nameSpace, IDataProvider provider) |
Creates a multiple request and multiple discard publisher for the specified namespace. More... | |
DataSource (string configFile) | |
Initializes a new instance of the DataSource class that logs events to a configurable log file. More... | |
DataSource (string configFile, string[] arguments) | |
Initializes a new instance of the DataSource class that logs events to a configurable log file. More... | |
DataSource (string configFile, ILogger logger) | |
Initializes a new instance of the DataSource class that logs events to an implementation of the ILogger class. More... | |
DataSource (string configFile, string[] arguments, ILogger logger) | |
Initializes a new instance of the DataSource class that logs events to an implementation of the ILogger class. 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 () |
Stops this DataSource. More... | |
Public Member Functions inherited from Caplin.DataSource.IDataSource | |
void | AddChannelListener (INamespace nspace, IChannelListener listener) |
Registers an IChannelListener for the specified namespace. More... | |
void | AddJsonChannelListener (INamespace nspace, IJsonChannelListener listener) |
Registers an IJsonChannelListener for the specified namespace. More... | |
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< IPeer > | Peers [get] |
Gets a list of all the configured DataSource peers. More... | |
Properties inherited from Caplin.DataSource.IDataSource | |
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 is the main class in Datasource.NET. Your application must create an instance of this class to use the functionality provided by DataSource
Your DataSource application must create just a single instance of this class. An attempt to create a second instance within the application will result in an Exception being raised.
If your application is running within the Deployment Framework then you should construct this object using a constructor which takes an arguments parameter: The Deployment Framework may call into your application to obtain configuration properties appropriate for the environment.
Note:The current (execution) directory must contain a subdirectory called var. If this subdirectory does not exist when the DataSource is constructed DataSource.NET will exit.
|
inline |
Initializes a new instance of the DataSource class that logs events to a configurable log file.
configFile | The configuration file for this DataSource application. |
Only a single instance of Caplin.DataSource.DataSource can be created.
The configuration file defines the configuration of the DataSource library. Its contents must be in the standard DataSource "conf" file format; see Configuration. This constructor instantiates a DataSource with a logger that will direct all log messages to the log file belonging to DataSource.NET.
The name of the log file can be defined using the event-log configuration item. The log cycle period can be configured using the add-log configuration section. For more information, see the section of the Liberator Administration Guide on �Advanced log file settings�.
|
inline |
Initializes a new instance of the DataSource class that logs events to a configurable log file.
configFile | The configuration file for this DataSource application. |
arguments | Any command line arguments. |
Only a single instance of Caplin.DataSource.DataSource can be created.
The configuration file defines the configuration of the DataSource library. Its contents must be in the standard DataSource "conf" file format; see Configuration. This constructor instantiates a DataSource with a logger that will direct all log messages to the log file belonging to DataSource.NET.
The name of the log file can be defined using the event-log configuration item. The log cycle period can be configured using the add-log configuration section. For more information, see the section of the Liberator Administration Guide on �Advanced log file settings�.
|
inline |
Initializes a new instance of the DataSource class that logs events to an implementation of the ILogger class.
configFile | The configuration file for this DataSource application. |
logger | An implementation of ILogger to which DataSource events will be logged. |
Only a single instance of Caplin.DataSource.DataSource can be created.
The configuration file defines the configuration of the DataSource library. Its contents must be in the standard DataSource "conf" file format; see Configuration.
If you want the DataSource to log events to a standard (configurable) DataSource log file, use the DataSource(configFile) constructor instead.
|
inline |
Initializes a new instance of the DataSource class that logs events to an implementation of the ILogger class.
configFile | The configuration file for this DataSource application. |
arguments | Any command line arguments. |
logger | An implementation of ILogger to which DataSource events will be logged. |
Only a single instance of Caplin.DataSource.DataSource can be created.
The configuration file defines the configuration of the DataSource library. Its contents must be in the standard DataSource "conf" file format; see Configuration.
If you want the DataSource to log events to a standard (configurable) DataSource log file, use the DataSource(configFile) constructor instead.
|
inline |
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. |
|
inline |
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 connect 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.
Implements Caplin.DataSource.IDataSource.
|
inline |
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. |
Implements Caplin.DataSource.IDataSource.
|
inline |
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 jsonChannel. |
|
inline |
Creates a multiple request single discard publisher for the specified namespace.
nameSpace | The namespace (see remarks). |
provider | Your implementation of IDataProvider that the publisher will call. |
An IMultipleRequestSingleDiscardPublisher 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.
Implements Caplin.DataSource.IDataSource.
|
inline |
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.
Implements Caplin.DataSource.IDataSource.
|
inline |
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
Implements Caplin.DataSource.IDataSource.
|
inline |
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.
Implements Caplin.DataSource.IDataSource.
|
inline |
Creates a caching JSON publisher for the specified namespace.
nspace | The namespace (see remarks). |
provider | Your implementation of IDataProvider that the publisher will call. |
Implements Caplin.DataSource.IDataSource.
|
inline |
Creates a multiple request and multiple discard publisher for the specified namespace.
nameSpace | The namespace (see remarks). |
provider | Your implementation of IDataProvider that the publisher will call. |
An IMultipleRequestMultipleDiscardPublisher 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.
Implements Caplin.DataSource.IDataSource.
|
inline |
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.
Implements Caplin.DataSource.IDataSource.
|
inline |
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.
Implements Caplin.DataSource.IDataSource.
|
inline |
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.
Implements Caplin.DataSource.IDataSource.
|
inline |
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().
Implements Caplin.DataSource.IDataSource.
|
inline |
Stops this DataSource.
Following a call to this method, DataSource.NET will disconnect from all of its peers.
Implements Caplin.DataSource.IDataSource.
|
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.