net.i2p.client

## Class I2PClientImpl

- java.lang.Object
- - net.i2p.client.I2PClientImpl

All Implemented Interfaces:
  I2PClient

     class I2PClientImpl
    extends Object
    implements I2PClient

Base client implementation

Author:
  jrandom

### Field Summary

### Fields inherited from interface net.i2p.client.I2PClient

`PROP_RELIABILITY, PROP_RELIABILITY_BEST_EFFORT, PROP_RELIABILITY_GUARANTEED, PROP_RELIABILITY_NONE, PROP_TCP_HOST, PROP_TCP_PORT, PROTOCOL_BYTE`

### Constructor Summary

Constructors
Constructor and Description
`I2PClientImpl()`

### Method Summary

Methods
`Destination` `createDestination(OutputStream destKeyStream)` Create the destination with a null payload
`Destination` `createDestination(OutputStream destKeyStream, Certificate cert)` Create the destination with the given payload and write it out along with the PrivateKey and SigningPrivateKey to the destKeyStream
`I2PSession` `createSession(I2PAppContext context, InputStream destKeyStream, Properties options)` Create a new session (though do not connect it yet)
`I2PSession` `createSession(InputStream destKeyStream, 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

#### I2PClientImpl

    I2PClientImpl()

### Method Detail

#### createDestination

    public Destination createDestination(OutputStream destKeyStream)
                                  throws I2PException,
                                         IOException

Create the destination with a null payload

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`
  `IOException`

#### createDestination

    public Destination createDestination(OutputStream destKeyStream,
                                Certificate cert)
                                  throws I2PException,
                                         IOException

Create the destination with the given payload and write it out along with the PrivateKey and SigningPrivateKey to the destKeyStream

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`
  `IOException`

#### createSession

    public I2PSession createSession(InputStream destKeyStream,
                           Properties options)
                             throws I2PSessionException

Create a new session (though do not connect it yet)

Specified by:
  `createSession` in interface `I2PClient`
Parameters:
  `options` - set of options to configure the router with, if null will use System properties
  `destKeyStream` - location from which to read the Destination, PrivateKey, and SigningPrivateKey from
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,
                           InputStream destKeyStream,
                           Properties options)
                             throws I2PSessionException

Create a new session (though do not connect it yet)

Parameters:
  `options` - set of options to configure the router with, if null will use System properties
Throws:
  `I2PSessionException`