|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.sam.SAMMessageSession.SAMMessageSessionHandler
public class SAMMessageSession.SAMMessageSessionHandler
SAM message-based session handler, running in its own thread
Constructor Summary | |
---|---|
SAMMessageSession.SAMMessageSessionHandler(InputStream destStream,
Properties props)
Create a new SAM message-based session handler |
Method Summary | |
---|---|
void |
disconnected(I2PSession session)
Notify the client that the session has been terminated |
void |
errorOccurred(I2PSession session,
String message,
Throwable error)
Notify the client that some error occurred |
void |
messageAvailable(I2PSession session,
int msgId,
long size)
Instruct the client that the given session has received a message with size # of bytes. |
void |
reportAbuse(I2PSession session,
int severity)
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. |
void |
run()
|
void |
stopRunning()
Stop a SAM message-based session handling thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SAMMessageSession.SAMMessageSessionHandler(InputStream destStream, Properties props) throws I2PSessionException
destStream
- Input stream containing the destination keysprops
- Properties to setup the I2P session
I2PSessionException
Method Detail |
---|
public final void stopRunning()
public void run()
run
in interface Runnable
public void disconnected(I2PSession session)
I2PSessionListener
disconnected
in interface I2PSessionListener
public void errorOccurred(I2PSession session, String message, Throwable error)
I2PSessionListener
errorOccurred
in interface I2PSessionListener
error
- can be null? or not?public void messageAvailable(I2PSession session, int msgId, long size)
I2PSessionListener
messageAvailable
in interface I2PSessionListener
session
- session to notifymsgId
- message number availablesize
- size of the message - why it's a long and not an int is a mysterypublic void reportAbuse(I2PSession session, int severity)
I2PSessionListener
reportAbuse
in interface I2PSessionListener
session
- session to report abuse toseverity
- how bad the abuse is
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |