Index: trunk/autoquest-httpmonitor/src/main/java/de/ugoe/cs/autoquest/httpmonitor/proxy/HttpMonitoringProxyServlet.java
===================================================================
--- trunk/autoquest-httpmonitor/src/main/java/de/ugoe/cs/autoquest/httpmonitor/proxy/HttpMonitoringProxyServlet.java	(revision 1374)
+++ trunk/autoquest-httpmonitor/src/main/java/de/ugoe/cs/autoquest/httpmonitor/proxy/HttpMonitoringProxyServlet.java	(revision 1382)
@@ -34,10 +34,10 @@
 /**
  * <p>
- * TODO document
- * the servlet deployed in the web server that receives all client messages and returns the client
- * java script. The messages are parsed, validated, and forwarded to the provided message listener.
- * If a message is not valid, it is discarded. If an event in a message is not valid, it is
- * discarded. Messages are only received via the POST HTTP method. The GET HTTP method is only
- * implemented for returning the client java script.
+ * the servlet deployed in the web server of the proxy that proxies all incoming messages and
+ * forwards a copy of recorded exchanges to the exchange listener manager. It is based on the
+ * proxy servlet provided by jetty. It extends the servlet and implements all hooks required to 
+ * get access to the exchanged requests and responses. Each hook forwards the tracked data to the
+ * exchange listener. On exchange completion, the exchange listener ensures a logging of the
+ * recorded exchange.
  * </p>
  * 
@@ -49,19 +49,28 @@
     private static final long serialVersionUID = 1L;
 
-    /** */
+    /**
+     * the proxied server
+     */
     private String proxiedServer;
     
-    /** */
+    /**
+     * the port of the proxied server
+     */
     private int proxiedPort;
 
-    /** */
+    /**
+     * the exchange listener to handle the different events happening when an exchange is proxied
+     */
     private ExchangeListenerManager exchangeListenerManager;
     
     /**
      * <p>
-     * initializes the servlet with the message listener to which all events shall be forwarded
+     * initializes the servlet with the proxied server and the exchange listener
      * </p>
      *
-     * @param messageListener the message listener that shall receive all client events
+     * @param proxiedServer           the proxied server
+     * @param proxiedPort             the port of the proxied server
+     * @param exchangeListenerManager the exchange listener to handle the different events
+     *                                happening when an exchange is proxied
      */
     HttpMonitoringProxyServlet(String                  proxiedServer,
@@ -75,5 +84,5 @@
 
     /* (non-Javadoc)
-     * @see org.eclipse.jetty.proxy.ProxyServlet#rewriteURI(javax.servlet.http.HttpServletRequest)
+     * @see org.eclipse.jetty.proxy.ProxyServlet#rewriteURI(HttpServletRequest)
      */
     @Override
@@ -91,5 +100,5 @@
 
     /* (non-Javadoc)
-     * @see org.eclipse.jetty.proxy.ProxyServlet#customizeProxyRequest(org.eclipse.jetty.client.api.Request, javax.servlet.http.HttpServletRequest)
+     * @see org.eclipse.jetty.proxy.ProxyServlet#customizeProxyRequest(Request, HttpServletRequest)
      */
     @Override
@@ -102,5 +111,5 @@
 
     /* (non-Javadoc)
-     * @see org.eclipse.jetty.proxy.ProxyServlet#onResponseContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.eclipse.jetty.client.api.Response, byte[], int, int)
+     * @see ProxyServlet#onResponseContent(HttpServletRequest, HttpServletResponse, Response, byte[], int, int)
      */
     @Override
@@ -119,5 +128,5 @@
 
     /* (non-Javadoc)
-     * @see org.eclipse.jetty.proxy.ProxyServlet#onResponseSuccess(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.eclipse.jetty.client.api.Response)
+     * @see ProxyServlet#onResponseSuccess(HttpServletRequest, HttpServletResponse, Response)
      */
     @Override
@@ -133,5 +142,5 @@
 
     /* (non-Javadoc)
-     * @see org.eclipse.jetty.proxy.ProxyServlet#onResponseFailure(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.eclipse.jetty.client.api.Response, java.lang.Throwable)
+     * @see ProxyServlet#onResponseFailure(HttpServletRequest, HttpServletResponse, Response, Throwable)
      */
     @Override
@@ -148,16 +157,22 @@
 
     /**
-     *
+     * This content provided is required to copy the content of a proxied request. It uses
+     * delegation to wrap the original content provided but to also copy the data and forward
+     * it to the exchange listener manager.
      */
     private class DubbingContentProvider implements ContentProvider {
 
-        /** */
+        /**
+         * the dubbed request
+         */
         private HttpServletRequest request;
         
-        /** */
+        /**
+         * the original content provider of which the data is copied 
+         */
         private ContentProvider delegate;
 
         /**
-         *
+         * initializes this content provider with the copied request and the delegate.
          */
         public DubbingContentProvider(HttpServletRequest request, ContentProvider delegate) {
@@ -185,16 +200,22 @@
 
     /**
-     *
+     * This iterator is used to implement the {@link DubbingContentProvider}. It works in the 
+     * same manner and uses delegation for wrapping the original iterator and forwards all copied
+     * data to the exchange listener manager.
      */
     public class DubbingByteBufferIterator implements Iterator<ByteBuffer> {
 
-        /** */
+        /**
+         * the dubbed request
+         */
         private HttpServletRequest request;
         
-        /** */
+        /**
+         * the original iterator of which the data is copied 
+         */
         private Iterator<ByteBuffer> delegate;
         
         /**
-         *
+         * initializes this iterator with the copied request and the delegate.
          */
         public DubbingByteBufferIterator(HttpServletRequest request, Iterator<ByteBuffer> delegate) {
