public class EncodedDataStatus extends StatusMessage implements Iterable<EncodedDataStatus>
state| Constructor and Description |
|---|
EncodedDataStatus(KVList content)
creates a status with a list of Key-value pairs with the same timestamp
which is generated at creation time.
|
EncodedDataStatus(long timestampArg,
KVList content)
creates a status with a list of Key-value pairs with the same timestamp
|
EncodedDataStatus(long timestamp,
String key,
Object value)
creates a status with a single key and value (the timestamp is also provided)
|
EncodedDataStatus(String key,
Object value)
creates a status with a single key and value (the timestamp is generated)
|
| Modifier and Type | Method and Description |
|---|---|
static EncodedDataStatus |
addData(EncodedDataStatus current,
long timeStamp,
String name,
Object value)
Static method that adds a new EncodedDataStatus(timestamp, name, value) to the current parameter.
|
void |
addStatus(EncodedDataStatus next)
adds another status at the end of the linked list of status sent in a single message
|
KVList |
getContent() |
long |
getDataTimestamp() |
Iterator<EncodedDataStatus> |
iterator()
helps iterating over a list of linked status message.
|
void |
setNext(EncodedDataStatus next)
links another status next to this one (for sending a batch of status
in a single message)
|
String |
toString() |
getState, setStategetOriginAgentInfo, getSummary, getTimeStamp, setOriginAgentInfo, setSummaryclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic EncodedDataStatus(long timestampArg,
KVList content)
timestampArg - content - public EncodedDataStatus(KVList content)
content - public EncodedDataStatus(long timestamp,
String key,
Object value)
timestamp - key - value - public void addStatus(EncodedDataStatus next)
next - public void setNext(EncodedDataStatus next)
next - public static EncodedDataStatus addData(EncodedDataStatus current, long timeStamp, String name, Object value)
current - The Status we want to add data to (can be null)timeStamp - name - value - public Iterator<EncodedDataStatus> iterator()
EncodedDataStatus received = ..... ;
for (EncodedDataStatus dataStatus : received) {
KVList list = dataStatus.getContent();
for (KeyData keyData : list) {
.... dataStatus.getDataTimestamp() ....
.... keyData.getKey() ....
// one of those Three options
.... keyData.getValue() .... // Optional
.... keyData.getContentAsList() ....// may be empty
.... keyData.getCrystallizedData() .... // Optional
}
}
iterator in interface Iterable<EncodedDataStatus>public KVList getContent()
public long getDataTimestamp()
public String toString()
toString in class StatusMessageCopyright © 2015 LSST. All rights reserved.