edu.sc.seis.seisFile.seedlink
Class SeedlinkReader
java.lang.Object
edu.sc.seis.seisFile.seedlink.SeedlinkReader
public class SeedlinkReader
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_HOST
public static final java.lang.String DEFAULT_HOST
- See Also:
- Constant Field Values
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
INFO_ID
public static final java.lang.String INFO_ID
- See Also:
- Constant Field Values
INFO_CAPABILITIES
public static final java.lang.String INFO_CAPABILITIES
- See Also:
- Constant Field Values
INFO_STATIONS
public static final java.lang.String INFO_STATIONS
- See Also:
- Constant Field Values
INFO_STREAMS
public static final java.lang.String INFO_STREAMS
- See Also:
- Constant Field Values
INFO_GAPS
public static final java.lang.String INFO_GAPS
- See Also:
- Constant Field Values
INFO_CONNECTIONS
public static final java.lang.String INFO_CONNECTIONS
- See Also:
- Constant Field Values
INFO_ALL
public static final java.lang.String INFO_ALL
- See Also:
- Constant Field Values
SeedlinkReader
public SeedlinkReader(java.lang.String host)
throws java.net.UnknownHostException,
java.io.IOException,
SeedlinkException
- uses the default port of 18000
- Throws:
java.net.UnknownHostException
java.io.IOException
SeedlinkException
SeedlinkReader
public SeedlinkReader(java.lang.String host,
int port)
throws java.net.UnknownHostException,
java.io.IOException,
SeedlinkException
- Throws:
java.net.UnknownHostException
java.io.IOException
SeedlinkException
SeedlinkReader
public SeedlinkReader(java.lang.String host,
int port,
boolean verbose)
throws java.net.UnknownHostException,
java.io.IOException,
SeedlinkException
- Throws:
java.net.UnknownHostException
java.io.IOException
SeedlinkException
hasNext
public boolean hasNext()
throws java.io.IOException
- Throws:
java.io.IOException
next
public SeedlinkPacket next()
throws java.io.IOException,
SeedlinkException
- Throws:
java.io.IOException
SeedlinkException
info
public void info(java.lang.String level)
throws java.io.IOException
- send an INFO command. The resulting packets can be retrieved with calls
to next(), although it seems there is no good way to determine how many
packets will be returned or when they have all arrived without parsing
the xml. This appears to be a shortcoming of the seedlink protocol. INFO
requests should probably not be sent after the end of the handshake as
real data packets may arrive causing confusion.
- Throws:
java.io.IOException
endHandshake
public void endHandshake()
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
isConnected
public boolean isConnected()
isVerbose
public boolean isVerbose()
setVerbose
public void setVerbose(boolean verbose)
getVerboseWriter
public java.io.PrintWriter getVerboseWriter()
setVerboseWriter
public void setVerboseWriter(java.io.PrintWriter verboseWriter)
getHost
public java.lang.String getHost()
getPort
public int getPort()