net.i2p.client
Class I2PSimpleClient

java.lang.Object
  extended by net.i2p.client.I2PSimpleClient
All Implemented Interfaces:
I2PClient

public class I2PSimpleClient
extends java.lang.Object
implements I2PClient

Simple client implementation with no Destination, just used to talk to the router.


Field Summary
 
Fields inherited from interface net.i2p.client.I2PClient
PROP_RELIABILITY, PROP_RELIABILITY_BEST_EFFORT, PROP_RELIABILITY_GUARANTEED, PROP_TCP_HOST, PROP_TCP_PORT, PROTOCOL_BYTE
 
Constructor Summary
I2PSimpleClient()
           
 
Method Summary
 Destination createDestination(java.io.OutputStream destKeyStream)
          Deprecated. Don't do this
 Destination createDestination(java.io.OutputStream destKeyStream, Certificate cert)
          Deprecated. or this
 I2PSession createSession(I2PAppContext context, java.util.Properties options)
          Create a new session (though do not connect it yet)
 I2PSession createSession(java.io.InputStream destKeyStream, java.util.Properties options)
          Create a new session (though do not connect it yet)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I2PSimpleClient

public I2PSimpleClient()
Method Detail

createDestination

public Destination createDestination(java.io.OutputStream destKeyStream)
                              throws I2PException,
                                     java.io.IOException
Deprecated. Don't do this

Description copied from interface: I2PClient
Create a new destination with the default certificate creation properties and store it, along with the private encryption and signing keys at the specified location

Specified by:
createDestination in interface I2PClient
Parameters:
destKeyStream - create a new destination and write out the object to the given stream, formatted as Destination, PrivateKey, and SigningPrivateKey
Returns:
new destination
Throws:
I2PException
java.io.IOException

createDestination

public Destination createDestination(java.io.OutputStream destKeyStream,
                                     Certificate cert)
                              throws I2PException,
                                     java.io.IOException
Deprecated. or this

Description copied from interface: I2PClient
Create a new destination with the given certificate and store it, along with the private encryption and signing keys at the specified location

Specified by:
createDestination in interface I2PClient
Parameters:
destKeyStream - location to write out the destination, PrivateKey, and SigningPrivateKey
cert - certificate to tie to the destination
Returns:
newly created destination
Throws:
I2PException
java.io.IOException

createSession

public I2PSession createSession(java.io.InputStream destKeyStream,
                                java.util.Properties options)
                         throws I2PSessionException
Create a new session (though do not connect it yet)

Specified by:
createSession in interface I2PClient
Parameters:
destKeyStream - location from which to read the Destination, PrivateKey, and SigningPrivateKey from
options - set of options to configure the router with
Returns:
new session allowing a Destination to recieve all of its messages and send messages to any other Destination.
Throws:
I2PSessionException

createSession

public I2PSession createSession(I2PAppContext context,
                                java.util.Properties options)
                         throws I2PSessionException
Create a new session (though do not connect it yet)

Throws:
I2PSessionException