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
파일 보기 프로젝트 열기: OpenMAMA/OpenMAMA 1 사용 예제들

공개 메소드들

메소드 설명
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