public final class CompositeFilter extends Object implements TCPProxyFilter
TCPProxyFilter.FilterException
Constructor and Description |
---|
CompositeFilter() |
Modifier and Type | Method and Description |
---|---|
void |
add(TCPProxyFilter filter)
Add a filter to the composite.
|
void |
connectionClosed(ConnectionDetails connectionDetails)
A connection has been closed.
|
void |
connectionOpened(ConnectionDetails connectionDetails)
A new connection has been opened.
|
byte[] |
handle(ConnectionDetails connectionDetails,
byte[] originalBuffer,
int bytesRead)
Handle a message fragment from the stream.
|
String |
toString()
Describe the filter.
|
public byte[] handle(ConnectionDetails connectionDetails, byte[] originalBuffer, int bytesRead) throws TCPProxyFilter.FilterException
handle
in interface TCPProxyFilter
connectionDetails
- Describes the connection.originalBuffer
- Contains the data.bytesRead
- How many bytes of data in buffer
.byte[]
which will be transmitted to the server instead of
buffer
.TCPProxyFilter.FilterException
- If an error occurs.public void connectionOpened(ConnectionDetails connectionDetails) throws TCPProxyFilter.FilterException
connectionOpened
in interface TCPProxyFilter
connectionDetails
- Describes the connection.TCPProxyFilter.FilterException
- If an error occurs.public void connectionClosed(ConnectionDetails connectionDetails) throws TCPProxyFilter.FilterException
connectionClosed
in interface TCPProxyFilter
connectionDetails
- Describes the connection.TCPProxyFilter.FilterException
- If an error occurs.public void add(TCPProxyFilter filter)
filter
- The filter.Copyright © 2000-2014. All Rights Reserved.