StreamLink.NET  7.1.2-7.1.2-3871-d81f059
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | List of all members
Caplin.StreamLink.ISubscriptionListener Interface Reference

Interface for receiving updates to subscribed data from the Liberator. More...

Inheritance diagram for Caplin.StreamLink.ISubscriptionListener:
Caplin.StreamLink.BaseSubscriptionListener

Public Member Functions

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...
 

Detailed Description

Interface for receiving updates to subscribed data from the Liberator.

Your application should implement this interface.

A trivial implementation of SubscriptionListener would be:

using Caplin.StreamLink;
using System;
namespace caplin.streamlink.examplesnippets.listener
{
public class SubscriptionListenerSnippet
{
public SubscriptionListenerSnippet(IStreamLink streamLink)
{
streamLink.Subscribe("/SUBJECT", new ExampleSubscriptionListener());
}
class ExampleSubscriptionListener : ISubscriptionListener
{
public void OnSubscriptionStatus(ISubscription subscription,
ISubscriptionStatusEvent evt)
{
Console.WriteLine(evt);
}
public void OnSubscriptionError(ISubscription subscription,
ISubscriptionErrorEvent evt)
{
Console.WriteLine(evt);
}
public void OnStoryUpdate(ISubscription subscription, IStoryEvent evt)
{
Console.WriteLine(evt);
}
public void OnRecordUpdate(ISubscription subscription, IRecordType1Event evt)
{
Console.WriteLine(evt);
}
public void OnRecordType3Update(ISubscription subscription,
IRecordType3Event evt)
{
Console.WriteLine(evt);
}
public void OnRecordType2Update(ISubscription subscription,
IRecordType2Event evt)
{
Console.WriteLine(evt);
}
public void OnPermissionUpdate(ISubscription subscription,
IPermissionEvent evt)
{
Console.WriteLine(evt);
}
public void OnNewsUpdate(ISubscription subscription, INewsEvent evt)
{
Console.WriteLine(evt);
}
public void OnDirectoryUpdate(ISubscription subscription,
IDirectoryEvent evt)
{
Console.WriteLine(evt);
}
public void OnContainerUpdate(ISubscription subscription,
IContainerEvent evt)
{
Console.WriteLine(evt);
}
public void OnChatUpdate(ISubscription subscription, IChatEvent evt)
{
Console.WriteLine(evt);
}
public void OnPageUpdate(ISubscription subscription, IPageEvent evt)
{
Console.WriteLine(evt);
}
public void OnJsonUpdate(ISubscription subscription, IJsonEvent evt)
{
Console.WriteLine(evt);
}
}
}
}

Member Function Documentation

void Caplin.StreamLink.ISubscriptionListener.OnChatUpdate ( Caplin.StreamLink.ISubscription  subscription,
Caplin.StreamLink.IChatEvent  evt 
)

Called when a chat update is received. Implementing this method is optional.

  • Parameters
    subscriptionThe subscription for which the update occurred.
  • Parameters
    evtThe chat update.
void Caplin.StreamLink.ISubscriptionListener.OnContainerUpdate ( Caplin.StreamLink.ISubscription  subscription,
Caplin.StreamLink.IContainerEvent  evt 
)

Called when a container update is received. Implementing this method is optional.

Parameters
subscriptionThe subscription for which the update occurred.
evtThe container update.
void Caplin.StreamLink.ISubscriptionListener.OnDirectoryUpdate ( Caplin.StreamLink.ISubscription  subscription,
Caplin.StreamLink.IDirectoryEvent  evt 
)

Called when a directory update is received. Implementing this method is optional.

  • Parameters
    subscriptionThe subscription for which the update occurred.
  • Parameters
    evtThe directory update.
void Caplin.StreamLink.ISubscriptionListener.OnJsonUpdate ( Caplin.StreamLink.ISubscription  subscription,
Caplin.StreamLink.IJsonEvent  evt 
)

Called when a json update is received. Implementing this method is optional.

Parameters
subscriptionThe subscription for which the update occurred.
evtThe JSON update.
void Caplin.StreamLink.ISubscriptionListener.OnNewsUpdate ( Caplin.StreamLink.ISubscription  subscription,
Caplin.StreamLink.INewsEvent  evt 
)

Called when a news headline update is received. Implementing this method is optional.

  • Parameters
    subscriptionThe subscription for which the update occurred.
  • Parameters
    evtThe news headline update.
void Caplin.StreamLink.ISubscriptionListener.OnPageUpdate ( Caplin.StreamLink.ISubscription  subscription,
Caplin.StreamLink.IPageEvent  evt 
)

Called when a page update is received. Implementing this method is optional.

  • Parameters
    subscriptionThe subscription for which the update occurred.
  • Parameters
    evtThe page update.
void Caplin.StreamLink.ISubscriptionListener.OnPermissionUpdate ( Caplin.StreamLink.ISubscription  subscription,
Caplin.StreamLink.IPermissionEvent  evt 
)

Called when a permission update is received. Implementing this method is optional.

  • Parameters
    subscriptionThe subscription for which the update occurred.
  • Parameters
    evtThe permission update.
void Caplin.StreamLink.ISubscriptionListener.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.

  • Parameters
    subscriptionThe subscription for which the update occurred.
  • Parameters
    evtThe record update.
void Caplin.StreamLink.ISubscriptionListener.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.

  • Parameters
    subscriptionThe subscription for which the update occurred.
  • Parameters
    evtThe record update.
void Caplin.StreamLink.ISubscriptionListener.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.

  • Parameters
    subscriptionThe subscription for which the update occurred.
  • Parameters
    evtThe record update.
void Caplin.StreamLink.ISubscriptionListener.OnStoryUpdate ( Caplin.StreamLink.ISubscription  subscription,
Caplin.StreamLink.IStoryEvent  evt 
)

Called when a news story update is received. Implementing this method is optional.

  • Parameters
    subscriptionThe subscription for which the update occurred.
  • Parameters
    evtThe news story update.
void Caplin.StreamLink.ISubscriptionListener.OnSubscriptionError ( Caplin.StreamLink.ISubscription  subscription,
Caplin.StreamLink.ISubscriptionErrorEvent  evt 
)

Called when there is an error in a subscription.

  • This callback being invoked is a final state for the subscription and
  • no further callbacks will be received for it.
  • Parameters
    subscriptionThe subscription for which the error occurred.
  • Parameters
    evtThe subscription error event.
void Caplin.StreamLink.ISubscriptionListener.OnSubscriptionStatus ( Caplin.StreamLink.ISubscription  subscription,
Caplin.StreamLink.ISubscriptionStatusEvent  evt 
)

Called when there is a change in the status of a subscription.

  • Parameters
    subscriptionThe subscription for which the update occurred.
  • Parameters
    evtThe subscription status event.

Generated on Thu Aug 22 2019 18:15:37 for StreamLink.NET