Package net.i2p.i2ptunnel.streamr
Class StreamrConsumer
- java.lang.Object
-
- net.i2p.util.EventDispatcherImpl
-
- net.i2p.i2ptunnel.I2PTunnelTask
-
- net.i2p.i2ptunnel.udpTunnel.I2PTunnelUDPClientBase
-
- net.i2p.i2ptunnel.streamr.StreamrConsumer
-
- All Implemented Interfaces:
Sink
,Source
,EventDispatcher
public class StreamrConsumer extends I2PTunnelUDPClientBase
Compared to a standard I2PTunnel, this acts like a client on the I2P side (no privkey file) but a server on the UDP side (sends to a configured host/port)- Author:
- welterde, zzz modded for I2PTunnel
-
-
Field Summary
-
Fields inherited from class net.i2p.i2ptunnel.udpTunnel.I2PTunnelUDPClientBase
_clientId, _context, l
-
Fields inherited from class net.i2p.i2ptunnel.I2PTunnelTask
open
-
-
Constructor Summary
Constructors Constructor Description StreamrConsumer(InetAddress host, int port, String destination, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
close(boolean forced)
I2PTunnelTask Methods Classes should override to close UDP side as wellvoid
startRunning()
Actually start working on outgoing connections.-
Methods inherited from class net.i2p.i2ptunnel.udpTunnel.I2PTunnelUDPClientBase
send, setSink, start
-
Methods inherited from class net.i2p.i2ptunnel.I2PTunnelTask
connected, destroy, disconnected, errorOccurred, getId, getTunnel, isOpen, optionsUpdated, reportAbuse, routerDisconnected, setId, setName, setTunnel, toString
-
Methods inherited from class net.i2p.util.EventDispatcherImpl
attachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, notifyEvent, unIgnoreEvents, waitEventValue
-
-
-
-
Constructor Detail
-
StreamrConsumer
public StreamrConsumer(InetAddress host, int port, String destination, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
-
-
Method Detail
-
startRunning
public final void startRunning()
Description copied from class:I2PTunnelUDPClientBase
Actually start working on outgoing connections. Classes should override to start UDP side as well. Not specified in I2PTunnelTask but used in both I2PTunnelClientBase and I2PTunnelServer so let's implement it here too.- Overrides:
startRunning
in classI2PTunnelUDPClientBase
-
close
public boolean close(boolean forced)
Description copied from class:I2PTunnelUDPClientBase
I2PTunnelTask Methods Classes should override to close UDP side as well- Overrides:
close
in classI2PTunnelUDPClientBase
- Returns:
- success
-
-