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:
zzz
2015-06-18 21:20:00 +00:00
parent 20c796e87a
commit addb142ecd
32 changed files with 91 additions and 35 deletions

View File

@ -9,6 +9,8 @@ package net.i2p.client;
*
*/
import net.i2p.client.impl.I2PClientImpl;
/**
* Provide a means of hooking into an appropriate I2PClient implementation
*
@ -21,4 +23,4 @@ public class I2PClientFactory {
public static I2PClient createClient() {
return new I2PClientImpl();
}
}
}

View File

@ -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);

View File

@ -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;

View File

@ -1,4 +1,4 @@
package net.i2p.client;
package net.i2p.client.impl;
/*
* Released into the public domain

View File

@ -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;

View File

@ -1,4 +1,4 @@
package net.i2p.client;
package net.i2p.client.impl;
/*
* Released into the public domain

View File

@ -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;

View File

@ -1,4 +1,4 @@
package net.i2p.client;
package net.i2p.client.impl;
/*
* free (adj.): unencumbered; not under the control of others

View File

@ -1,4 +1,4 @@
package net.i2p.client;
package net.i2p.client.impl;
/*
* Released into the public domain

View File

@ -1,4 +1,4 @@
package net.i2p.client;
package net.i2p.client.impl;
/*
* free (adj.): unencumbered; not under the control of others

View File

@ -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;

View File

@ -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.

View File

@ -1,4 +1,4 @@
package net.i2p.client;
package net.i2p.client.impl;
/*
* free (adj.): unencumbered; not under the control of others

View File

@ -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;
/*

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
package net.i2p.client;
package net.i2p.client.impl;
/*
* free (adj.): unencumbered; not under the control of others

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
package net.i2p.client;
package net.i2p.client.impl;
/*
* free (adj.): unencumbered; not under the control of others

View File

@ -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;

View 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>

View File

@ -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