public abstract class I2PTunnelTask extends EventDispatcherImpl
Modifier and Type | Field and Description |
---|---|
protected boolean |
open |
Modifier | Constructor and Description |
---|---|
protected |
I2PTunnelTask(String name,
EventDispatcher notifyThis,
I2PTunnel tunnel) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
close(boolean forced)
Note that the tunnel can be reopened after this by calling startRunning().
|
void |
connected(I2PSession session)
For tasks that don't call I2PTunnel.addSession() directly
|
boolean |
destroy()
Note that the tunnel cannot be reopened after this by calling startRunning(),
as it may destroy the underlying socket manager, depending on implementation.
|
void |
disconnected(I2PSession session) |
void |
errorOccurred(I2PSession session,
String message,
Throwable error)
Does nothing here.
|
int |
getId() |
I2PTunnel |
getTunnel() |
boolean |
isOpen() |
void |
optionsUpdated(I2PTunnel tunnel)
Notify the task that I2PTunnel's options have been updated.
|
void |
reportAbuse(I2PSession session,
int severity)
Does nothing here.
|
protected void |
routerDisconnected() |
void |
setId(int id) |
protected void |
setName(String name) |
void |
setTunnel(I2PTunnel pTunnel)
for apps that use multiple I2PTunnel instances
|
String |
toString() |
attachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, notifyEvent, unIgnoreEvents, waitEventValue
protected I2PTunnelTask(String name, EventDispatcher notifyThis, I2PTunnel tunnel)
public void setTunnel(I2PTunnel pTunnel)
public I2PTunnel getTunnel()
public int getId()
public boolean isOpen()
public void setId(int id)
protected void setName(String name)
protected void routerDisconnected()
public abstract boolean close(boolean forced)
public boolean destroy()
public void optionsUpdated(I2PTunnel tunnel)
public void connected(I2PSession session)
public void disconnected(I2PSession session)
public void errorOccurred(I2PSession session, String message, Throwable error)
public void reportAbuse(I2PSession session, int severity)