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 void
addSubscription(java.lang.String key, MamaSubscription subscription)
Add a subscriptions to the mamaSourcevoid
destroy()
MamaSubscription
findSubscription(java.lang.String key)
find a MamaSubscription, null will be returned if not foundjava.lang.String
getDisplayId()
java.lang.String
getId()
java.lang.String
getMappedId()
MamaSource
getParent()
Get the parent source of the mama source objectshort
getQuality()
MamaSourceState
getState()
Get the state of a mama source objectjava.lang.String
getStateAsString()
Get the stringified state name of a mama source objectjava.lang.String
getSymbolNamespace()
MamaTransport
getTransport()
boolean
isPartOf(MamaSource source)
void
setDisplayId(java.lang.String displayId)
void
setId(java.lang.String sourceId)
void
setMappedId(java.lang.String mappedId)
void
setParent(MamaSource parent)
void
setQuality(short quality)
void
setState(MamaSourceState state)
void
setSymbolNamespace(java.lang.String symbolNamespace)
void
setTransport(MamaTransport transport)
void
setTransportName(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:
destroy
in classMamaSourceManager
-
-