C# Класс Wombat.MamdaSubscription

A MamdaSubscription is used to register interest in a particular symbol and source. A MamaTransport is required to actually activate the subscription. Multiple listeners can be added to the MamdaSubscription. In this way, an application can make use of more than one of the specialized value added MAMDA listeners, such as MamdaTradeListener and MamdaQuoteListener.
Наследование: Wombat.MamdaResourceContainer
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
MamdaSubscription ( ) : System

Default constructor. The subscription is not created until either create() or activate() is called.

activate ( ) : void

Activate the subscription. Until this method is invoked, no updates will be received.

addErrorListener ( MamdaErrorListener listener ) : void

Add a listener for error events.

addMsgListener ( MamdaMsgListener listener ) : void

Add a listener for regular messages.

addStaleListener ( MamdaStaleListener listener ) : void

Add a listener for changes in stale status.

create ( MamaTransport transport, Wombat.MamaQueue queue, string source, string symbol, object closure ) : void

Create and activate a subscription. Any properties for the subscription should be set prior to calling this method.

deactivate ( ) : void

Deactivate the subscription. No more updates will be received for this subscription (unless activate() is invoked again). This function must be called from the same thread dispatching on the associated event queue unless both the default queue and dispatch queue are not actively dispatching.

getClosure ( ) : Object

Get the additional object passed as the closure to the create() method.

getMamaSubscription ( ) : Wombat.MamaSubscription
getMsgListeners ( ) : ArrayList

get a listener for regular messages.

getQueue ( ) : Wombat.MamaQueue

getRetries ( ) : int

getSource ( ) : string

getSymbol ( ) : string

getTimout ( ) : double

getTransport ( ) : MamaTransport

requestRecap ( ) : void

Force a recap request to be sent for this subscription.

Note: there is still a possibility that the feed handler will reject such recap requests (based on configurable feature(s) of a feed handler).

setClosure ( Object closure ) : void

Set the closure. Do this before calling activate().

setQueue ( Wombat.MamaQueue queue ) : void

Set the MAMA queue. Do this before calling activate().

setRequireInitial ( bool require ) : void

Set whether an initial value is required. Do this before calling activate(). Default is true

setRetries ( int retries ) : void

Set the retries for this subscription. Do this before calling activate(). Default is 10 seconds.

setServiceLevel ( mamaServiceLevel serviceLevel, int serviceLevelOpt ) : void

Set the MAMA service level. In the future, certain service levels may have an optional argument (e.g., an interval for conflated data). Do this before calling activate(). Default value is MamaServiceLevel.MAMA_SERVICE_LEVEL_REAL_TIME and 0

setSource ( string source ) : void

Set the data source name. Do this before calling activate().

setSymbol ( string symbol ) : void

Set the symbol. Do this before calling activate().

setTimeout ( double timeout ) : void

Set the timeout (in seconds) for this subscription. Do this before calling activate(). Default is 10 seconds.

setTransport ( MamaTransport transport ) : void

Set the MAMA transport. Do this before calling activate().

setType ( mamaSubscriptionType type ) : void

Set the subscrption type. Do this before calling activate() Default is mamaSubscriptionType.MAMA_SUBSC_TYPE_NORMAL

Описание методов

MamdaSubscription() публичный Метод

Default constructor. The subscription is not created until either create() or activate() is called.
public MamdaSubscription ( ) : System
Результат System

activate() публичный Метод

Activate the subscription. Until this method is invoked, no updates will be received.
public activate ( ) : void
Результат void

addErrorListener() публичный Метод

Add a listener for error events.
public addErrorListener ( MamdaErrorListener listener ) : void
listener MamdaErrorListener
Результат void

addMsgListener() публичный Метод

Add a listener for regular messages.
public addMsgListener ( MamdaMsgListener listener ) : void
listener MamdaMsgListener
Результат void

addStaleListener() публичный Метод

