* Streaming: Move streaming to new package (ticket #1135)

This commit is contained in:
dg2-new
2014-01-04 14:09:33 +00:00
parent 1feb317f8b
commit 2a09d5baa6
40 changed files with 70 additions and 44 deletions

View File

@ -1,6 +1,10 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PException;
import net.i2p.client.streaming.AcceptingChannel;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PServerSocket;
import net.i2p.client.streaming.I2PSocketManager;
import java.net.SocketTimeoutException;
import java.net.ConnectException;
@ -29,7 +33,7 @@ class AcceptingChannelImpl extends AcceptingChannel {
private volatile I2PSocket next;
private final I2PServerSocket socket;
I2PSocket accept() throws I2PException, ConnectException {
public I2PSocket accept() throws I2PException, ConnectException {
I2PSocket sock;
try {
sock = socket.accept();
@ -43,7 +47,7 @@ class AcceptingChannelImpl extends AcceptingChannel {
}
}
AcceptingChannelImpl(I2PSocketManager manager) {
protected AcceptingChannelImpl(I2PSocketManager manager) {
super(manager);
// this cheats and just sets the manager timeout low in order to repeatedly poll it.
// that means we can "only" accept one new connection every 100 milliseconds.

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.util.concurrent.atomic.AtomicInteger;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.io.IOException;
import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;
import net.i2p.data.ByteArray;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.util.HashSet;
import java.util.Iterator;

View File

@ -1,4 +1,7 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.client.streaming.I2PSocketOptionsImpl;
import net.i2p.client.streaming.I2PSocketOptions;
import java.util.Collections;
import java.util.HashSet;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.util.List;

View File

@ -1,7 +1,11 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.net.SocketTimeoutException;
import net.i2p.I2PException;
import net.i2p.client.streaming.I2PServerSocket;
import net.i2p.client.streaming.AcceptingChannel;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PSocketManager;
/**
* Bridge to allow accepting new connections

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.io.IOException;
import java.io.InputStream;
@ -10,6 +10,8 @@ import net.i2p.I2PAppContext;
import net.i2p.client.I2PSession;
import net.i2p.data.Destination;
import net.i2p.util.Log;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PSocketOptions;
/**
* Bridge between the full streaming lib and the I2PSocket API

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.io.IOException;
import java.net.NoRouteToHostException;
@ -17,7 +17,10 @@ import net.i2p.client.I2PSession;
import net.i2p.client.I2PSessionException;
import net.i2p.data.Destination;
import net.i2p.util.Log;
import net.i2p.client.streaming.I2PSocketManager;
import net.i2p.client.streaming.I2PSocketOptions;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PServerSocket;
/**
* Centralize the coordination and multiplexing of the local client's streaming.

View File

@ -1,4 +1,6 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.client.streaming.I2PSocket;
import java.io.IOException;
import java.io.InterruptedIOException;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
@ -9,6 +9,7 @@ import net.i2p.client.I2PSessionException;
import net.i2p.client.I2PSessionMuxedListener;
import net.i2p.client.streaming.I2PSocketManager.DisconnectListener;
import net.i2p.util.Log;
import net.i2p.client.streaming.I2PSocketManager;
/**
* Receive raw information from the I2PSession and turn it into

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.io.IOException;
import java.io.InterruptedIOException;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.io.ByteArrayInputStream;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.text.SimpleDateFormat;
import java.util.Date;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.io.IOException;
import java.util.Collections;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;
import net.i2p.client.I2PSession;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.io.BufferedOutputStream;
import java.io.File;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;
import net.i2p.util.SimpleTimer2;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;
import net.i2p.util.Log;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;
import net.i2p.util.Log;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;
import net.i2p.util.Log;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;
import net.i2p.util.Log;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PAppContext;
import net.i2p.util.Log;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.io.IOException;
import java.net.InetAddress;
@ -9,6 +9,7 @@ import java.net.SocketException;
import java.nio.channels.ServerSocketChannel;
import net.i2p.I2PException;
import net.i2p.client.streaming.I2PSocket;
/**
* Bridge to I2PServerSocket.

View File

@ -1,4 +1,7 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PSocketOptions;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import java.util.Iterator;
import java.util.Map;

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
/**
* Coordinates what we do 'next'. The scheduler used by a connection is

View File

@ -1,4 +1,4 @@
package net.i2p.client.streaming;
package net.i2p.client.streaming.impl;
import net.i2p.I2PException;