|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.i2p.i2ptunnel.I2PTunnelTask
public abstract class I2PTunnelTask
Either a Server or a Client.
| Field Summary | |
|---|---|
protected boolean |
open
|
| Constructor Summary | |
|---|---|
protected |
I2PTunnelTask(String name,
EventDispatcher notifyThis,
I2PTunnel tunnel)
|
| Method Summary | |
|---|---|
void |
attachEventDispatcher(EventDispatcher e)
Attach an EventDispatcher object to the events dispatching chain. |
abstract boolean |
close(boolean forced)
|
void |
detachEventDispatcher(EventDispatcher e)
Detach the specified EventDispatcher object from the events dispatching chain. |
void |
disconnected(I2PSession session)
|
void |
errorOccurred(I2PSession session,
String message,
Throwable error)
|
EventDispatcher |
getEventDispatcher()
Get an object to be used to deliver events (usually this, but YMMV). |
Set |
getEvents()
Retrieve the names of all the events that have been received |
Object |
getEventValue(String n)
Retrieve the value currently associated with the specified event value |
int |
getId()
|
I2PTunnel |
getTunnel()
|
void |
ignoreEvents()
Ignore further event notifications |
boolean |
isOpen()
|
void |
notifyEvent(String e,
Object a)
Deliver an event |
void |
reportAbuse(I2PSession session,
int severity)
|
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()
|
void |
unIgnoreEvents()
Almost like the method above :-) |
Object |
waitEventValue(String n)
Wait until the given event has received a value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected 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 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 Objectpublic EventDispatcher getEventDispatcher()
EventDispatcherthis, but YMMV).
getEventDispatcher in interface EventDispatcherpublic void attachEventDispatcher(EventDispatcher e)
EventDispatcherev won't reach the object calling this method).
Good luck, and beware of notification loops! :-)
attachEventDispatcher in interface EventDispatchere - Event object to be attachedpublic void detachEventDispatcher(EventDispatcher e)
EventDispatcher
detachEventDispatcher in interface EventDispatchere - Event object to be detached
public void notifyEvent(String e,
Object a)
EventDispatcher
notifyEvent in interface EventDispatchere - name of the eventa - data being stored for that eventpublic Object getEventValue(String n)
EventDispatcher
getEventValue in interface EventDispatchern - name of the event to query for
public Set getEvents()
EventDispatcher
getEvents in interface EventDispatcherpublic void ignoreEvents()
EventDispatcher
ignoreEvents in interface EventDispatcherpublic void unIgnoreEvents()
EventDispatcher
unIgnoreEvents in interface EventDispatcherpublic Object waitEventValue(String n)
EventDispatcher
waitEventValue in interface EventDispatchern - name of the event to wait for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||