C# Class 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.
Inheritance: Wombat.MamdaResourceContainer
Afficher le fichier Open project: OpenMAMA/OpenMAMA Class Usage Examples

Méthodes publiques

Méthode Description
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

Method Details

MamdaSubscription() public méthode

Default constructor. The subscription is not created until either create() or activate() is called.
public MamdaSubscription ( ) : System
Résultat System

activate() public méthode

Activate the subscription. Until this method is invoked, no updates will be received.
public activate ( ) : void
Résultat void

addErrorListener() public méthode

Add a listener for error events.
public addErrorListener ( MamdaErrorListener listener ) : void
listener MamdaErrorListener
Résultat void

addMsgListener() public méthode

Add a listener for regular messages.
public addMsgListener ( MamdaMsgListener listener ) : void
listener MamdaMsgListener
Résultat void

addStaleListener() public méthode

Add a listener for changes in stale status.
public addStaleListener ( MamdaStaleListener listener ) : void
listener MamdaStaleListener
Résultat void

create() public méthode

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
Résultat void

deactivate() public méthode

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
Résultat void

getClosure() public méthode

Get the additional object passed as the closure to the create() method.
public getClosure ( ) : Object
Résultat Object

getMamaSubscription() public méthode

public getMamaSubscription ( ) : Wombat.MamaSubscription
Résultat Wombat.MamaSubscription

getMsgListeners() public méthode

get a listener for regular messages.
public getMsgListeners ( ) : ArrayList
Résultat System.Collections.ArrayList

getQueue() public méthode

public getQueue ( ) : Wombat.MamaQueue
Résultat Wombat.MamaQueue

getRetries() public méthode

public getRetries ( ) : int
Résultat int

getSource() public méthode

public getSource ( ) : string
Résultat string

getSymbol() public méthode

public getSymbol ( ) : string
Résultat string

getTimout() public méthode

public getTimout ( ) : double
Résultat double

getTransport() public méthode

public getTransport ( ) : MamaTransport
Résultat MamaTransport

requestRecap() public méthode

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
Résultat void

setClosure() public méthode

Set the closure. Do this before calling activate().
public setClosure ( Object closure ) : void
closure Object
Résultat void

setQueue() public méthode

Set the MAMA queue. Do this before calling activate().
public setQueue ( Wombat.MamaQueue queue ) : void
queue Wombat.MamaQueue
Résultat void

setRequireInitial() public méthode

Set whether an initial value is required. Do this before calling activate(). Default is true
public setRequireInitial ( bool require ) : void
require bool
Résultat void

setRetries() public méthode

Set the retries for this subscription. Do this before calling activate(). Default is 10 seconds.
public setRetries ( int retries ) : void
retries int
Résultat void

setServiceLevel() public méthode

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
Résultat void

setSource() public méthode

Set the data source name. Do this before calling activate().
public setSource ( string source ) : void
source string
Résultat void

setSymbol() public méthode

Set the symbol. Do this before calling activate().
public setSymbol ( string symbol ) : void
symbol string
Résultat void

setTimeout() public méthode

Set the timeout (in seconds) for this subscription. Do this before calling activate(). Default is 10 seconds.
public setTimeout ( double timeout ) : void
timeout double
Résultat void

setTransport() public méthode

Set the MAMA transport. Do this before calling activate().
public setTransport ( MamaTransport transport ) : void
transport MamaTransport
Résultat void

setType() public méthode

Set the subscrption type. Do this before calling activate() Default is mamaSubscriptionType.MAMA_SUBSC_TYPE_NORMAL
public setType ( mamaSubscriptionType type ) : void
type mamaSubscriptionType
Résultat void