|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.util.EventDispatcherImpl
net.i2p.i2ptunnel.I2PTunnelTask
public abstract class I2PTunnelTask
Either a Server or a Client. Use caution if extending externally. This class should be maintained as a stable API, but ask to be sure. Note that there is no startRunning() method, however all extending classes implement one.
Field Summary | |
---|---|
protected boolean |
open
|
Constructor Summary | |
---|---|
protected |
I2PTunnelTask(String name,
EventDispatcher notifyThis,
I2PTunnel tunnel)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class net.i2p.util.EventDispatcherImpl |
---|
attachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, notifyEvent, unIgnoreEvents, waitEventValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected volatile boolean open
Constructor Detail |
---|
protected I2PTunnelTask(String name, EventDispatcher notifyThis, I2PTunnel tunnel)
Method Detail |
---|
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)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |