forked from I2P_Developers/i2p.i2p
I2CP: Move client-side implementation classes to
new package net.i2p.client.impl, leaving only the factories and interfaces in net.i2p.client
This commit is contained in:
@ -207,8 +207,6 @@ class PacketLocal extends Packet implements MessageOutputStream.WriteStatus {
|
||||
*
|
||||
* @param buffer data to be written
|
||||
* @param offset starting point in the buffer
|
||||
* @param ctx Application Context
|
||||
* @param key signing key
|
||||
* @return Count of bytes written
|
||||
* @throws IllegalStateException if there is data missing or otherwise b0rked
|
||||
* @since 0.9.20 moved from Packet
|
||||
|
@ -9,6 +9,8 @@ package net.i2p.client;
|
||||
*
|
||||
*/
|
||||
|
||||
import net.i2p.client.impl.I2PClientImpl;
|
||||
|
||||
/**
|
||||
* Provide a means of hooking into an appropriate I2PClient implementation
|
||||
*
|
||||
|
@ -260,7 +260,6 @@ public interface I2PSession {
|
||||
public I2PSession addSubsession(InputStream privateKeyStream, Properties opts) throws I2PSessionException;
|
||||
|
||||
/**
|
||||
* @return a list of subsessions, non-null, does not include the primary session
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public void removeSubsession(I2PSession session);
|
||||
|
@ -12,6 +12,7 @@ import java.util.Properties;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.I2PException;
|
||||
import net.i2p.client.impl.I2PSimpleSession;
|
||||
import net.i2p.crypto.SigType;
|
||||
import net.i2p.data.Certificate;
|
||||
import net.i2p.data.Destination;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* Released into the public domain
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.IOException;
|
||||
@ -9,6 +9,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.i2cp.I2CPMessage;
|
||||
import net.i2p.data.i2cp.I2CPMessageException;
|
||||
import net.i2p.internal.PoisonI2CPMessage;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* Released into the public domain
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
||||
@ -10,6 +10,7 @@ package net.i2p.client;
|
||||
*/
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.i2cp.DisconnectMessage;
|
||||
import net.i2p.data.i2cp.I2CPMessage;
|
||||
import net.i2p.util.I2PAppThread;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* Released into the public domain
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
||||
@ -15,6 +15,8 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.client.SendMessageOptions;
|
||||
import net.i2p.data.DataFormatException;
|
||||
import net.i2p.data.Destination;
|
||||
import net.i2p.data.LeaseSet;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
||||
@ -17,6 +17,9 @@ import java.util.Properties;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.I2PException;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.crypto.KeyGenerator;
|
||||
import net.i2p.crypto.SigType;
|
||||
import net.i2p.data.Certificate;
|
||||
@ -36,7 +39,7 @@ import net.i2p.util.RandomSource;
|
||||
*
|
||||
* @author jrandom
|
||||
*/
|
||||
class I2PClientImpl implements I2PClient {
|
||||
public class I2PClientImpl implements I2PClient {
|
||||
|
||||
/**
|
||||
* Create a destination with a DSA 1024/160 signature type and a null certificate.
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
@ -1,9 +1,13 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.client.I2PSessionListener;
|
||||
import net.i2p.client.I2PSessionMuxedListener;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
/*
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
||||
@ -29,6 +29,11 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import net.i2p.CoreVersion;
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.DomainSocketFactory;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.client.I2PSessionListener;
|
||||
import net.i2p.data.Base32;
|
||||
import net.i2p.data.DataFormatException;
|
||||
import net.i2p.data.Destination;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
||||
@ -20,6 +20,12 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.client.I2PSessionListener;
|
||||
import net.i2p.client.I2PSessionMuxedListener;
|
||||
import net.i2p.client.SendMessageOptions;
|
||||
import net.i2p.client.SendMessageStatusListener;
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.data.Destination;
|
||||
import net.i2p.data.SessionKey;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* public domain
|
||||
@ -8,9 +8,14 @@ import java.io.InputStream;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.client.I2PSessionListener;
|
||||
import net.i2p.client.I2PSessionMuxedListener;
|
||||
import net.i2p.client.SendMessageOptions;
|
||||
import net.i2p.client.SendMessageStatusListener;
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.data.Destination;
|
||||
import net.i2p.data.SessionKey;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* Released into the public domain
|
||||
@ -16,6 +16,8 @@ import java.util.Properties;
|
||||
|
||||
import net.i2p.CoreVersion;
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.i2cp.BandwidthLimitsMessage;
|
||||
import net.i2p.data.i2cp.DestReplyMessage;
|
||||
import net.i2p.data.i2cp.DisconnectMessage;
|
||||
@ -37,7 +39,7 @@ import net.i2p.util.OrderedProperties;
|
||||
*
|
||||
* @author zzz
|
||||
*/
|
||||
class I2PSimpleSession extends I2PSessionImpl2 {
|
||||
public class I2PSimpleSession extends I2PSessionImpl2 {
|
||||
|
||||
private static final int BUF_SIZE = 1024;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
||||
@ -10,6 +10,7 @@ package net.i2p.client;
|
||||
*/
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.DataFormatException;
|
||||
import net.i2p.data.Payload;
|
||||
import net.i2p.data.i2cp.I2CPMessage;
|
@ -1,8 +1,10 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.SendMessageStatusListener;
|
||||
import net.i2p.data.i2cp.MessageId;
|
||||
import net.i2p.data.i2cp.MessageStatusMessage;
|
||||
import net.i2p.util.Log;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
||||
@ -10,6 +10,7 @@ package net.i2p.client;
|
||||
*/
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.i2cp.I2CPMessage;
|
||||
import net.i2p.data.i2cp.MessageStatusMessage;
|
||||
import net.i2p.data.i2cp.ReceiveMessageBeginMessage;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
||||
@ -14,6 +14,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.crypto.KeyGenerator;
|
||||
import net.i2p.crypto.SigType;
|
||||
import net.i2p.data.DataFormatException;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
||||
@ -8,6 +8,7 @@ package net.i2p.client;
|
||||
import java.util.Properties;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.util.Log;
|
||||
import net.i2p.util.SimpleTimer;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
||||
@ -10,6 +10,7 @@ package net.i2p.client;
|
||||
*/
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.i2cp.I2CPMessage;
|
||||
import net.i2p.data.i2cp.SessionStatusMessage;
|
||||
import net.i2p.util.Log;
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
/*
|
||||
* free (adj.): unencumbered; not under the control of others
|
@ -1,4 +1,4 @@
|
||||
package net.i2p.client;
|
||||
package net.i2p.client.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -9,6 +9,8 @@ import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.I2PSessionException;
|
||||
import net.i2p.data.Destination;
|
||||
import net.i2p.data.Hash;
|
||||
import net.i2p.data.PrivateKey;
|
11
core/java/src/net/i2p/client/impl/package.html
Normal file
11
core/java/src/net/i2p/client/impl/package.html
Normal file
@ -0,0 +1,11 @@
|
||||
<html><body>
|
||||
<p>Implements the base I2P SDK for developing applications that communicate
|
||||
through I2P.</p>
|
||||
|
||||
<p>
|
||||
These classes are for implementing the client side of I2CP
|
||||
and are not to be used externally.
|
||||
Subject to change and not part of the public API.
|
||||
Moved from net.i2p.client in 0.9.21.
|
||||
</p>
|
||||
</body></html>
|
@ -1,6 +1,13 @@
|
||||
<html><body>
|
||||
<p>Implements the base I2P SDK for developing applications that communicate
|
||||
through I2P.</p>
|
||||
<p>
|
||||
Interfaces and factories for
|
||||
the base I2P SDK used to develop applications that communicate
|
||||
through I2P.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Implementation moved to net.i2p.client.impl in 0.9.21.
|
||||
</p>
|
||||
|
||||
<p>When a client application wants to communicate over I2P, the first thing it
|
||||
needs to do is get a {@link net.i2p.client.I2PClient} from the
|
||||
|
@ -20,7 +20,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import gnu.getopt.Getopt;
|
||||
|
||||
import net.i2p.client.I2PSessionImpl;
|
||||
import net.i2p.client.impl.I2PSessionImpl;
|
||||
import net.i2p.crypto.SigUtil;
|
||||
import net.i2p.data.Base64;
|
||||
import net.i2p.data.Certificate;
|
||||
|
@ -132,7 +132,7 @@ public class ClientManagerFacadeImpl extends ClientManagerFacade implements Inte
|
||||
* LeaseSet.
|
||||
*
|
||||
* @param dest Destination from which the LeaseSet's authorization should be requested
|
||||
* @param ls LeaseSet with requested leases - this object must be updated to contain the
|
||||
* @param set LeaseSet with requested leases - this object must be updated to contain the
|
||||
* signed version (as well as any changed/added/removed Leases).
|
||||
* The LeaseSet contains Leases only; it is unsigned and does not have the destination set.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user