Add a listener for changes in stale status.
public addStaleListener ( MamdaStaleListener listener ) : void
listener MamdaStaleListener
Результат void

create() публичный Метод

Create and activate a subscription. Any properties for the subscription should be set prior to calling this method.
public create ( MamaTransport transport, Wombat.MamaQueue queue, string source, string symbol, object closure ) : void
transport MamaTransport
queue Wombat.MamaQueue
source string
symbol string
closure object
Результат void

deactivate() публичный Метод

Deactivate the subscription. No more updates will be received for this subscription (unless activate() is invoked again). This function must be called from the same thread dispatching on the associated event queue unless both the default queue and dispatch queue are not actively dispatching.
public deactivate ( ) : void
Результат void

getClosure() публичный Метод

Get the additional object passed as the closure to the create() method.
public getClosure ( ) : Object
Результат Object

getMamaSubscription() публичный Метод

public getMamaSubscription ( ) : Wombat.MamaSubscription
Результат Wombat.MamaSubscription

getMsgListeners() публичный Метод

get a listener for regular messages.
public getMsgListeners ( ) : ArrayList
Результат System.Collections.ArrayList

getQueue() публичный Метод

public getQueue ( ) : Wombat.MamaQueue
Результат Wombat.MamaQueue

getRetries() публичный Метод

public getRetries ( ) : int
Результат int

getSource() публичный Метод

public getSource ( ) : string
Результат string

getSymbol() публичный Метод

public getSymbol ( ) : string
Результат string

getTimout() публичный Метод

public getTimout ( ) : double
Результат double

getTransport() публичный Метод

public getTransport ( ) : MamaTransport
Результат MamaTransport

requestRecap() публичный Метод

Force a recap request to be sent for this subscription.
Note: there is still a possibility that the feed handler will reject such recap requests (based on configurable feature(s) of a feed handler).
public requestRecap ( ) : void
Результат void

setClosure() публичный Метод

Set the closure. Do this before calling activate().
public setClosure ( Object closure ) : void
closure Object
Результат void

setQueue() публичный Метод

Set the MAMA queue. Do this before calling activate().
public setQueue ( Wombat.MamaQueue queue ) : void
queue Wombat.MamaQueue
Результат void

setRequireInitial() публичный Метод

Set whether an initial value is required. Do this before calling activate(). Default is true
public setRequireInitial ( bool require ) : void
require bool
Результат void

setRetries() публичный Метод

Set the retries for this subscription. Do this before calling activate(). Default is 10 seconds.
public setRetries ( int retries ) : void
retries int
Результат void

setServiceLevel() публичный Метод

Set the MAMA service level. In the future, certain service levels may have an optional argument (e.g., an interval for conflated data). Do this before calling activate(). Default value is MamaServiceLevel.MAMA_SERVICE_LEVEL_REAL_TIME and 0
public setServiceLevel ( mamaServiceLevel serviceLevel, int serviceLevelOpt ) : void
serviceLevel mamaServiceLevel
serviceLevelOpt int
Результат void

setSource() публичный Метод

Set the data source name. Do this before calling activate().
public setSource ( string source ) : void
source string
Результат void

setSymbol() публичный Метод

Set the symbol. Do this before calling activate().
public setSymbol ( string symbol ) : void
symbol string
Результат void

setTimeout() публичный Метод

Set the timeout (in seconds) for this subscription. Do this before calling activate(). Default is 10 seconds.
public setTimeout ( double timeout ) : void
timeout double
Результат void

setTransport() публичный Метод

Set the MAMA transport. Do this before calling activate().
public setTransport ( MamaTransport transport ) : void
transport MamaTransport
Результат void

setType() публичный Метод

Set the subscrption type. Do this before calling activate() Default is mamaSubscriptionType.MAMA_SUBSC_TYPE_NORMAL
public setType ( mamaSubscriptionType type ) : void
type mamaSubscriptionType
Результат void