rabbit.proxy
Class Tunnel
java.lang.Object
rabbit.proxy.Tunnel
public class Tunnel
- extends java.lang.Object
A handler that just tunnels data.
- Author:
- Robert Olofsson
|
Constructor Summary |
Tunnel(NioHandler nioHandler,
java.nio.channels.SocketChannel from,
BufferHandle fromHandle,
TrafficLogger fromLogger,
java.nio.channels.SocketChannel to,
BufferHandle toHandle,
TrafficLogger toLogger,
rabbit.proxy.TunnelDoneListener listener)
Create a tunnel that transfers data as fast as possible in full
duplex. |
|
Method Summary |
void |
start()
Start tunneling data in both directions. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Tunnel
public Tunnel(NioHandler nioHandler,
java.nio.channels.SocketChannel from,
BufferHandle fromHandle,
TrafficLogger fromLogger,
java.nio.channels.SocketChannel to,
BufferHandle toHandle,
TrafficLogger toLogger,
rabbit.proxy.TunnelDoneListener listener)
- Create a tunnel that transfers data as fast as possible in full
duplex.
- Parameters:
nioHandler - the NioHandler to use for waiting on data to read
as well as waiting for write readyfrom - one end of the tunnelfromHandle - the ByteBuffer holder for the data from "from"fromLogger - the traffic statistics gatherer for "from"to - the other end of the tunneltoHandle - the ByteBuffer holder for the data from "from"toLogger - the traffic statistics gatherer for "from"listener - the listener that will be notified when the tunnel
is closed
start
public void start()
- Start tunneling data in both directions.