Package edu.sc.seis.seisFile.earthworm
Class EarthwormExport
- java.lang.Object
-
- edu.sc.seis.seisFile.earthworm.EarthwormExport
-
public class EarthwormExport extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description EarthwormExport()EarthwormExport(int port, int module, int institution, java.lang.String heartbeatMessage, int heartbeatSeconds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseClient()voidcloseSocket()voidexport(TraceBuf2 traceBuf)voidexportWithRetry(TraceBuf2 traceBuf)EarthwormHeartbeatergetHeartbeater()intgetNumSplitTraceBufSent()intgetNumTraceBufSent()booleanisConnected()byte[]readResponseBytes()Reads from the socket input stream, usually just the other sides heartbeats.voidsetHeartbeater(EarthwormHeartbeater heartbeater)voidsetVerbose(boolean b)voidwaitForClient()protected voidwriteTraceBuf(TraceBuf2 tb)
-
-
-
Field Detail
-
verbose
public boolean verbose
-
ESC
public static final byte ESC
- See Also:
- Constant Field Values
-
STX
public static final byte STX
- See Also:
- Constant Field Values
-
ETX
public static final byte ETX
- See Also:
- Constant Field Values
-
SEQ_CODE
public static final java.lang.String SEQ_CODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
exportWithRetry
public void exportWithRetry(TraceBuf2 traceBuf) throws java.io.IOException
- Throws:
java.io.IOException
-
export
public void export(TraceBuf2 traceBuf) throws java.io.IOException
- Throws:
java.io.IOException
-
writeTraceBuf
protected void writeTraceBuf(TraceBuf2 tb) throws java.io.IOException
- Throws:
java.io.IOException
-
isConnected
public boolean isConnected()
-
waitForClient
public void waitForClient() throws java.io.IOException- Throws:
java.io.IOException
-
readResponseBytes
public byte[] readResponseBytes() throws java.io.IOExceptionReads from the socket input stream, usually just the other sides heartbeats.- Returns:
- byte array read from inputStream
- Throws:
java.io.IOException
-
closeClient
public void closeClient()
-
closeSocket
public void closeSocket()
-
getNumTraceBufSent
public int getNumTraceBufSent()
-
getNumSplitTraceBufSent
public int getNumSplitTraceBufSent()
-
setVerbose
public void setVerbose(boolean b)
-
getHeartbeater
public EarthwormHeartbeater getHeartbeater()
-
setHeartbeater
public void setHeartbeater(EarthwormHeartbeater heartbeater)
-
-