net.i2p.i2ptunnel.socks
Class ReplyTracker<S extends Sink>

java.lang.Object
  extended by net.i2p.i2ptunnel.socks.ReplyTracker<S>
All Implemented Interfaces:
Sink, Source

public class ReplyTracker<S extends Sink>
extends Object
implements Source, Sink

Track who the reply goes to

Author:
zzz

Constructor Summary
ReplyTracker(S reply, Map<Destination,S> cache)
           
 
Method Summary
 void send(Destination to, byte[] data)
          May throw RuntimeException from underlying sink
 void setSink(Sink sink)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplyTracker

public ReplyTracker(S reply,
                    Map<Destination,S> cache)
Method Detail

setSink

public void setSink(Sink sink)
Specified by:
setSink in interface Source

start

public void start()
Specified by:
start in interface Source

send

public void send(Destination to,
                 byte[] data)
May throw RuntimeException from underlying sink

Specified by:
send in interface Sink
Parameters:
to - some implementations may ignore
Throws:
RuntimeException