|
virtual void | OnChatUpdate (ISubscription subscription, IChatEvent evt) |
| Override if you want to receive the chat update on the subject. More...
|
|
virtual void | OnContainerUpdate (ISubscription subscription, IContainerEvent evt) |
| Override if you want to receive the container update. More...
|
|
virtual void | OnDirectoryUpdate (ISubscription subscription, IDirectoryEvent evt) |
| Override if you want to receive the change in directory. More...
|
|
virtual void | OnJsonUpdate (ISubscription subscription, IJsonEvent evt) |
| Override if you want to receive the JSON update. More...
|
|
virtual void | OnNewsUpdate (ISubscription subscription, INewsEvent evt) |
| Override if you want to receive the news headline update. More...
|
|
virtual void | OnPageUpdate (ISubscription subscription, IPageEvent evt) |
| Override if you want to receive the page data More...
|
|
virtual void | OnPermissionUpdate (ISubscription subscription, IPermissionEvent evt) |
| Override if you want to receive the update on permission data More...
|
|
virtual void | OnRecordType2Update (ISubscription subscription, IRecordType2Event evt) |
| Override if you want to receive the Record Type 2 update. More...
|
|
virtual void | OnRecordType3Update (ISubscription subscription, IRecordType3Event evt) |
| Override if you want to receive the Record Type 3 update More...
|
|
virtual void | OnRecordUpdate (ISubscription subscription, IRecordType1Event evt) |
| Override if you want to receive the Record Type 1 update. More...
|
|
virtual void | OnStoryUpdate (ISubscription subscription, IStoryEvent evt) |
| Override if you want to receive the story data More...
|
|
virtual void | OnSubscriptionError (ISubscription subscription, ISubscriptionErrorEvent evt) |
| Override if you want to receive the information about the error in the subscription. More...
|
|
virtual void | OnSubscriptionStatus (ISubscription subscription, ISubscriptionStatusEvent evt) |
| Override if you want to receive the change in the state of the subscription. More...
|
|
void | OnChatUpdate (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.IChatEvent evt) |
| Called when a chat update is received. Implementing this method is optional. More...
|
|
void | OnContainerUpdate (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.IContainerEvent evt) |
| Called when a container update is received. Implementing this method is optional. More...
|
|
void | OnDirectoryUpdate (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.IDirectoryEvent evt) |
| Called when a directory update is received. Implementing this method is optional. More...
|
|
void | OnJsonUpdate (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.IJsonEvent evt) |
| Called when a json update is received. Implementing this method is optional. More...
|
|
void | OnNewsUpdate (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.INewsEvent evt) |
| Called when a news headline update is received. Implementing this method is optional. More...
|
|
void | OnPageUpdate (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.IPageEvent evt) |
| Called when a page update is received. Implementing this method is optional. More...
|
|
void | OnPermissionUpdate (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.IPermissionEvent evt) |
| Called when a permission update is received. Implementing this method is optional. More...
|
|
void | OnRecordType2Update (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.IRecordType2Event evt) |
| Called when an update to type 2 data in a record is received. Implementing this method is optional. More...
|
|
void | OnRecordType3Update (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.IRecordType3Event evt) |
| Called when an update to type 3 data in a record is received. Implementing this method is optional. More...
|
|
void | OnRecordUpdate (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.IRecordType1Event evt) |
| Called when an update to type 1 data in a record is received. Implementing this method is optional. More...
|
|
void | OnStoryUpdate (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.IStoryEvent evt) |
| Called when a news story update is received. Implementing this method is optional. More...
|
|
void | OnSubscriptionError (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.ISubscriptionErrorEvent evt) |
| Called when there is an error in a subscription. More...
|
|
void | OnSubscriptionStatus (Caplin.StreamLink.ISubscription subscription, Caplin.StreamLink.ISubscriptionStatusEvent evt) |
| Called when there is a change in the status of a subscription. More...
|
|
Adapter class implementing the ISubscriptionListener methods
This is a helper class to reduce the code needed to implement the ISubscriptionListener interface.
Simply extend this class and override the required methods rather than implement the full ISubscriptionListener interface.
A trivial implementation would be as follows :
using Caplin.StreamLink;
using System;
namespace Caplin.StreamLink.ExampleSnippets.Listener
{
public class BaseSubscriptionListenerSnippet
{
public BaseSubscriptionListenerSnippet()
{
ISubscriptionListener listener = new ExampleSubscriptionListener();
}
class ExampleSubscriptionListener : BaseSubscriptionListener
{
{
Console.WriteLine("Error: Subject " + evt.Subject + " is " + evt.Error);
}
public void OnRecordUpdate(ISubscription subscription, IRecordType1Event evt)
{
Console.WriteLine("Record update for " + evt.Subject + " fields: " + evt.Fields);
}
public void OnNewsUpdate(ISubscription subscription, INewsEvent evt)
{
Console.WriteLine("News Event: " + evt.Subject + " is " + evt.Headline);
}
};
}
}