Package net.i2p.i2ptunnel.socks
Class MultiSink<S extends Sink>
java.lang.Object
net.i2p.i2ptunnel.socks.MultiSink<S>
Sends to one of many Sinks based on the toPort
- Author:
- zzz modded from streamr/MultiSource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
send
(Destination from, int fromPort, int toPort, byte[] data) Send to a single sink looked up by toPort May throw RuntimeException from underlying sinksvoid
Don't use this - put sinks in the cachevoid
start()
-
Constructor Details
-
MultiSink
- Parameters:
cache
- map of toPort to Sink
-
-
Method Details
-
setSink
Don't use this - put sinks in the cache -
start
public void start() -
send
Send to a single sink looked up by toPort May throw RuntimeException from underlying sinks- Specified by:
send
in interfaceSink
- Parameters:
from
- passed alongfromPort
- passed alongtoPort
- passed along- Throws:
RuntimeException
- Since:
- 0.9.53 added fromPort and toPort parameters
-