|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.client.ATalk
public class ATalk
ATalk - anonymous talk, demonstrating a trivial I2P usage scenario. Run this class with no arguments for a manual.
Field Summary | |
---|---|
static java.lang.String |
PROP_CONFIG_LOCATION
|
Constructor Summary | |
---|---|
ATalk(java.lang.String myKeyFile,
java.lang.String theirDestFile)
Construct the talk engine, but don't connect yet |
Method Summary | |
---|---|
void |
connect()
Actually start up the connection to the I2P network. |
void |
disconnected(I2PSession session)
required by I2PSessionListener to notify of disconnect |
void |
errorOccurred(I2PSession session,
java.lang.String message,
java.lang.Throwable error)
required by I2PSessionListener to notify of error |
static void |
main(java.lang.String[] args)
driver |
void |
messageAvailable(I2PSession session,
int msgId,
long size)
I2PSessionListener.messageAvailable requires this method to be called whenever I2P wants to tell the session that a message is available. |
void |
reportAbuse(I2PSession session,
int severity)
required by I2PSessionListener to notify of abuse |
void |
run()
Actual bulk processing of the application, reading in user input, sending messages, and displaying results. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROP_CONFIG_LOCATION
Constructor Detail |
---|
public ATalk(java.lang.String myKeyFile, java.lang.String theirDestFile)
Method Detail |
---|
public void connect() throws java.io.IOException, I2PSessionException, DataFormatException
java.io.IOException
- if there is a problem reading in the keys from the files specified
DataFormatException
- if the key files are not in the valid format
I2PSessionException
- if there is a problem contacting the I2P routerpublic void run()
run
in interface java.lang.Runnable
public void messageAvailable(I2PSession session, int msgId, long size)
messageAvailable
in interface I2PSessionListener
session
- session to notifymsgId
- message number availablesize
- size of the messagepublic static void main(java.lang.String[] args)
public void disconnected(I2PSession session)
I2PSessionListener
to notify of disconnect
disconnected
in interface I2PSessionListener
public void errorOccurred(I2PSession session, java.lang.String message, java.lang.Throwable error)
I2PSessionListener
to notify of error
errorOccurred
in interface I2PSessionListener
public void reportAbuse(I2PSession session, int severity)
I2PSessionListener
to notify of abuse
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 |