java.lang.Object
net.i2p.client.I2PSimpleClient
- All Implemented Interfaces:
I2PClient
Field Summary
Fields inherited from interface I2PClient
DEFAULT_LISTEN_PORT, DEFAULT_SIGTYPE, PROP_ENABLE_SSL, PROP_FAST_RECEIVE, PROP_GZIP, PROP_PW, PROP_RELIABILITY, PROP_RELIABILITY_BEST_EFFORT, PROP_RELIABILITY_GUARANTEED, PROP_RELIABILITY_NONE, PROP_SIGTYPE, PROP_TCP_HOST, PROP_TCP_PORT, PROP_TUNNEL_BUILD_TIMEOUT, PROP_USER, PROTOCOL_BYTEModifier and TypeFieldDescriptionstatic final int7654.static final SigTypeDefault signature type.static final StringEnable SSL for I2CP connection.static final StringFor router->client payloads.static final StringEnable gzip compression for I2CP messages.static final StringPassword for I2CP authentication.static final StringReliability property.static final StringReliability value: best effort.static final StringReliability value: guaranteed.static final StringReliability value: none.static final StringDestination signature type property.static final StringStandard host property, defaulting to localhost if not specified.static final StringStandard port number property.static final StringHow many minutes to wait for the first lease set (tunnels) during session connect before failing.static final StringUsername for I2CP authentication.static final intProtocol flag that must be sent when opening the i2cp connection to the router.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptioncreateSession(InputStream destKeyStream, Properties options) Create a new session (though do not connect it yet).createSession(I2PAppContext context, Properties options) Create a new session (though do not connect it yet).Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface I2PClient
createDestination, createDestination, createDestinationModifier and TypeMethodDescriptioncreateDestination(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.createDestination(OutputStream destKeyStream, SigType type) Create a destination with the given signature type.createDestination(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.
Constructor Details
I2PSimpleClient
public I2PSimpleClient()Constructor. Sessions are created bycreateSession(InputStream, Properties)against the router named in the properties it is handed, so a bare instance is ready to connect.
Method Details
createSession
public I2PSession createSession(InputStream destKeyStream, Properties options) throws I2PSessionException Create a new session (though do not connect it yet).- Specified by:
createSessionin interfaceI2PClient- Parameters:
destKeyStream- stream containing the private key dataoptions- set of options to configure the router with- Returns:
- the new session
- Throws:
I2PSessionException- if there is a problem creating the session
createSession
public I2PSession createSession(I2PAppContext context, Properties options) throws I2PSessionException Create a new session (though do not connect it yet).- Parameters:
context- the application contextoptions- set of options to configure the router with- Returns:
- the new session
- Throws:
I2PSessionException- if the session cannot be created