BOB finals

This commit is contained in:
zzz
2016-12-03 16:24:00 +00:00
parent 176ecaa9f1
commit 1d6fc40d59
5 changed files with 34 additions and 35 deletions

View File

@@ -48,17 +48,17 @@ public class DoCMDS implements Runnable {
// I need a better way to do versioning, but this will do for now. // I need a better way to do versioning, but this will do for now.
public static final String BMAJ = "00", BMIN = "00", BREV = "10", BEXT = ""; public static final String BMAJ = "00", BMIN = "00", BREV = "10", BEXT = "";
public static final String BOBversion = BMAJ + "." + BMIN + "." + BREV + BEXT; public static final String BOBversion = BMAJ + "." + BMIN + "." + BREV + BEXT;
private Socket server; private final Socket server;
private Properties props; private final Properties props;
private NamedDB database; private final NamedDB database;
private String line; private String line;
private Destination d; private Destination d;
private ByteArrayOutputStream prikey; private ByteArrayOutputStream prikey;
private boolean dk, ns, ip, op; private boolean dk, ns, ip, op;
private NamedDB nickinfo; private NamedDB nickinfo;
private Logger _log; private final Logger _log;
private AtomicBoolean LIVE; private final AtomicBoolean LIVE;
private AtomicBoolean lock; private final AtomicBoolean lock;
/* database strings */ /* database strings */
private static final String P_DEST = "DESTINATION"; private static final String P_DEST = "DESTINATION";
private static final String P_INHOST = "INHOST"; private static final String P_INHOST = "INHOST";

View File

@@ -32,9 +32,9 @@ import net.i2p.util.I2PAppThread;
public class I2PtoTCP implements Runnable { public class I2PtoTCP implements Runnable {
private I2PSocket I2P; private I2PSocket I2P;
private NamedDB info, database; private final NamedDB info, database;
private Socket sock; private Socket sock;
private AtomicBoolean lives; private final AtomicBoolean lives;
/** /**
* Constructor * Constructor

View File

@@ -38,18 +38,18 @@ import net.i2p.util.Log;
*/ */
public class MUXlisten implements Runnable { public class MUXlisten implements Runnable {
private NamedDB database, info; private final NamedDB database, info;
private Logger _log; private final Logger _log;
private I2PSocketManager socketManager; private final I2PSocketManager socketManager;
private ByteArrayInputStream prikey; private final ByteArrayInputStream prikey;
private ThreadGroup tg; private ThreadGroup tg;
private String N; private final String N;
private ServerSocket listener = null; private ServerSocket listener;
private int backlog = 50; // should this be more? less? private final int backlog = 50; // should this be more? less?
boolean go_out; private final boolean go_out;
boolean come_in; private final boolean come_in;
private AtomicBoolean lock; private final AtomicBoolean lock;
private AtomicBoolean lives; private final AtomicBoolean lives;
/** /**
* Constructor Will fail if INPORT is occupied. * Constructor Will fail if INPORT is occupied.
@@ -61,7 +61,6 @@ public class MUXlisten implements Runnable {
* @throws java.io.IOException * @throws java.io.IOException
*/ */
MUXlisten(AtomicBoolean lock, NamedDB database, NamedDB info, Logger _log) throws I2PException, IOException, RuntimeException { MUXlisten(AtomicBoolean lock, NamedDB database, NamedDB info, Logger _log) throws I2PException, IOException, RuntimeException {
try {
int port = 0; int port = 0;
InetAddress host = null; InetAddress host = null;
this.lock = lock; this.lock = lock;
@@ -70,7 +69,7 @@ public class MUXlisten implements Runnable {
this.info = info; this.info = info;
this._log = _log; this._log = _log;
lives = new AtomicBoolean(false); lives = new AtomicBoolean(false);
try {
this.database.getWriteLock(); this.database.getWriteLock();
this.info.getWriteLock(); this.info.getWriteLock();
this.info.add("STARTING", Boolean.valueOf(true)); this.info.add("STARTING", Boolean.valueOf(true));

View File

@@ -27,9 +27,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
*/ */
public class TCPio implements Runnable { public class TCPio implements Runnable {
private InputStream Ain; private final InputStream Ain;
private OutputStream Aout; private final OutputStream Aout;
private AtomicBoolean lives; private final AtomicBoolean lives;
/** /**
* Constructor * Constructor

View File

@@ -42,10 +42,10 @@ import net.i2p.util.I2PAppThread;
public class TCPtoI2P implements Runnable { public class TCPtoI2P implements Runnable {
private I2PSocket I2P; private I2PSocket I2P;
private NamedDB info, database; private final NamedDB info, database;
private Socket sock; private final Socket sock;
private I2PSocketManager socketManager; private final I2PSocketManager socketManager;
private AtomicBoolean lives; private final AtomicBoolean lives;
/** /**
* Constructor * Constructor