Name | |
---|---|
MamdaSubscription() | |
void | create(MamaTransport transport, MamaQueue queue, String source, String symbol, Object closure) |
void | setSource(String source) |
void | setSymbol(String symbol) |
void | setTransport(MamaTransport transport) |
void | setQueue(MamaQueue queue) |
void | setType(MamaSubscriptionType type) |
void | setServiceLevel(short serviceLevel, short serviceLevelOpt) |
void | setRequireInitial(boolean require) |
void | setTimeout(double timeout) |
void | setRetries(int retries) |
void | setClosure(Object closure) |
void | addMsgListener(MamdaMsgListener listener) |
Vector | getMsgListeners() |
void | addStaleListener(MamdaStaleListener listener) |
void | addErrorListener(MamdaErrorListener listener) |
synchronized void | activate() |
void | deactivate() |
MamaSubscriptionType | getSubscriptionType() |
short | getServiceLevel() |
long | getServiceLevelOpt() |
void | setRequiresInitial(boolean requiresInitial) |
boolean | getRequiresInitial() |
void | setAppDataType(MamaMdDataType appDataType) |
MamaMdDataType | getAppDataType() |
void | setRecoverGaps(boolean doesRecover) |
boolean | getRecoverGaps() |
void | setPreInitialCacheSize(int cacheSize) |
int | getPreInitialCacheSize() |
MamaMsgQualifier | getMsgQualifier() |
void | requestRecap() |
int | getRetries() |
double | getTimeout() |
String | getSource() |
String | getSymbol() |
MamaQueue | getQueue() |
MamaTransport | getTransport() |
Object | getClosure() |
long | getSeqNum() |
MamaSubscription | getMamaSubscription() |
class com::wombat::mamda::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.
inline MamdaSubscription()
Default constructor. The subscription is not created until either create() or activate() is called.
inline void create(
MamaTransport transport,
MamaQueue queue,
String source,
String symbol,
Object closure
)
Create and activate a subscription. Any properties for the subscription should be set prior to calling this method.
inline void setSource(
String source
)
Set the data source name. Do this before calling activate().
inline void setSymbol(
String symbol
)
Set the symbol. Do this before calling activate().
inline void setTransport(
MamaTransport transport
)
Set the MAMA transport. Do this before calling activate().
inline void setQueue(
MamaQueue queue
)
Set the MAMA queue. Do this before calling activate().
inline void setType(
MamaSubscriptionType type
)
Set the subscrption type. Do this before calling activate(). Default is MamaSubscriptionType.NORMAL
inline void setServiceLevel(
short serviceLevel,
short serviceLevelOpt
)
Set the MAMA service level. Do this before calling activate(). Default value is MamaServiceLevel.REAL_TIME
and 0
inline void setRequireInitial(
boolean require
)
Set whether an initial value is required. Do this before calling activate(). Default is true
inline void setTimeout(
double timeout
)
Set the timeout (in seconds) for this subscription. Do this before calling activate(). Default is 10 seconds.
inline void setRetries(
int retries
)
Set the retries for this subscirption. Do this before calling activate. Default is 3
inline void setClosure(
Object closure
)
Set the closure. Do this before calling activate().
inline void addMsgListener(
MamdaMsgListener listener
)
Add a listener for regular messages.
inline Vector getMsgListeners()
inline void addStaleListener(
MamdaStaleListener listener
)
Add a listener for changes in stale status.
inline void addErrorListener(
MamdaErrorListener listener
)
Add a listener for error events.
inline synchronized void activate()
Activate the subscription. Until this method is invoked, no updates will be received.
inline 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.
inline MamaSubscriptionType getSubscriptionType()
Returns the underlying MamaSubscriptionType
for the specified Subscription.
inline short getServiceLevel()
Get the service level for the specified Subscription.
inline long getServiceLevelOpt()
Return: serviceLevel
Get the service level options for the specified subscription.
inline void setRequiresInitial(
boolean requiresInitial
)
Parameters:
requiresInitial [true | false] Whether to request an initial value or not. |
Whether an initial value is required for the specified Subscription. This only applies to market data subscriptions and not to basic subscriptions. Default value of true indicating that initial values are required.
inline boolean getRequiresInitial()
Return: boolean
Returns a value of true or false indicating whether this Subscription is interested in initial values.
inline void setAppDataType(
MamaMdDataType appDataType
)
Parameters:
Set the application-specific data type.
inline MamaMdDataType getAppDataType()
Return: appDataType .
Retrieve the application-specific data type.
inline void setRecoverGaps(
boolean doesRecover
)
Parameters:
Whether a Subscription should attempt to recover from sequence number gaps.
inline boolean getRecoverGaps()
Return: boolean - false does not recoever true - does attempt to recover
Whether the specified subscription will attempt to recover from sequence number gaps.
inline void setPreInitialCacheSize(
int cacheSize
)
Parameters:
Set the number of messages to cache for each symbol before the initial value arrives. This allows the Subscription to recover when the initial value arrives late (after a subsequent trade or quote already arrived).
For group subscription, a separate cache is used for each group member.
The default is 10.
inline int getPreInitialCacheSize()
Return: cacheSize
Return the initial value cache size
inline MamaMsgQualifier getMsgQualifier()
Return: MamaMsgQualifier
Return the MamaMsgQualifier
inline void requestRecap()
Force a recap request to be sent for this subscription.
inline int getRetries()
inline double getTimeout()
inline String getSource()
inline String getSymbol()
inline MamaQueue getQueue()
inline MamaTransport getTransport()
inline Object getClosure()
Get the additional object passed as the closure to the create() method.
inline long getSeqNum()
inline MamaSubscription getMamaSubscription()
Updated on 2023-03-31 at 15:30:35 +0100