public class TransportTraceFilter extends java.lang.Object implements TransportFilter
Client client = new Client(...);
client.connect(...);
client.getTransport().setTransportFilter(
new TransportTraceFilter(System.err)
); | Constructor and Description |
|---|
TransportTraceFilter(java.io.OutputStream stream_)
Construct a TransportTraceFilter to trace messages on stream_.
|
| Modifier and Type | Method and Description |
|---|---|
void |
incoming(java.nio.ByteBuffer data)
Method to call the print() method with the incoming prefix for printing raw data.
|
void |
outgoing(java.nio.ByteBuffer data)
Method to call the print() method with the outgoing prefix for printing raw data.
|
protected void |
print(java.lang.String prefix,
java.nio.ByteBuffer data)
Function to print the raw data.
|
public TransportTraceFilter(java.io.OutputStream stream_)
stream_ - The OutputStream to trace messages to.protected void print(java.lang.String prefix,
java.nio.ByteBuffer data)
prefix - The prefix label passed to the function. This will be either incoming or outgoing.data - The bytebuffer of raw data to be printed.public void outgoing(java.nio.ByteBuffer data)
outgoing in interface TransportFilterdata - The raw data to be passed to the print() method.public void incoming(java.nio.ByteBuffer data)
incoming in interface TransportFilterdata - The raw data to be passed to the print() method.