public class MamdaSubscription
extends java.lang.Object
Constructor and Description |
---|
MamdaSubscription()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activate the subscription.
|
void |
addErrorListener(MamdaErrorListener listener)
Add a listener for error events.
|
void |
addMsgListener(MamdaMsgListener listener)
Add a listener for regular messages.
|
void |
addStaleListener(MamdaStaleListener listener)
Add a listener for changes in stale status.
|
void |
create(com.wombat.mama.MamaTransport transport,
com.wombat.mama.MamaQueue queue,
java.lang.String source,
java.lang.String symbol,
java.lang.Object closure)
Create and activate a subscription.
|
void |
deactivate()
Deactivate the subscription.
|
com.wombat.mama.MamaMdDataType |
getAppDataType()
Retrieve the application-specific data type.
|
java.lang.Object |
getClosure()
Get the additional object passed as the closure to the create()
method.
|
com.wombat.mama.MamaSubscription |
getMamaSubscription() |
java.util.Vector |
getMsgListeners() |
com.wombat.mama.MamaMsgQualifier |
getMsgQualifier()
Return the MamaMsgQualifier
|
int |
getPreInitialCacheSize()
Return the initial value cache size
|
com.wombat.mama.MamaQueue |
getQueue() |
boolean |
getRecoverGaps()
Whether the specified subscription will attempt to recover from
sequence number gaps.
|
boolean |
getRequiresInitial()
Returns a value of true or false indicating whether this Subscription
is interested in initial values.
|
int |
getRetries() |
long |
getSeqNum() |
short |
getServiceLevel()
Get the service level for the specified Subscription.
|
long |
getServiceLevelOpt()
Get the service level options for the specified subscription.
|
java.lang.String |
getSource() |
com.wombat.mama.MamaSubscriptionType |
getSubscriptionType()
Returns the underlying
MamaSubscriptionType for the specified
Subscription. |
java.lang.String |
getSymbol() |
double |
getTimeout() |
com.wombat.mama.MamaTransport |
getTransport() |
void |
requestRecap()
Force a recap request to be sent for this subscription.
|
void |
setAppDataType(com.wombat.mama.MamaMdDataType appDataType)
Set the application-specific data type.
|
void |
setClosure(java.lang.Object closure)
Set the closure.
|
void |
setPreInitialCacheSize(int cacheSize)
Set the number of messages to cache for each symbol before the initial
value arrives.
|
void |
setQueue(com.wombat.mama.MamaQueue queue)
Set the MAMA queue.
|
void |
setRecoverGaps(boolean doesRecover)
Whether a Subscription should attempt to recover from
sequence number gaps.
|
void |
setRequireInitial(boolean require)
Set whether an initial value is required.
|
void |
setRequiresInitial(boolean requiresInitial)
Whether an initial value is required for the specified Subscription.
|
void |
setRetries(int retries)
Set the retries for this subscirption.
|
void |
setServiceLevel(short serviceLevel,
short serviceLevelOpt)
Set the MAMA service level.
|
void |
setSource(java.lang.String source)
Set the data source name.
|
void |
setSymbol(java.lang.String symbol)
Set the symbol.
|
void |
setTimeout(double timeout)
Set the timeout (in seconds) for this subscription.
|
void |
setTransport(com.wombat.mama.MamaTransport transport)
Set the MAMA transport.
|
void |
setType(com.wombat.mama.MamaSubscriptionType type)
Set the subscrption type.
|
public MamdaSubscription()
public void create(com.wombat.mama.MamaTransport transport, com.wombat.mama.MamaQueue queue, java.lang.String source, java.lang.String symbol, java.lang.Object closure)
public void setSource(java.lang.String source)
public void setSymbol(java.lang.String symbol)
public void setTransport(com.wombat.mama.MamaTransport transport)
public void setQueue(com.wombat.mama.MamaQueue queue)
public void setType(com.wombat.mama.MamaSubscriptionType type)
MamaSubscriptionType.NORMAL
public void setServiceLevel(short serviceLevel, short serviceLevelOpt)
MamaServiceLevel.REAL_TIME
and
0public void setRequireInitial(boolean require)
true
public void setTimeout(double timeout)
public void setRetries(int retries)
public void setClosure(java.lang.Object closure)
public void addMsgListener(MamdaMsgListener listener)
public java.util.Vector getMsgListeners()
public void addStaleListener(MamdaStaleListener listener)
public void addErrorListener(MamdaErrorListener listener)
public void activate()
public void deactivate()
public com.wombat.mama.MamaSubscriptionType getSubscriptionType()
MamaSubscriptionType
for the specified
Subscription.public short getServiceLevel()
public long getServiceLevelOpt()
public void setRequiresInitial(boolean requiresInitial)
requiresInitial
- [true|false] Whether to request an initial value or
not.public boolean getRequiresInitial()
public void setAppDataType(com.wombat.mama.MamaMdDataType appDataType)
appDataType
- The application-specific data type.public com.wombat.mama.MamaMdDataType getAppDataType()
public void setRecoverGaps(boolean doesRecover)
doesRecover
- indicates not to recover. true The Subscription
will attempt to recover via a recap request.public boolean getRecoverGaps()
public void setPreInitialCacheSize(int cacheSize)
cacheSize
- The size of the cache.public int getPreInitialCacheSize()
public com.wombat.mama.MamaMsgQualifier getMsgQualifier()
public void requestRecap()
public int getRetries()
public double getTimeout()
public java.lang.String getSource()
public java.lang.String getSymbol()
public com.wombat.mama.MamaQueue getQueue()
public com.wombat.mama.MamaTransport getTransport()
public java.lang.Object getClosure()
public long getSeqNum()
public com.wombat.mama.MamaSubscription getMamaSubscription()
Copyright 2007 Wombat Financial Software, Inc.