Add missing JavaDoc.

This commit is contained in:
Michael Jumper
2013-02-20 21:51:09 -08:00
parent a86f1a7c7f
commit 586c9b4f83
8 changed files with 81 additions and 5 deletions

View File

@@ -67,9 +67,22 @@ public class ReaderGuacamoleReader implements GuacamoleReader {
this.input = input; this.input = input;
} }
/**
* The location within the received data buffer that parsing should begin
* when more data is read.
*/
private int parseStart; private int parseStart;
/**
* The buffer holding all received, unparsed data.
*/
private char[] buffer = new char[20480]; private char[] buffer = new char[20480];
/**
* The number of characters currently used within the data buffer. All
* other characters within the buffer are free space available for
* future reads.
*/
private int usedLength = 0; private int usedLength = 0;
@Override @Override

View File

@@ -51,10 +51,27 @@ import net.sourceforge.guacamole.io.GuacamoleWriter;
*/ */
public class GuacamoleTunnel { public class GuacamoleTunnel {
/**
* The UUID associated with this tunnel. Every tunnel must have a
* corresponding UUID such that tunnel read/write requests can be
* directed to the proper tunnel.
*/
private UUID uuid; private UUID uuid;
/**
* The GuacamoleSocket that tunnel should use for communication on
* behalf of the connecting user.
*/
private GuacamoleSocket socket; private GuacamoleSocket socket;
/**
* Lock acquired when a read operation is in progress.
*/
private ReentrantLock readerLock; private ReentrantLock readerLock;
/**
* Lock acquired when a write operation is in progress.
*/
private ReentrantLock writerLock; private ReentrantLock writerLock;
/** /**

View File

@@ -63,12 +63,31 @@ import org.slf4j.LoggerFactory;
*/ */
public class InetGuacamoleSocket implements GuacamoleSocket { public class InetGuacamoleSocket implements GuacamoleSocket {
/**
* Logger for this class.
*/
private Logger logger = LoggerFactory.getLogger(InetGuacamoleSocket.class); private Logger logger = LoggerFactory.getLogger(InetGuacamoleSocket.class);
/**
* The GuacamoleReader this socket should read from.
*/
private GuacamoleReader reader; private GuacamoleReader reader;
/**
* The GuacamoleWriter this socket should write to.
*/
private GuacamoleWriter writer; private GuacamoleWriter writer;
/**
* The number of milliseconds to wait for data on the TCP socket before
* timing out.
*/
private static final int SOCKET_TIMEOUT = 15000; private static final int SOCKET_TIMEOUT = 15000;
/**
* The TCP socket that the GuacamoleReader and GuacamoleWriter exposed
* by this class should affect.
*/
private Socket sock; private Socket sock;
/** /**

View File

@@ -58,7 +58,15 @@ import net.sourceforge.guacamole.net.GuacamoleSocket;
*/ */
public class ConfiguredGuacamoleSocket implements GuacamoleSocket { public class ConfiguredGuacamoleSocket implements GuacamoleSocket {
/**
* The wrapped socket.
*/
private GuacamoleSocket socket; private GuacamoleSocket socket;
/**
* The configuration to use when performing the Guacamole protocol
* handshake.
*/
private GuacamoleConfiguration config; private GuacamoleConfiguration config;
/** /**

View File

@@ -51,9 +51,19 @@ import java.util.Set;
*/ */
public class GuacamoleConfiguration implements Serializable { public class GuacamoleConfiguration implements Serializable {
/**
* Identifier unique to this version of GuacamoleConfiguration.
*/
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* The name of the protocol associated with this configuration.
*/
private String protocol; private String protocol;
/**
* Map of all associated parameter values, indexed by parameter name.
*/
private Map<String, String> parameters = new HashMap<String, String>(); private Map<String, String> parameters = new HashMap<String, String>();
/** /**

View File

@@ -1,10 +1,6 @@
package net.sourceforge.guacamole.protocol; package net.sourceforge.guacamole.protocol;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/* ***** BEGIN LICENSE BLOCK ***** /* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
@@ -41,6 +37,10 @@ import java.util.List;
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/** /**
* An abstract representation of a Guacamole instruction, as defined by the * An abstract representation of a Guacamole instruction, as defined by the
* Guacamole protocol. * Guacamole protocol.
@@ -63,7 +63,7 @@ public class GuacamoleInstruction {
* Creates a new GuacamoleInstruction having the given Operation and * Creates a new GuacamoleInstruction having the given Operation and
* list of arguments values. * list of arguments values.
* *
* @param operation The opcode of the instruction to create. * @param opcode The opcode of the instruction to create.
* @param args The list of argument values to provide in the new * @param args The list of argument values to provide in the new
* instruction if any. * instruction if any.
*/ */

View File

@@ -57,6 +57,9 @@ import org.slf4j.LoggerFactory;
*/ */
public abstract class GuacamoleHTTPTunnelServlet extends HttpServlet { public abstract class GuacamoleHTTPTunnelServlet extends HttpServlet {
/**
* Logger for this class.
*/
private Logger logger = LoggerFactory.getLogger(GuacamoleHTTPTunnelServlet.class); private Logger logger = LoggerFactory.getLogger(GuacamoleHTTPTunnelServlet.class);
/** /**

View File

@@ -53,8 +53,14 @@ import org.slf4j.LoggerFactory;
*/ */
public class GuacamoleSession { public class GuacamoleSession {
/**
* Logger for this class.
*/
private Logger logger = LoggerFactory.getLogger(GuacamoleSession.class); private Logger logger = LoggerFactory.getLogger(GuacamoleSession.class);
/**
* Map of all currently attached tunnels, indexed by tunnel UUID.
*/
private ConcurrentMap<String, GuacamoleTunnel> tunnels; private ConcurrentMap<String, GuacamoleTunnel> tunnels;
/** /**