org.openorb.orb.util
Class DebugSocketOutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--org.openorb.orb.util.DebugSocketOutputStream
- public class DebugSocketOutputStream
- extends java.io.OutputStream
This class can be used for debugging IIOP traffic on the socket
layer. Analyzing the network traffic with tools like Ethereal
make it hard to keep track of the traffic on the GIOP/IIOP layer.
Especially in a multi-threaded application where multiple threads
write on the same socket.
The class creates a folder in the os default temp directory:
${java.io.tmp}/${user.name}/<TIMESTAMP>/output
which contains the socket traffic files:
[localhost].[localport]-[remotehost].[remoteport].[TIMESTAMP].log
Each files contains a history of which bytes have been written
by which thread to the stream.
- Author:
- Michael Rumpf
Constructor Summary |
DebugSocketOutputStream(java.io.OutputStream parent,
long timestamp,
java.lang.String description)
Constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DebugSocketOutputStream
public DebugSocketOutputStream(java.io.OutputStream parent,
long timestamp,
java.lang.String description)
throws java.io.IOException
- Constructor.
- Parameters:
parent
- The parent output stream.timestamp
- The VM wide timestamp to identify this process.description
- The socket description generated from the socket.
write
public void write(int b)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
write
public void write(byte[] buf)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
write
public void write(byte[] buf,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
close
public void close()
throws java.io.IOException
- Overrides:
close
in class java.io.OutputStream
flush
public void flush()
throws java.io.IOException
- Overrides:
flush
in class java.io.OutputStream