public class DebugStreamGrabber
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Class and Description |
|---|---|
static class |
DebugStreamGrabber.StreamType |
| Constructor and Description |
|---|
DebugStreamGrabber(java.lang.String readerName,
DebugStreamGrabber.StreamType streamType)
Initiates a debug stream capture from the given reader
|
| Modifier and Type | Method and Description |
|---|---|
void |
Close() |
void |
close(int flushTime)
Closes the connection and joins the pumper thread.
|
protected java.io.InputStream |
createConnection()
Establishes a connection with the reader and returns the input stream
from the reader.
|
void |
run()
This is purely just the pumping of bytes from the reader to the output
stream
|
void |
startPumperThread(java.lang.String outputFileName)
Kicks off the thread that streams data from the reader to the
outputStream.
|
public DebugStreamGrabber(java.lang.String readerName,
DebugStreamGrabber.StreamType streamType)
throws java.net.UnknownHostException,
java.io.IOException
readerName - Name of the reader to which to connect. This can be
a dns name or an ip address.streamType - Indicates whether its RDD or FDDjava.net.UnknownHostException - IP address is not correctjava.io.IOException - TCP/IP communication failurepublic void startPumperThread(java.lang.String outputFileName)
throws java.lang.Exception
outputFileName - The stream to which to send the data.java.io.IOException - Error while outputting to filejava.lang.Exceptionpublic void Close()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void close(int flushTime)
throws java.lang.InterruptedException
flushTime - Extra time to allow data to get flushed through the
system.java.lang.InterruptedException - Thread interrupted during close.public void run()
run in interface java.lang.Runnableprotected final java.io.InputStream createConnection()
throws java.net.UnknownHostException,
java.io.IOException
java.net.UnknownHostException - IP address is not correctjava.io.IOException - TCP/IP communication failure