Lock down streaming classes not in the API. Holler if this breaks any external apps.

This commit is contained in:
zzz
2010-11-29 15:39:55 +00:00
parent b5f652ef04
commit 601abdce6d
21 changed files with 25 additions and 21 deletions

View File

@ -22,7 +22,7 @@ import net.i2p.util.SimpleTimer2;
* destinations.
*
*/
public class Connection {
class Connection {
private I2PAppContext _context;
private Log _log;
private ConnectionManager _connectionManager;
@ -1067,7 +1067,7 @@ public class Connection {
/**
* Coordinate the resends of a given packet
*/
public class ResendPacketEvent extends SimpleTimer2.TimedEvent {
class ResendPacketEvent extends SimpleTimer2.TimedEvent {
private PacketLocal _packet;
private long _nextSendTime;
public ResendPacketEvent(PacketLocal packet, long delay) {

View File

@ -17,7 +17,7 @@ import net.i2p.util.SimpleTimer;
*
* @author zzz modded to use concurrent and bound queue size
*/
public class ConnectionHandler {
class ConnectionHandler {
private I2PAppContext _context;
private Log _log;
private ConnectionManager _manager;

View File

@ -20,7 +20,7 @@ import net.i2p.util.SimpleTimer;
*
*
*/
public class ConnectionManager {
class ConnectionManager {
private I2PAppContext _context;
private Log _log;
private I2PSession _session;

View File

@ -15,7 +15,7 @@ import net.i2p.util.Log;
* Define the current options for the con (and allow custom tweaking midstream)
*
*/
public class ConnectionOptions extends I2PSocketOptionsImpl {
class ConnectionOptions extends I2PSocketOptionsImpl {
private int _connectDelay;
private boolean _fullySigned;
private boolean _answerPings;

View File

@ -14,7 +14,7 @@ import net.i2p.util.SimpleTimer;
* queue, marking packets as acked, updating various fields, etc.
*
*/
public class ConnectionPacketHandler {
class ConnectionPacketHandler {
private I2PAppContext _context;
private Log _log;

View File

@ -7,7 +7,7 @@ import net.i2p.I2PException;
* Bridge to allow accepting new connections
*
*/
public class I2PServerSocketFull implements I2PServerSocket {
class I2PServerSocketFull implements I2PServerSocket {
private I2PSocketManagerFull _socketManager;
public I2PServerSocketFull(I2PSocketManagerFull mgr) {

View File

@ -10,7 +10,7 @@ import net.i2p.data.Destination;
* Bridge between the full streaming lib and the I2PSocket API
*
*/
public class I2PSocketFull implements I2PSocket {
class I2PSocketFull implements I2PSocket {
private Connection _connection;
private I2PSocket.SocketErrorListener _listener;
private Destination _remotePeer;

View File

@ -23,7 +23,7 @@ import net.i2p.util.Log;
* or receive any messages with its .receiveMessage
*
*/
public class I2PSocketManagerFull implements I2PSocketManager {
class I2PSocketManagerFull implements I2PSocketManager {
private I2PAppContext _context;
private Log _log;
private I2PSession _session;

View File

@ -15,7 +15,7 @@ import net.i2p.util.ConcurrentHashSet;
* Packets, if we can.
*
*/
public class MessageHandler implements I2PSessionListener {
class MessageHandler implements I2PSessionListener {
private ConnectionManager _manager;
private I2PAppContext _context;
private Log _log;

View File

@ -19,7 +19,7 @@ import net.i2p.util.Log;
* yet present them in order.
*
*/
public class MessageInputStream extends InputStream {
class MessageInputStream extends InputStream {
private final I2PAppContext _context;
private final Log _log;
/**

View File

@ -15,7 +15,7 @@ import net.i2p.util.SimpleTimer2;
* on flush or when the buffer is full. It also blocks according
* to the data receiver's needs.
*/
public class MessageOutputStream extends OutputStream {
class MessageOutputStream extends OutputStream {
private final I2PAppContext _context;
private final Log _log;
private byte _buf[];

View File

@ -53,7 +53,7 @@ import net.i2p.util.Log;
* packet that should not be ACKed</p>
*
*/
public class Packet {
class Packet {
private long _sendStreamId;
private long _receiveStreamId;
private long _sequenceNum;

View File

@ -15,7 +15,7 @@ import net.i2p.util.Log;
* the server socket, or queue a reply RST packet.
*
*/
public class PacketHandler {
class PacketHandler {
private ConnectionManager _manager;
private I2PAppContext _context;
private Log _log;

View File

@ -12,7 +12,7 @@ import net.i2p.util.SimpleTimer2;
* coordinate local attributes about a packet - send time, ack time, number of
* retries, etc.
*/
public class PacketLocal extends Packet implements MessageOutputStream.WriteStatus {
class PacketLocal extends Packet implements MessageOutputStream.WriteStatus {
private I2PAppContext _context;
private Log _log;
private Connection _connection;

View File

@ -18,7 +18,7 @@ import net.i2p.util.Log;
* mode=bestEffort doesnt block in the SDK.
*
*/
public class PacketQueue {
class PacketQueue {
private I2PAppContext _context;
private Log _log;
private I2PSession _session;

View File

@ -3,7 +3,10 @@ package net.i2p.client.streaming;
import net.i2p.util.SimpleTimer2;
/**
*
* Not clear that we really need to create our own timer group, but we do,
* to prevent us clogging the router's timer group.
* Use from outside this package is deprecated.
* (BOB instantiates this for thread group reasons)
*/
public class RetransmissionTimer extends SimpleTimer2 {
private static final RetransmissionTimer _instance = new RetransmissionTimer();

View File

@ -10,7 +10,7 @@ import net.i2p.util.Log;
* Examine a connection's state and pick the right scheduler for it.
*
*/
public class SchedulerChooser {
class SchedulerChooser {
private I2PAppContext _context;
private Log _log;
private TaskScheduler _nullScheduler;

View File

@ -20,7 +20,7 @@ import net.i2p.util.SimpleTimer2;
* same router.
*
*/
public class TCBShare {
class TCBShare {
private I2PAppContext _context;
private Log _log;
private Map<Destination, Entry> _cache;