## net.i2p.client
Interface I2PClient

All Known Implementing Classes:
  I2PClientImpl

public interface I2PClient

Define the standard means of interacting with the I2P system

Author:
  jrandom

Field Summary
`static java.lang.String` `PROP_RELIABILITY` Reliability property
`static java.lang.String` `PROP_RELIABILITY_BEST_EFFORT` Reliability value: best effort
`static java.lang.String` `PROP_RELIABILITY_GUARANTEED` Reliability value: guaranteed
`static java.lang.String` `PROP_TCP_HOST` Standard host property, defaulting to localhost if not specified
`static java.lang.String` `PROP_TCP_PORT` Standard port number property
`static int` `PROTOCOL_BYTE` protocol flag that must be sent when opening the i2cp connection to the router

Method Summary
`Destination` `createDestination(java.io.OutputStream destKeyStream)` 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
`Destination` `createDestination(java.io.OutputStream destKeyStream, Certificate cert)` Create a new destination with the given certificate and store it, along with the private encryption and signing keys at the specified location
`I2PSession` `createSession(java.io.InputStream destKeyStream, java.util.Properties options)` Create a new client session for the Destination stored at the destKeyStream using the specified options to both connect to the router, to instruct the router how to handle the new session, and to configure the end to end encryption.

Field Detail

### PROP_TCP_HOST

    public static final java.lang.String PROP_TCP_HOST

  Standard host property, defaulting to localhost if not specified

  See Also:
    Constant Field Values

### PROP_TCP_PORT

    public static final java.lang.String PROP_TCP_PORT

  Standard port number property

  See Also:
    Constant Field Values

### PROP_RELIABILITY

    public static final java.lang.String PROP_RELIABILITY

  Reliability property

  See Also:
    Constant Field Values

### PROP_RELIABILITY_BEST_EFFORT

    public static final java.lang.String PROP_RELIABILITY_BEST_EFFORT

  Reliability value: best effort

  See Also:
    Constant Field Values

### PROP_RELIABILITY_GUARANTEED

    public static final java.lang.String PROP_RELIABILITY_GUARANTEED

  Reliability value: guaranteed

  See Also:
    Constant Field Values

### PROTOCOL_BYTE

    public static final int PROTOCOL_BYTE

  protocol flag that must be sent when opening the i2cp connection to the router

  See Also:
    Constant Field Values

Method Detail

### createSession

    public I2PSession createSession(java.io.InputStream destKeyStream,
                                    java.util.Properties options)
                             throws I2PSessionException

  Create a new client session for the Destination stored at the destKeyStream using the specified options to both connect to the router, to instruct the router how to handle the new session, and to configure the end to end encryption.

  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`

### createDestination

    public Destination createDestination(java.io.OutputStream destKeyStream)
                                  throws I2PException,
                                         java.io.IOException

  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

  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

  Create a new destination with the given certificate and store it, along with the private encryption and signing keys at the specified location

  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`