Package net.i2p.i2ptunnel.udp
Class I2PSource.Listener
- java.lang.Object
-
- net.i2p.i2ptunnel.udp.I2PSource.Listener
-
- All Implemented Interfaces:
I2PSessionListener
- Enclosing class:
- I2PSource
protected class I2PSource.Listener extends Object implements I2PSessionListener
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisconnected(I2PSession arg0)Notify the client that the session has been terminatedvoiderrorOccurred(I2PSession arg0, String arg1, Throwable arg2)Notify the client that some error occurredvoidmessageAvailable(I2PSession sess, int id, long size)Instruct the client that the given session has received a message with size # of bytes.voidreportAbuse(I2PSession arg0, int arg1)Instruct the client that the session specified seems to be under attack and that the client may wish to move its destination to another router.
-
-
-
Method Detail
-
messageAvailable
public void messageAvailable(I2PSession sess, int id, long size)
Description copied from interface:I2PSessionListenerInstruct the client that the given session has received a message with size # of bytes. After this is called, the client should call receiveMessage(msgId). There is currently no method for the client to reject the message. If the client does not call receiveMessage() within a timeout period (currently 30 seconds), the session will delete the message and log an error.- Specified by:
messageAvailablein interfaceI2PSessionListener- Parameters:
sess- session to notifyid- message number availablesize- size of the message - why it's a long and not an int is a mystery
-
reportAbuse
public void reportAbuse(I2PSession arg0, int arg1)
Description copied from interface:I2PSessionListenerInstruct the client that the session specified seems to be under attack and that the client may wish to move its destination to another router. Unused. Not fully implemented.- Specified by:
reportAbusein interfaceI2PSessionListener- Parameters:
arg0- session to report abuse toarg1- how bad the abuse is
-
disconnected
public void disconnected(I2PSession arg0)
Description copied from interface:I2PSessionListenerNotify the client that the session has been terminated- Specified by:
disconnectedin interfaceI2PSessionListener
-
errorOccurred
public void errorOccurred(I2PSession arg0, String arg1, Throwable arg2)
Description copied from interface:I2PSessionListenerNotify the client that some error occurred- Specified by:
errorOccurredin interfaceI2PSessionListenerarg2- can be null? or not?
-
-