public class StreamMonitor extends AbstractEncodedMessages implements Runnable
| Constructor and Description |
|---|
StreamMonitor(NtripClient client,
String mountPoint,
Type type,
boolean requiresNMEA,
boolean ignoreUnknownMessageTypes,
double reconnectDelay,
double reconnectDelayFactor,
int maxRetries)
Build a monitor for streaming data from a mount point.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(int typeCode,
MessageObserver observer)
Add an observer for encoded messages.
|
protected int |
fetchByte()
Fetch the next byte from the message.
|
OrekitException |
getException()
Retrieve exception caught during monitoring.
|
void |
run() |
void |
stopMonitoring()
Stop monitoring.
|
extractBits, startpublic StreamMonitor(NtripClient client, String mountPoint, Type type, boolean requiresNMEA, boolean ignoreUnknownMessageTypes, double reconnectDelay, double reconnectDelayFactor, int maxRetries)
client - associated NTRIP clientmountPoint - mount point providing the streamtype - messages type of the mount pointrequiresNMEA - if true, the mount point requires a NMEA GGA sentence in the requestignoreUnknownMessageTypes - if true, unknown messages types are silently ignoredreconnectDelay - delay before we reconnect after connection closereconnectDelayFactor - factor by which reconnection delay is multiplied after each attemptmaxRetries - max number of reconnect a attempts without reading any datapublic void addObserver(int typeCode,
MessageObserver observer)
If messages of the specified type have already been retrieved from a stream, the observer will be immediately notified with the last message as a side effect of being added.
typeCode - code for the message type (if set to 0, notification
will be triggered regardless of message type)observer - observer for this message typepublic void stopMonitoring()
public OrekitException getException()
protected int fetchByte()
fetchByte in class AbstractEncodedMessagesCopyright © 2002-2021 CS GROUP. All rights reserved.