Package com.wombat.mama
Class MamaSource
- java.lang.Object
-
- com.wombat.mama.MamaSourceManager
-
- com.wombat.mama.MamaSource
-
- Direct Known Subclasses:
MamaSourceDerivative
public class MamaSource extends MamaSourceManager
A MAMA source maintains information about a data source, including the quality of the data coming from that source. It inherits MamaSourceManager because a source can have sub-sources.
-
-
Constructor Summary
Constructors Constructor Description MamaSource()Creates a new mama source with default parametersMamaSource(java.lang.String sourceId, MamaTransport transport, java.lang.String symbolNamespace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSubscription(java.lang.String key, MamaSubscription subscription)Add a subscriptions to the mamaSourcevoiddestroy()MamaSubscriptionfindSubscription(java.lang.String key)find a MamaSubscription, null will be returned if not foundjava.lang.StringgetDisplayId()java.lang.StringgetId()java.lang.StringgetMappedId()MamaSourcegetParent()Get the parent source of the mama source objectshortgetQuality()MamaSourceStategetState()Get the state of a mama source objectjava.lang.StringgetStateAsString()Get the stringified state name of a mama source objectjava.lang.StringgetSymbolNamespace()MamaTransportgetTransport()booleanisPartOf(MamaSource source)voidsetDisplayId(java.lang.String displayId)voidsetId(java.lang.String sourceId)voidsetMappedId(java.lang.String mappedId)voidsetParent(MamaSource parent)voidsetQuality(short quality)voidsetState(MamaSourceState state)voidsetSymbolNamespace(java.lang.String symbolNamespace)voidsetTransport(MamaTransport transport)voidsetTransportName(java.lang.String transportName)-
Methods inherited from class com.wombat.mama.MamaSourceManager
addSource, addSource, findOrCreateSource, findSource, getSize, sourceIterator
-
-
-
-
Constructor Detail
-
MamaSource
public MamaSource()
Creates a new mama source with default parameters
-
MamaSource
public MamaSource(java.lang.String sourceId, MamaTransport transport, java.lang.String symbolNamespace)
-
-
Method Detail
-
setId
public void setId(java.lang.String sourceId)
-
setMappedId
public void setMappedId(java.lang.String mappedId)
-
setDisplayId
public void setDisplayId(java.lang.String displayId)
-
setQuality
public void setQuality(short quality)
-
setState
public void setState(MamaSourceState state)
-
setParent
public void setParent(MamaSource parent)
-
setSymbolNamespace
public void setSymbolNamespace(java.lang.String symbolNamespace)
-
setTransportName
public void setTransportName(java.lang.String transportName)
-
setTransport
public void setTransport(MamaTransport transport)
-
getId
public final java.lang.String getId()
-
getMappedId
public final java.lang.String getMappedId()
-
getDisplayId
public final java.lang.String getDisplayId()
-
getQuality
public short getQuality()
-
getState
public MamaSourceState getState()
Get the state of a mama source object- Returns:
- The state of the source object
-
getStateAsString
public java.lang.String getStateAsString()
Get the stringified state name of a mama source object- Returns:
- The stringified state of the source object
-
getParent
public MamaSource getParent()
Get the parent source of the mama source object- Returns:
- MamaSource parent object
-
getSymbolNamespace
public final java.lang.String getSymbolNamespace()
-
getTransport
public MamaTransport getTransport()
-
addSubscription
public void addSubscription(java.lang.String key, MamaSubscription subscription)Add a subscriptions to the mamaSource- Parameters:
MamaSubscription- object
-
findSubscription
public MamaSubscription findSubscription(java.lang.String key)
find a MamaSubscription, null will be returned if not found- Parameters:
The- String identifier key for the subscription- Returns:
- The mama subscription object
-
isPartOf
public boolean isPartOf(MamaSource source)
-
destroy
public void destroy()
- Overrides:
destroyin classMamaSourceManager
-
-