public class DataStatus2 extends Status implements Iterable<DataStatus2>
detailLevel, origin, priorityLevel, summary, timeStamp| Constructor and Description |
|---|
DataStatus2(KVList content)
creates a status with a list of Key-value pairs with the same timestamp
which is generated at creation time.
|
DataStatus2(long timestampArg,
KVList content)
creates a status with a list of Key-value pairs with the same timestamp
|
DataStatus2(long timestamp,
String key,
Object value)
creates a status with a single key and value (the timestamp is also provided)
|
DataStatus2(String key,
Object value)
creates a status with a single key and value (the timestamp is generated)
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStatus(DataStatus2 next)
adds another status at the end of the linked list of status sent in a single message
|
KVList |
getContent() |
long |
getDataTimestamp() |
Iterator<DataStatus2> |
iterator()
helps iterating over a list of linked status message.
|
void |
setNext(DataStatus2 next)
links another status next to this one (for sending a batch of status
in a single message)
|
String |
toString() |
getMessageType, getState, setStategetDetailLevel, getOrigin, getPriorityLevel, getSummary, getTimeStamp, setDetailLevel, setOrigin, setPriorityLevel, setSummary, setTimeStamppublic DataStatus2(long timestampArg,
KVList content)
timestampArg - content - public DataStatus2(KVList content)
content - public DataStatus2(long timestamp,
String key,
Object value)
timestamp - key - value - public void addStatus(DataStatus2 next)
next - public void setNext(DataStatus2 next)
next - public Iterator<DataStatus2> iterator()
DataStatus2 received = ..... ;
for (DataStatus2 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<DataStatus2>public KVList getContent()
public long getDataTimestamp()
Copyright © 2014 LSST. All Rights Reserved.