You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-dev@james.apache.org by rd...@apache.org on 2008/12/02 21:06:07 UTC

svn commit: r722598 [22/36] - in /james/site/trunk/www/mpt: ./ antlib/ antlib/css/ antlib/emma/ antlib/emma/_files/ antlib/images/ antlib/xref-test/ antlib/xref-test/org/ antlib/xref-test/org/apache/ antlib/xref-test/org/apache/james/ antlib/xref-test/...

Added: james/site/trunk/www/mpt/main/taglist.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/taglist.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/taglist.html (added)
+++ james/site/trunk/www/mpt/main/taglist.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,270 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+<html>
+  <head>
+    <title>JAMES Mail Protocol Tester (MPT) - Tag List report</title>
+    <style type="text/css" media="all">
+      @import url("./css/maven-base.css");
+      @import url("./css/maven-theme.css");
+      @import url("./css/site.css");
+    </style>
+    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+      </head>
+  <body class="composite">
+    <div id="banner">
+                  <a href="http://james.apache.org/mpt/index.html" id="bannerLeft">
+    
+                                            <img src="images/james-mpt-logo.gif" alt="" />
+    
+            </a>
+                        <a href="http://www.apache.org/index.html" id="bannerRight">
+    
+                                            <img src="images/asf-logo-reduced.gif" alt="" />
+    
+            </a>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+            <div class="xleft">
+        Last Published: 12/02/2008
+                      </div>
+            <div class="xright">      <a href="../../index.html">JAMES Project</a>
+          |
+          <a href="../../server/index.html">Server</a>
+          |
+          <a href="../../mailet/index.html">Mailets</a>
+          |
+          <a href="../../jspf/index.html">jSPF</a>
+          |
+          <a href="../../mime4j/index.html">Mime4J</a>
+          |
+          <a href="../../jsieve/index.html">JSieve</a>
+          |
+          <a href="../../postage/index.html">Postage</a>
+          
+  
+
+  
+    
+  
+  
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+           
+  
+
+  
+    
+  
+  
+                   <h5>Mail Protocol Tester</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="index.html">Overview</a>
+        </li>
+              
+    <li class="none">
+              <a href="doap_apache-james-mtp.rdf">DOAP</a>
+        </li>
+          </ul>
+          <h5>Project Documentation</h5>
+        <ul>
+              
+                
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class="collapsed">
+              <a href="project-info.html">Project Information</a>
+              </li>
+              
+                
+              
+      
+            
+      
+            
+      
+            
+      
+            
+            
+              
+            <li class="expanded">
+              <a href="project-reports.html">Project Reports</a>
+                <ul>
+                  
+    <li class="none">
+              <a href="emma/index.html">EMMA Test Coverage</a>
+        </li>
+                  
+    <li class="none">
+              <a href="rat-report.html">RAT Report</a>
+        </li>
+                  
+    <li class="none">
+              <a href="jxr.html">Source Xref</a>
+        </li>
+                  
+    <li class="none">
+              <a href="surefire-report.html">Surefire Report</a>
+        </li>
+                  
+    <li class="none">
+              <strong>Tag List</strong>
+        </li>
+              </ul>
+        </li>
+          </ul>
+          <h5>Mail Protocol Tester</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="../index.html">Overview</a>
+        </li>
+              
+    <li class="none">
+              <a href="../main">Main Library</a>
+        </li>
+              
+    <li class="none">
+              <a href="../antlib">AntLib</a>
+        </li>
+          </ul>
+          <h5>Useful Information</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://jakarta.apache.org/site/library.html">Reference Library</a>
+        </li>
+          </ul>
+          <h5>The Apache Software Foundation</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="http://apache.org/foundation/faq.html">FAQ</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://apache.org/foundation/sponsorship.html">Sponsorship</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://apache.org/foundation/contributing.html">Donations</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://apache.org/foundation/thanks.html">Thanks</a>
+        </li>
+          </ul>
+          <h5>Downloads</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="../../download.cgi">Stable releases</a>
+        </li>
+              
+    <li class="none">
+              <a href="../../downloadunstable.cgi">Unstable releases</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://people.apache.org/builds/james/nightly/">Nightly builds</a>
+        </li>
+          </ul>
+                                       <a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy">
+            <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img>
+          </a>
+                       
+  
+
+  
+    
+  
+  
+        </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <div class="section"><h2>Tag List Report</h2><p>The following document contains the listing of user tags found in the code. Below is the summary of the occurrences per tag.</p><table class="bodyTable"><tr class="a"><th>Tag</th><th>Total number of occurrences</th></tr><tr class="b"><td>@todo</td><td>0</td></tr><tr class="a"><td><a href="#TODO">TODO</a></td><td>1</td></tr></table><p>Each tag is detailed below:</p><div class="section"><h3><a name="TODO">TODO</a></h3><p><b>Number of occurrences found in the code: 1</b></p><table class="bodyTable"><tr class="b"><th>org.apache.james.mpt.ProtocolSession</th><th>Line</th></tr><tr class="a"><td>--No comment--</td><td><a href="./xref/org/apache/james/mpt/ProtocolSession.html#579">579</a></td></tr></table></div></div>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">&#169;  
+          2008
+    
+          The Apache Software Foundation
+          
+  
+
+  
+    
+  
+  
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+    </script>
+    <script type="text/javascript">
+      _uacct = "UA-1384591-1";
+      urchinTracker();
+    </script>
+  </body>
+</html>

Added: james/site/trunk/www/mpt/main/team-list.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/team-list.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/team-list.html (added)
+++ james/site/trunk/www/mpt/main/team-list.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,316 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+<html>
+  <head>
+    <title>JAMES Mail Protocol Tester (MPT) - Team list</title>
+    <style type="text/css" media="all">
+      @import url("./css/maven-base.css");
+      @import url("./css/maven-theme.css");
+      @import url("./css/site.css");
+    </style>
+    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+      </head>
+  <body class="composite">
+    <div id="banner">
+                  <a href="http://james.apache.org/mpt/index.html" id="bannerLeft">
+    
+                                            <img src="images/james-mpt-logo.gif" alt="" />
+    
+            </a>
+                        <a href="http://www.apache.org/index.html" id="bannerRight">
+    
+                                            <img src="images/asf-logo-reduced.gif" alt="" />
+    
+            </a>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+            <div class="xleft">
+        Last Published: 12/02/2008
+                      </div>
+            <div class="xright">      <a href="../../index.html">JAMES Project</a>
+          |
+          <a href="../../server/index.html">Server</a>
+          |
+          <a href="../../mailet/index.html">Mailets</a>
+          |
+          <a href="../../jspf/index.html">jSPF</a>
+          |
+          <a href="../../mime4j/index.html">Mime4J</a>
+          |
+          <a href="../../jsieve/index.html">JSieve</a>
+          |
+          <a href="../../postage/index.html">Postage</a>
+          
+  
+
+  
+    
+  
+  
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+           
+  
+
+  
+    
+  
+  
+                   <h5>Mail Protocol Tester</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="index.html">Overview</a>
+        </li>
+              
+    <li class="none">
+              <a href="doap_apache-james-mtp.rdf">DOAP</a>
+        </li>
+          </ul>
+          <h5>Project Documentation</h5>
+        <ul>
+              
+                
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+            
+            
+      
+              
+            <li class="expanded">
+              <a href="project-info.html">Project Information</a>
+                <ul>
+                  
+    <li class="none">
+              <a href="integration.html">Continuous Integration</a>
+        </li>
+                  
+    <li class="none">
+              <a href="dependencies.html">Dependencies</a>
+        </li>
+                  
+    <li class="none">
+              <a href="dependency-convergence.html">Dependency Convergence</a>
+        </li>
+                  
+    <li class="none">
+              <a href="dependency-management.html">Dependency Management</a>
+        </li>
+                  
+    <li class="none">
+              <a href="issue-tracking.html">Issue Tracking</a>
+        </li>
+                  
+    <li class="none">
+              <a href="mail-lists.html">Mailing Lists</a>
+        </li>
+                  
+    <li class="none">
+              <a href="plugin-management.html">Plugin Management</a>
+        </li>
+                  
+    <li class="none">
+              <a href="license.html">Project License</a>
+        </li>
+                  
+    <li class="none">
+              <a href="plugins.html">Project Plugins</a>
+        </li>
+                  
+    <li class="none">
+              <a href="project-summary.html">Project Summary</a>
+        </li>
+                  
+    <li class="none">
+              <strong>Project Team</strong>
+        </li>
+                  
+    <li class="none">
+              <a href="source-repository.html">Source Repository</a>
+        </li>
+              </ul>
+        </li>
+              
+                
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class="collapsed">
+              <a href="project-reports.html">Project Reports</a>
+              </li>
+          </ul>
+          <h5>Mail Protocol Tester</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="../index.html">Overview</a>
+        </li>
+              
+    <li class="none">
+              <a href="../main">Main Library</a>
+        </li>
+              
+    <li class="none">
+              <a href="../antlib">AntLib</a>
+        </li>
+          </ul>
+          <h5>Useful Information</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://jakarta.apache.org/site/library.html">Reference Library</a>
+        </li>
+          </ul>
+          <h5>The Apache Software Foundation</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="http://apache.org/foundation/faq.html">FAQ</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://apache.org/foundation/sponsorship.html">Sponsorship</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://apache.org/foundation/contributing.html">Donations</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://apache.org/foundation/thanks.html">Thanks</a>
+        </li>
+          </ul>
+          <h5>Downloads</h5>
+        <ul>
+              
+    <li class="none">
+              <a href="../../download.cgi">Stable releases</a>
+        </li>
+              
+    <li class="none">
+              <a href="../../downloadunstable.cgi">Unstable releases</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://people.apache.org/builds/james/nightly/">Nightly builds</a>
+        </li>
+          </ul>
+                                       <a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy">
+            <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img>
+          </a>
+                       
+  
+
+  
+    
+  
+  
+        </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <div class="section"><h2>The Team</h2><p>A successful project requires many people to play many roles. Some members write code or documentation, while others are valuable as testers, submitting patches and suggestions.</p><p>The team is comprised of Members and Contributors. Members have direct access to the source of a project and actively evolve the code-base. Contributors improve the project through submission of patches and suggestions to the Members. The number of Contributors to the project is unbounded. Get involved today. All contributions to the project are greatly appreciated.</p><div class="section"><h3>Members</h3><p>The following is a list of developers with commit privileges that have directly contributed to the project in one way or another.</p><table class="bodyTable"><tr class="a"><th>Id</th><th>Name</th><th>Email</th><th>Organization</th><th>Roles</th><th>Time Zone</th><th>Actual Time (GMT)</th><th>Properties</th></tr><tr class="b"><td><a name="bago
 "></a>bago</td><td>Stefano Bagnara</td><td>bago at apache.org</td><td>-</td><td>Developer</td><td>2</td><td><span id="developer-0">2</span></td><td>-</td></tr><tr class="a"><td><a name="norman"></a>norman</td><td>Norman Maurer</td><td>norman at apache.org</td><td>-</td><td>Developer</td><td>2</td><td><span id="developer-1">2</span></td><td>-</td></tr><tr class="b"><td><a name="serge"></a>serge</td><td>Serge Knystautas</td><td>sergek at lokitech.com</td><td>-</td><td>Developer</td><td>-</td><td><span id="developer-2">-</span></td><td>-</td></tr><tr class="a"><td><a name="benrdf"></a>benrdf</td><td>Bernd Fondermann</td><td>bf_jak at brainlounge.de</td><td>-</td><td>Developer</td><td>-</td><td><span id="developer-3">-</span></td><td>-</td></tr><tr class="b"><td><a name="sbrewin"></a>sbrewin</td><td>Steve Brewin</td><td>sbrewin at synsys.com</td><td>-</td><td>Developer</td><td>-</td><td><span id="developer-4">-</span></td><td>-</td></tr><tr class="a"><td><a name="hilmer"></a>hil
 mer</td><td>Soren Hilmer</td><td>sh at widetrail.dk</td><td>-</td><td>Developer</td><td>-</td><td><span id="developer-5">-</span></td><td>-</td></tr><tr class="b"><td><a name="noel"></a>noel</td><td>Noel J. Bergman</td><td>noel at devtech.com</td><td>-</td><td>Developer</td><td>-</td><td><span id="developer-6">-</span></td><td>-</td></tr><tr class="a"><td><a name="danny"></a>danny</td><td>Danny Angus</td><td>danny at apache.org</td><td>-</td><td>Developer</td><td>-</td><td><span id="developer-7">-</span></td><td>-</td></tr><tr class="b"><td><a name="adc"></a>adc</td><td>Alan D. Cabrera</td><td>list at toolazydogs.com</td><td>-</td><td>Developer</td><td>-8</td><td><span id="developer-8">-8</span></td><td>-</td></tr><tr class="a"><td><a name="vincenzo"></a>vincenzo</td><td>Vincenzo Gianferrari Pini</td><td>vincenzo.gianferraripini at praxis.it</td><td>-</td><td>Developer</td><td>-</td><td><span id="developer-9">-</span></td><td>-</td></tr><tr class="b"><td><a name="rdonkin"></
 a>rdonkin</td><td>Robert Burrell Donkin</td><td>rdonkin at apache.org</td><td>-</td><td>Developer</td><td>-</td><td><span id="developer-10">-</span></td><td>-</td></tr><tr class="a"><td><a name="niklas"></a>niklas</td><td>Niklas Therning</td><td>niklas(at)apache(dot)org</td><td>Trillian AB</td><td>-</td><td>-</td><td><span id="developer-11">-</span></td><td>-</td></tr><tr class="b"><td><a name="jcheng"></a>jcheng</td><td>Joe Cheng</td><td>joe(at)joecheng(dot)com</td><td>-</td><td>-</td><td>-</td><td><span id="developer-12">-</span></td><td>description=Former author to the mime4j product</td></tr></table></div><div class="section"><h3>Contributors</h3><p>The following additional people have contributed to this project through the way of suggestions, patches or documentation.</p><table class="bodyTable"><tr class="a"><th>Name</th><th>Properties</th></tr><tr class="b"><td>Rob Oxspring</td><td>description=Contributed to the mime4j product</td></tr><tr class="a"><td>Roger Fullert
 on</td><td>description=Wrote spfjava, the first spf implementation in java</td></tr></table></div></div><script type="text/javascript">
+function offsetDate(id, offset) {
+    var now = new Date();
+    var nowTime = now.getTime();
+    var localOffset = now.getTimezoneOffset();
+    var developerTime = nowTime + ( offset * 60 * 60 * 1000 )+ ( localOffset * 60 * 1000 );
+    var developerDate = new Date(developerTime);
+
+    document.getElementById(id).innerHTML = developerDate;
+}
+
+function init(){
+    offsetDate('developer-0', '2');
+    offsetDate('developer-1', '2');
+    offsetDate('developer-8', '-8');
+}
+
+window.onLoad = init();
+</script>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">&#169;  
+          2008
+    
+          The Apache Software Foundation
+          
+  
+
+  
+    
+  
+  
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+    </script>
+    <script type="text/javascript">
+      _uacct = "UA-1384591-1";
+      urchinTracker();
+    </script>
+  </body>
+</html>

Added: james/site/trunk/www/mpt/main/xref-test/allclasses-frame.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/xref-test/allclasses-frame.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/xref-test/allclasses-frame.html (added)
+++ james/site/trunk/www/mpt/main/xref-test/allclasses-frame.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,32 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+		<title>All Classes</title>
+		<link rel="stylesheet" type="text/css" href="stylesheet.css" title="style" />
+    </head>
+    <body>
+
+		<h3>All Classes</h3>
+
+		<ul>
+						<li>
+				<a href="org/apache/james/mpt/DiscardProtocol.html" target="classFrame">DiscardProtocol</a>
+			</li>
+						<li>
+				<a href="org/apache/james/mpt/TestDiscardProtocol.html" target="classFrame">TestDiscardProtocol</a>
+			</li>
+						<li>
+				<a href="org/apache/james/mpt/TestExternalHostSystem.html" target="classFrame">TestExternalHostSystem</a>
+			</li>
+						<li>
+				<a href="org/apache/james/mpt/TestFileProtocolSessionBuilder.html" target="classFrame">TestFileProtocolSessionBuilder</a>
+			</li>
+						<li>
+				<a href="org/apache/james/mpt/TestScriptedUserAdder.html" target="classFrame">TestScriptedUserAdder</a>
+			</li>
+			      </ul>
+
+    </body>
+  </html>

Added: james/site/trunk/www/mpt/main/xref-test/index.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/xref-test/index.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/xref-test/index.html (added)
+++ james/site/trunk/www/mpt/main/xref-test/index.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,22 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+		<title>Apache JAMES MPT Main 0.1-SNAPSHOT Reference</title>
+	</head>
+    <frameset cols="20%,80%">
+		<frameset rows="30%,70%">
+			<frame src="overview-frame.html" name="packageListFrame" />
+			<frame src="allclasses-frame.html" name="packageFrame" />
+		</frameset>
+		<frame src="overview-summary.html" name="classFrame" />
+    </frameset>
+    <noframes>
+		<h1>Frame Alert</h1>
+		<p>
+			You don't have frames. Go <a href="overview-summary.html">here</a>
+		</p>
+	</noframes>
+</html>
+

Added: james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/DiscardProtocol.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/DiscardProtocol.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/DiscardProtocol.html (added)
+++ james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/DiscardProtocol.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,320 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>DiscardProtocol xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../../../../../apidocs/org/apache/james/mpt/DiscardProtocol.html">View Javadoc</a></div><pre>
+
+<a name="1" href="#1">1</a>   <em>/**<em>***************************************************************</em></em>
+<a name="2" href="#2">2</a>   <em> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a name="3" href="#3">3</a>   <em> * or more contributor license agreements.  See the NOTICE file *</em>
+<a name="4" href="#4">4</a>   <em> * distributed with this work for additional information        *</em>
+<a name="5" href="#5">5</a>   <em> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a name="6" href="#6">6</a>   <em> * to you under the Apache License, Version 2.0 (the            *</em>
+<a name="7" href="#7">7</a>   <em> * "License"); you may not use this file except in compliance   *</em>
+<a name="8" href="#8">8</a>   <em> * with the License.  You may obtain a copy of the License at   *</em>
+<a name="9" href="#9">9</a>   <em> *                                                              *</em>
+<a name="10" href="#10">10</a>  <em> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a name="11" href="#11">11</a>  <em> *                                                              *</em>
+<a name="12" href="#12">12</a>  <em> * Unless required by applicable law or agreed to in writing,   *</em>
+<a name="13" href="#13">13</a>  <em> * software distributed under the License is distributed on an  *</em>
+<a name="14" href="#14">14</a>  <em> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a name="15" href="#15">15</a>  <em> * KIND, either express or implied.  See the License for the    *</em>
+<a name="16" href="#16">16</a>  <em> * specific language governing permissions and limitations      *</em>
+<a name="17" href="#17">17</a>  <em> * under the License.                                           *</em>
+<a name="18" href="#18">18</a>  <em> ****************************************************************/</em>
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong>package</strong> org.apache.james.mpt;
+<a name="21" href="#21">21</a>  
+<a name="22" href="#22">22</a>  <strong>import</strong> java.io.IOException;
+<a name="23" href="#23">23</a>  <strong>import</strong> java.net.InetSocketAddress;
+<a name="24" href="#24">24</a>  <strong>import</strong> java.nio.ByteBuffer;
+<a name="25" href="#25">25</a>  <strong>import</strong> java.nio.CharBuffer;
+<a name="26" href="#26">26</a>  <strong>import</strong> java.nio.channels.ServerSocketChannel;
+<a name="27" href="#27">27</a>  <strong>import</strong> java.nio.channels.SocketChannel;
+<a name="28" href="#28">28</a>  <strong>import</strong> java.nio.charset.Charset;
+<a name="29" href="#29">29</a>  <strong>import</strong> java.util.Collection;
+<a name="30" href="#30">30</a>  <strong>import</strong> java.util.Iterator;
+<a name="31" href="#31">31</a>  <strong>import</strong> java.util.LinkedList;
+<a name="32" href="#32">32</a>  <strong>import</strong> java.util.Queue;
+<a name="33" href="#33">33</a>  
+<a name="34" href="#34">34</a>  <strong>import</strong> org.apache.commons.logging.Log;
+<a name="35" href="#35">35</a>  <strong>import</strong> org.apache.commons.logging.LogFactory;
+<a name="36" href="#36">36</a>  
+<a name="37" href="#37">37</a>  <em>/**<em>*</em></em>
+<a name="38" href="#38">38</a>  <em> * Simple &lt;a href='<a href="http://tools.ietf.org/html/rfc863'" target="alexandria_uri">http://tools.ietf.org/html/rfc863'</a>>RFC 863&lt;/a> implementation.</em>
+<a name="39" href="#39">39</a>  <em> */</em>
+<a name="40" href="#40">40</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../org/apache/james/mpt/DiscardProtocol.html">DiscardProtocol</a> {
+<a name="41" href="#41">41</a>  
+<a name="42" href="#42">42</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> Charset ASCII = Charset.forName(<span class="string">"US-ASCII"</span>);
+<a name="43" href="#43">43</a>      
+<a name="44" href="#44">44</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> <strong>int</strong> SOCKET_CONNECTION_WAIT_MILLIS = 30;
+<a name="45" href="#45">45</a>      
+<a name="46" href="#46">46</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> <strong>int</strong> IDLE_TIMEOUT = 120000;
+<a name="47" href="#47">47</a>  
+<a name="48" href="#48">48</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> Log LOG = LogFactory.getLog(DiscardProtocol.<strong>class</strong>);
+<a name="49" href="#49">49</a>      
+<a name="50" href="#50">50</a>      <em>/**<em>* Serve on this port */</em></em>
+<a name="51" href="#51">51</a>      <strong>private</strong> <strong>final</strong> <strong>int</strong> port;
+<a name="52" href="#52">52</a>      
+<a name="53" href="#53">53</a>      <em>/**<em>* </em></em>
+<a name="54" href="#54">54</a>  <em>     * Queues requests for recordings.</em>
+<a name="55" href="#55">55</a>  <em>     * Also, used as lock.</em>
+<a name="56" href="#56">56</a>  <em>     */</em>
+<a name="57" href="#57">57</a>      <strong>private</strong> <strong>final</strong> Queue&lt;Server> queue;
+<a name="58" href="#58">58</a>      
+<a name="59" href="#59">59</a>      <strong>private</strong> <strong>final</strong> Collection&lt;Server> runningServers;
+<a name="60" href="#60">60</a>      
+<a name="61" href="#61">61</a>      <em>/**<em>* </em></em>
+<a name="62" href="#62">62</a>  <em>     * Server socket when started, null otherwise.</em>
+<a name="63" href="#63">63</a>  <em>     * Null indicates to the socket serving thread that the server is stopped.</em>
+<a name="64" href="#64">64</a>  <em>     */</em>
+<a name="65" href="#65">65</a>      <strong>private</strong> <strong>volatile</strong> ServerSocketChannel socket;
+<a name="66" href="#66">66</a>      
+<a name="67" href="#67">67</a>  
+<a name="68" href="#68">68</a>      <strong>public</strong> <a href="../../../../org/apache/james/mpt/DiscardProtocol.html">DiscardProtocol</a>(<strong>final</strong> <strong>int</strong> port) {
+<a name="69" href="#69">69</a>          <strong>super</strong>();
+<a name="70" href="#70">70</a>          <strong>this</strong>.port = port;
+<a name="71" href="#71">71</a>          queue = <strong>new</strong> LinkedList&lt;Server>();
+<a name="72" href="#72">72</a>          runningServers = <strong>new</strong> LinkedList&lt;Server>();
+<a name="73" href="#73">73</a>      }
+<a name="74" href="#74">74</a>      
+<a name="75" href="#75">75</a>      <em>/**<em>*</em></em>
+<a name="76" href="#76">76</a>  <em>     * Starts serving.</em>
+<a name="77" href="#77">77</a>  <em>     * @throws IOException when connection fails</em>
+<a name="78" href="#78">78</a>  <em>     * @throws IllegalStateException when already started</em>
+<a name="79" href="#79">79</a>  <em>     */</em>
+<a name="80" href="#80">80</a>      <strong>public</strong> <strong>void</strong> start() throws IOException {
+<a name="81" href="#81">81</a>          <strong>synchronized</strong> (queue)
+<a name="82" href="#82">82</a>          {
+<a name="83" href="#83">83</a>              <strong>if</strong> (socket == <strong>null</strong>) {
+<a name="84" href="#84">84</a>                  socket = ServerSocketChannel.open();
+<a name="85" href="#85">85</a>                  socket.socket().bind(<strong>new</strong> InetSocketAddress(port));
+<a name="86" href="#86">86</a>                  <em class="comment">// only going to record a single conversation</em>
+<a name="87" href="#87">87</a>                  socket.configureBlocking(false);
+<a name="88" href="#88">88</a>                  
+<a name="89" href="#89">89</a>                  <strong>final</strong> Thread socketMonitorThread = <strong>new</strong> Thread(<strong>new</strong> SocketMonitor());
+<a name="90" href="#90">90</a>                  socketMonitorThread.start();
+<a name="91" href="#91">91</a>                  
+<a name="92" href="#92">92</a>              } <strong>else</strong> {
+<a name="93" href="#93">93</a>                  <strong>throw</strong> <strong>new</strong> IllegalStateException(<span class="string">"Already started"</span>);
+<a name="94" href="#94">94</a>              }
+<a name="95" href="#95">95</a>          }
+<a name="96" href="#96">96</a>      }
+<a name="97" href="#97">97</a>      
+<a name="98" href="#98">98</a>      
+<a name="99" href="#99">99</a>      <strong>public</strong> Record recordNext() {
+<a name="100" href="#100">100</a>         <strong>synchronized</strong> (queue)
+<a name="101" href="#101">101</a>         {
+<a name="102" href="#102">102</a>             Server server = <strong>new</strong> Server();
+<a name="103" href="#103">103</a>             queue.add(server);
+<a name="104" href="#104">104</a>             <strong>return</strong> server;
+<a name="105" href="#105">105</a>         }
+<a name="106" href="#106">106</a>     }
+<a name="107" href="#107">107</a>     
+<a name="108" href="#108">108</a>     <strong>private</strong> <strong>void</strong> abort() {
+<a name="109" href="#109">109</a>         <strong>synchronized</strong> (queue)
+<a name="110" href="#110">110</a>         {
+<a name="111" href="#111">111</a>             stop();
+<a name="112" href="#112">112</a>             <strong>for</strong> (Iterator it=queue.iterator();it.hasNext();) {
+<a name="113" href="#113">113</a>                 <strong>final</strong> Server server = (Server) it.next();
+<a name="114" href="#114">114</a>                 server.abort();
+<a name="115" href="#115">115</a>             }
+<a name="116" href="#116">116</a>             queue.clear();
+<a name="117" href="#117">117</a>         }
+<a name="118" href="#118">118</a>     }
+<a name="119" href="#119">119</a>     
+<a name="120" href="#120">120</a>     <em>/**<em>*</em></em>
+<a name="121" href="#121">121</a> <em>     * Stops serving.</em>
+<a name="122" href="#122">122</a> <em>     * @return ASCII bytes sent to socket by first</em>
+<a name="123" href="#123">123</a> <em>     */</em>
+<a name="124" href="#124">124</a>     <strong>public</strong> <strong>void</strong> stop() {
+<a name="125" href="#125">125</a>         <strong>synchronized</strong> (queue)
+<a name="126" href="#126">126</a>         {
+<a name="127" href="#127">127</a>             <strong>try</strong> {
+<a name="128" href="#128">128</a>                 <strong>if</strong> (socket != <strong>null</strong>) {
+<a name="129" href="#129">129</a>                     <strong>if</strong> (socket.isOpen()) {
+<a name="130" href="#130">130</a>                         socket.close();
+<a name="131" href="#131">131</a>                     }
+<a name="132" href="#132">132</a>                 }
+<a name="133" href="#133">133</a>             } <strong>catch</strong> (IOException e) {
+<a name="134" href="#134">134</a>                 LOG.warn(<span class="string">"Failed to close socket"</span>, e);
+<a name="135" href="#135">135</a>             }
+<a name="136" href="#136">136</a>             socket = <strong>null</strong>;
+<a name="137" href="#137">137</a>             <strong>for</strong> (Iterator it = runningServers.iterator(); it.hasNext();) {
+<a name="138" href="#138">138</a>                 <strong>final</strong> Server server = (Server) it.next();
+<a name="139" href="#139">139</a>                 server.abort();
+<a name="140" href="#140">140</a>             }
+<a name="141" href="#141">141</a>         }
+<a name="142" href="#142">142</a>     }
+<a name="143" href="#143">143</a>     
+<a name="144" href="#144">144</a>     <strong>private</strong> <strong>final</strong> <strong>class</strong> SocketMonitor implements Runnable {
+<a name="145" href="#145">145</a>         <strong>public</strong> <strong>void</strong> run() {
+<a name="146" href="#146">146</a>             <strong>try</strong>
+<a name="147" href="#147">147</a>             {
+<a name="148" href="#148">148</a>                 <strong>long</strong> lastConnection = System.currentTimeMillis();
+<a name="149" href="#149">149</a>                 <strong>while</strong>(socket != <strong>null</strong>) {
+<a name="150" href="#150">150</a>                     <strong>final</strong> SocketChannel socketChannel = socket.accept();
+<a name="151" href="#151">151</a>                     <strong>if</strong> (socketChannel == <strong>null</strong>) {
+<a name="152" href="#152">152</a>                         <strong>if</strong> (System.currentTimeMillis() - lastConnection > IDLE_TIMEOUT) {
+<a name="153" href="#153">153</a>                             <strong>throw</strong> <strong>new</strong> Exception (<span class="string">"Idle timeout"</span>);
+<a name="154" href="#154">154</a>                         }
+<a name="155" href="#155">155</a>                         Thread.sleep(SOCKET_CONNECTION_WAIT_MILLIS);
+<a name="156" href="#156">156</a>                     } <strong>else</strong> {
+<a name="157" href="#157">157</a>                         <strong>synchronized</strong>(queue) {
+<a name="158" href="#158">158</a>                             Server nextServer = (Server) queue.poll();
+<a name="159" href="#159">159</a>                             <strong>if</strong> (nextServer == <strong>null</strong>) {
+<a name="160" href="#160">160</a>                                 nextServer = <strong>new</strong> Server();
+<a name="161" href="#161">161</a>                             }
+<a name="162" href="#162">162</a>                             nextServer.setSocketChannel(socketChannel);
+<a name="163" href="#163">163</a>                             
+<a name="164" href="#164">164</a>                             <strong>final</strong> Thread channelThread = <strong>new</strong> Thread(nextServer);
+<a name="165" href="#165">165</a>                             channelThread.start();
+<a name="166" href="#166">166</a>                             runningServers.add(nextServer);
+<a name="167" href="#167">167</a>                             lastConnection = System.currentTimeMillis();
+<a name="168" href="#168">168</a>                         }
+<a name="169" href="#169">169</a>                     }
+<a name="170" href="#170">170</a>                 }
+<a name="171" href="#171">171</a>             } <strong>catch</strong> (Exception e) {
+<a name="172" href="#172">172</a>                 LOG.fatal(<span class="string">"Cannot accept connection"</span>, e);
+<a name="173" href="#173">173</a>                 abort();
+<a name="174" href="#174">174</a>             }
+<a name="175" href="#175">175</a>         }
+<a name="176" href="#176">176</a>     }
+<a name="177" href="#177">177</a> 
+<a name="178" href="#178">178</a>     <strong>public</strong> <strong>interface</strong> Record {
+<a name="179" href="#179">179</a>         <em>/**<em>* Blocks until completion of conversation */</em></em>
+<a name="180" href="#180">180</a>         <strong>public</strong> String complete() throws Exception;
+<a name="181" href="#181">181</a>     }
+<a name="182" href="#182">182</a>     
+<a name="183" href="#183">183</a>     <em>/**<em>*</em></em>
+<a name="184" href="#184">184</a> <em>     * Basic server.</em>
+<a name="185" href="#185">185</a> <em>     */</em>
+<a name="186" href="#186">186</a>     <strong>private</strong> <strong>final</strong> <strong>static</strong> <strong>class</strong> Server implements Runnable, Record {
+<a name="187" href="#187">187</a> 
+<a name="188" href="#188">188</a>         <strong>private</strong> <strong>static</strong> <strong>final</strong> <strong>int</strong> COMPLETION_TIMEOUT = 60000;
+<a name="189" href="#189">189</a> 
+<a name="190" href="#190">190</a>         <strong>private</strong> <strong>static</strong> <strong>final</strong> <strong>int</strong> COMPLETION_PAUSE = 1000;
+<a name="191" href="#191">191</a> 
+<a name="192" href="#192">192</a>         <strong>private</strong> <strong>static</strong> <strong>final</strong> <strong>int</strong> INITIAL_BUFFER_CAPACITY = 2048;
+<a name="193" href="#193">193</a>         
+<a name="194" href="#194">194</a>         <strong>private</strong> <strong>final</strong> ByteBuffer buffer;
+<a name="195" href="#195">195</a>         <em>/**<em>*</em></em>
+<a name="196" href="#196">196</a> <em>         * Safe for concurrent access by multiple threads.</em>
+<a name="197" href="#197">197</a> <em>         */</em>
+<a name="198" href="#198">198</a>         <strong>private</strong> <strong>final</strong> StringBuffer out;
+<a name="199" href="#199">199</a>         
+<a name="200" href="#200">200</a>         <em>/**<em>*</em></em>
+<a name="201" href="#201">201</a> <em>         * Initialised by setter </em>
+<a name="202" href="#202">202</a> <em>         */</em>
+<a name="203" href="#203">203</a>         <strong>private</strong> SocketChannel socketChannel;
+<a name="204" href="#204">204</a>         
+<a name="205" href="#205">205</a>         <strong>private</strong> <strong>volatile</strong> <strong>boolean</strong> aborted;
+<a name="206" href="#206">206</a>         <strong>private</strong> <strong>volatile</strong> <strong>boolean</strong> complete;
+<a name="207" href="#207">207</a>         
+<a name="208" href="#208">208</a>         <strong>public</strong> Server() {
+<a name="209" href="#209">209</a>             complete = false;
+<a name="210" href="#210">210</a>             out = <strong>new</strong> StringBuffer(INITIAL_BUFFER_CAPACITY);
+<a name="211" href="#211">211</a>             buffer = ByteBuffer.allocate(INITIAL_BUFFER_CAPACITY);
+<a name="212" href="#212">212</a>             aborted = false;
+<a name="213" href="#213">213</a>             socketChannel = <strong>null</strong>;
+<a name="214" href="#214">214</a>         }
+<a name="215" href="#215">215</a>         
+<a name="216" href="#216">216</a>         
+<a name="217" href="#217">217</a>         <strong>public</strong> SocketChannel getSocketChannel() {
+<a name="218" href="#218">218</a>             <strong>return</strong> socketChannel;
+<a name="219" href="#219">219</a>         }
+<a name="220" href="#220">220</a>         
+<a name="221" href="#221">221</a>         <strong>public</strong> <strong>void</strong> setSocketChannel(SocketChannel socketChannel) {
+<a name="222" href="#222">222</a>             <strong>this</strong>.socketChannel = socketChannel;
+<a name="223" href="#223">223</a>         }
+<a name="224" href="#224">224</a> 
+<a name="225" href="#225">225</a>         <strong>public</strong> <strong>void</strong> run() {
+<a name="226" href="#226">226</a>             <strong>try</strong>
+<a name="227" href="#227">227</a>             {
+<a name="228" href="#228">228</a>                 <strong>if</strong> (socketChannel == <strong>null</strong>)
+<a name="229" href="#229">229</a>                 {
+<a name="230" href="#230">230</a>                     LOG.fatal(<span class="string">"Socket channel must be set before instance is run."</span>);
+<a name="231" href="#231">231</a>                 }
+<a name="232" href="#232">232</a>                 <strong>else</strong>
+<a name="233" href="#233">233</a>                 {
+<a name="234" href="#234">234</a>                     <strong>try</strong> {
+<a name="235" href="#235">235</a>                         <strong>while</strong>(!socketChannel.finishConnect()) {
+<a name="236" href="#236">236</a>                             Thread.sleep(SOCKET_CONNECTION_WAIT_MILLIS);
+<a name="237" href="#237">237</a>                         }
+<a name="238" href="#238">238</a>                         
+<a name="239" href="#239">239</a>                         <strong>int</strong> read = 0;
+<a name="240" href="#240">240</a>                         <strong>while</strong>(!aborted &amp;&amp; socketChannel.isOpen() &amp;&amp; read >= 0) {
+<a name="241" href="#241">241</a>                             read = socketChannel.read(buffer);
+<a name="242" href="#242">242</a>                             <strong>if</strong> (!buffer.hasRemaining()) {
+<a name="243" href="#243">243</a>                                 decant();
+<a name="244" href="#244">244</a>                             }
+<a name="245" href="#245">245</a>                         }
+<a name="246" href="#246">246</a>                         
+<a name="247" href="#247">247</a>                     } <strong>catch</strong> (Exception e) {
+<a name="248" href="#248">248</a>                         LOG.fatal(<span class="string">"Socket communication failed"</span>, e);
+<a name="249" href="#249">249</a>                         aborted = <strong>true</strong>;
+<a name="250" href="#250">250</a>                         
+<a name="251" href="#251">251</a>                     <em class="comment">// Tidy up</em>
+<a name="252" href="#252">252</a>                     } <strong>finally</strong> {
+<a name="253" href="#253">253</a>                         <strong>try</strong> {
+<a name="254" href="#254">254</a>                             socketChannel.close();
+<a name="255" href="#255">255</a>                         } <strong>catch</strong> (Exception e) {
+<a name="256" href="#256">256</a>                             LOG.debug(<span class="string">"Ignoring failure to close socket."</span>, e);
+<a name="257" href="#257">257</a>                         }
+<a name="258" href="#258">258</a>                     }
+<a name="259" href="#259">259</a>                 }
+<a name="260" href="#260">260</a>             } <strong>finally</strong> {
+<a name="261" href="#261">261</a>                 <strong>synchronized</strong> (<strong>this</strong>)
+<a name="262" href="#262">262</a>                 {
+<a name="263" href="#263">263</a>                     <em class="comment">// Ensure completion is flagged</em>
+<a name="264" href="#264">264</a>                     complete = <strong>true</strong>;
+<a name="265" href="#265">265</a>                     <em class="comment">// Signal to any waiting threads </em>
+<a name="266" href="#266">266</a>                     notifyAll();
+<a name="267" href="#267">267</a>                 }
+<a name="268" href="#268">268</a>             }
+<a name="269" href="#269">269</a>         }
+<a name="270" href="#270">270</a> 
+<a name="271" href="#271">271</a>         <em>/**<em>*</em></em>
+<a name="272" href="#272">272</a> <em>         * Transfers all data from buffer to builder</em>
+<a name="273" href="#273">273</a> <em>         *</em>
+<a name="274" href="#274">274</a> <em>         */</em>
+<a name="275" href="#275">275</a>         <strong>private</strong> <strong>void</strong> decant() {
+<a name="276" href="#276">276</a>             buffer.flip();
+<a name="277" href="#277">277</a>             <strong>final</strong> CharBuffer decoded = ASCII.decode(buffer);
+<a name="278" href="#278">278</a>             out.append(decoded);
+<a name="279" href="#279">279</a>             buffer.clear();
+<a name="280" href="#280">280</a>         }
+<a name="281" href="#281">281</a> 
+<a name="282" href="#282">282</a> 
+<a name="283" href="#283">283</a>         <strong>public</strong> <strong>void</strong> abort() {
+<a name="284" href="#284">284</a>             aborted = <strong>true</strong>;
+<a name="285" href="#285">285</a>         }
+<a name="286" href="#286">286</a>         
+<a name="287" href="#287">287</a>         <em>/**<em>*</em></em>
+<a name="288" href="#288">288</a> <em>         * Blocks until connection is complete (closed)</em>
+<a name="289" href="#289">289</a> <em>         */</em>
+<a name="290" href="#290">290</a>         <strong>public</strong> <strong>synchronized</strong> String complete() throws Exception {
+<a name="291" href="#291">291</a>             <strong>if</strong> (aborted) {
+<a name="292" href="#292">292</a>                 <strong>throw</strong> <strong>new</strong> Exception(<span class="string">"Aborted"</span>);
+<a name="293" href="#293">293</a>             }
+<a name="294" href="#294">294</a>             <strong>final</strong> <strong>long</strong> startTime = System.currentTimeMillis();
+<a name="295" href="#295">295</a>             <strong>boolean</strong> isTimedOut = false;
+<a name="296" href="#296">296</a>             <strong>while</strong> (!complete  &amp;&amp; !isTimedOut) {
+<a name="297" href="#297">297</a>                 wait(COMPLETION_PAUSE);
+<a name="298" href="#298">298</a>                 isTimedOut = (System.currentTimeMillis() - startTime) > COMPLETION_TIMEOUT;
+<a name="299" href="#299">299</a>             }
+<a name="300" href="#300">300</a>             <strong>if</strong> (isTimedOut &amp;&amp; !complete) {
+<a name="301" href="#301">301</a>                 <strong>throw</strong> <strong>new</strong> Exception(<span class="string">"Timed out wait for be notified that read is complete"</span>);
+<a name="302" href="#302">302</a>             }
+<a name="303" href="#303">303</a>             decant();
+<a name="304" href="#304">304</a>             <strong>return</strong> out.toString();
+<a name="305" href="#305">305</a>         }        
+<a name="306" href="#306">306</a>     }
+<a name="307" href="#307">307</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestDiscardProtocol.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestDiscardProtocol.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestDiscardProtocol.html (added)
+++ james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestDiscardProtocol.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,112 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>TestDiscardProtocol xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../../../../../apidocs/org/apache/james/mpt/TestDiscardProtocol.html">View Javadoc</a></div><pre>
+
+<a name="1" href="#1">1</a>   <em>/**<em>***************************************************************</em></em>
+<a name="2" href="#2">2</a>   <em> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a name="3" href="#3">3</a>   <em> * or more contributor license agreements.  See the NOTICE file *</em>
+<a name="4" href="#4">4</a>   <em> * distributed with this work for additional information        *</em>
+<a name="5" href="#5">5</a>   <em> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a name="6" href="#6">6</a>   <em> * to you under the Apache License, Version 2.0 (the            *</em>
+<a name="7" href="#7">7</a>   <em> * "License"); you may not use this file except in compliance   *</em>
+<a name="8" href="#8">8</a>   <em> * with the License.  You may obtain a copy of the License at   *</em>
+<a name="9" href="#9">9</a>   <em> *                                                              *</em>
+<a name="10" href="#10">10</a>  <em> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a name="11" href="#11">11</a>  <em> *                                                              *</em>
+<a name="12" href="#12">12</a>  <em> * Unless required by applicable law or agreed to in writing,   *</em>
+<a name="13" href="#13">13</a>  <em> * software distributed under the License is distributed on an  *</em>
+<a name="14" href="#14">14</a>  <em> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a name="15" href="#15">15</a>  <em> * KIND, either express or implied.  See the License for the    *</em>
+<a name="16" href="#16">16</a>  <em> * specific language governing permissions and limitations      *</em>
+<a name="17" href="#17">17</a>  <em> * under the License.                                           *</em>
+<a name="18" href="#18">18</a>  <em> ****************************************************************/</em>
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong>package</strong> org.apache.james.mpt;
+<a name="21" href="#21">21</a>  
+<a name="22" href="#22">22</a>  <strong>import</strong> java.io.IOException;
+<a name="23" href="#23">23</a>  <strong>import</strong> java.io.OutputStreamWriter;
+<a name="24" href="#24">24</a>  <strong>import</strong> java.io.Writer;
+<a name="25" href="#25">25</a>  <strong>import</strong> java.net.Socket;
+<a name="26" href="#26">26</a>  
+<a name="27" href="#27">27</a>  <strong>import</strong> javax.net.SocketFactory;
+<a name="28" href="#28">28</a>  
+<a name="29" href="#29">29</a>  <strong>import</strong> junit.framework.TestCase;
+<a name="30" href="#30">30</a>  
+<a name="31" href="#31">31</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../org/apache/james/mpt/TestDiscardProtocol.html">TestDiscardProtocol</a> <strong>extends</strong> TestCase {
+<a name="32" href="#32">32</a>  
+<a name="33" href="#33">33</a>      <strong>private</strong> <strong>final</strong> <strong>class</strong> InputLater implements Runnable {
+<a name="34" href="#34">34</a>          <strong>private</strong> Exception e;
+<a name="35" href="#35">35</a>          
+<a name="36" href="#36">36</a>          <strong>public</strong> <strong>void</strong> run() {
+<a name="37" href="#37">37</a>              <strong>try</strong>  {
+<a name="38" href="#38">38</a>                  Thread.sleep(1000);
+<a name="39" href="#39">39</a>                  input();
+<a name="40" href="#40">40</a>              } <strong>catch</strong> (Exception e) {
+<a name="41" href="#41">41</a>                  <strong>this</strong>.e = e;
+<a name="42" href="#42">42</a>              }
+<a name="43" href="#43">43</a>          }
+<a name="44" href="#44">44</a>          
+<a name="45" href="#45">45</a>          <strong>public</strong> <strong>void</strong> assertExecutedSuccessfully() throws Exception {
+<a name="46" href="#46">46</a>              <strong>if</strong> (e != <strong>null</strong>) {
+<a name="47" href="#47">47</a>                  e.printStackTrace();
+<a name="48" href="#48">48</a>                  <strong>throw</strong> e;
+<a name="49" href="#49">49</a>              }
+<a name="50" href="#50">50</a>          }
+<a name="51" href="#51">51</a>      }
+<a name="52" href="#52">52</a>  
+<a name="53" href="#53">53</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> String INPUT = <span class="string">"One, two, three - Testing"</span>;
+<a name="54" href="#54">54</a>  
+<a name="55" href="#55">55</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> <strong>int</strong> PORT = 10001;
+<a name="56" href="#56">56</a>      
+<a name="57" href="#57">57</a>      <strong>private</strong> <a href="../../../../org/apache/james/mpt/DiscardProtocol.html">DiscardProtocol</a> protocol;
+<a name="58" href="#58">58</a>      <strong>private</strong> Socket socket;
+<a name="59" href="#59">59</a>  
+<a name="60" href="#60">60</a>      <strong>private</strong> DiscardProtocol.Record record;
+<a name="61" href="#61">61</a>      
+<a name="62" href="#62">62</a>      @Override
+<a name="63" href="#63">63</a>      <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="64" href="#64">64</a>          <strong>super</strong>.setUp();
+<a name="65" href="#65">65</a>          protocol = <strong>new</strong> <a href="../../../../org/apache/james/mpt/DiscardProtocol.html">DiscardProtocol</a>(PORT);
+<a name="66" href="#66">66</a>          protocol.start();
+<a name="67" href="#67">67</a>          socket = SocketFactory.getDefault().createSocket(<span class="string">"127.0.0.1"</span>, PORT);
+<a name="68" href="#68">68</a>          record = protocol.recordNext();
+<a name="69" href="#69">69</a>      }
+<a name="70" href="#70">70</a>  
+<a name="71" href="#71">71</a>      @Override
+<a name="72" href="#72">72</a>      <strong>protected</strong> <strong>void</strong> tearDown() throws Exception {
+<a name="73" href="#73">73</a>          protocol.stop();
+<a name="74" href="#74">74</a>          <strong>super</strong>.tearDown();
+<a name="75" href="#75">75</a>      }
+<a name="76" href="#76">76</a>      
+<a name="77" href="#77">77</a>      <strong>public</strong> <strong>void</strong> testRecord() throws Exception {
+<a name="78" href="#78">78</a>          assertTrue(socket.isConnected());
+<a name="79" href="#79">79</a>          input();
+<a name="80" href="#80">80</a>          String output = record.complete();
+<a name="81" href="#81">81</a>          assertEquals(INPUT, output);
+<a name="82" href="#82">82</a>      }
+<a name="83" href="#83">83</a>  
+<a name="84" href="#84">84</a>      <strong>private</strong> <strong>void</strong> input() throws IOException {
+<a name="85" href="#85">85</a>          Writer out = <strong>new</strong> OutputStreamWriter(socket.getOutputStream());
+<a name="86" href="#86">86</a>          out.append(INPUT);
+<a name="87" href="#87">87</a>          out.close();
+<a name="88" href="#88">88</a>          socket.close();
+<a name="89" href="#89">89</a>      }
+<a name="90" href="#90">90</a>      
+<a name="91" href="#91">91</a>      <strong>public</strong> <strong>void</strong> testComplete() throws Exception {
+<a name="92" href="#92">92</a>          InputLater inputLater = <strong>new</strong> InputLater();
+<a name="93" href="#93">93</a>          Thread thread = <strong>new</strong> Thread(inputLater);
+<a name="94" href="#94">94</a>          thread.start();
+<a name="95" href="#95">95</a>          String output = record.complete();
+<a name="96" href="#96">96</a>          assertEquals(INPUT, output);
+<a name="97" href="#97">97</a>          inputLater.assertExecutedSuccessfully();
+<a name="98" href="#98">98</a>      }
+<a name="99" href="#99">99</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestExternalHostSystem.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestExternalHostSystem.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestExternalHostSystem.html (added)
+++ james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestExternalHostSystem.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,102 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>TestExternalHostSystem xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../../../../../apidocs/org/apache/james/mpt/TestExternalHostSystem.html">View Javadoc</a></div><pre>
+
+<a name="1" href="#1">1</a>   <em>/**<em>***************************************************************</em></em>
+<a name="2" href="#2">2</a>   <em> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a name="3" href="#3">3</a>   <em> * or more contributor license agreements.  See the NOTICE file *</em>
+<a name="4" href="#4">4</a>   <em> * distributed with this work for additional information        *</em>
+<a name="5" href="#5">5</a>   <em> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a name="6" href="#6">6</a>   <em> * to you under the Apache License, Version 2.0 (the            *</em>
+<a name="7" href="#7">7</a>   <em> * "License"); you may not use this file except in compliance   *</em>
+<a name="8" href="#8">8</a>   <em> * with the License.  You may obtain a copy of the License at   *</em>
+<a name="9" href="#9">9</a>   <em> *                                                              *</em>
+<a name="10" href="#10">10</a>  <em> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a name="11" href="#11">11</a>  <em> *                                                              *</em>
+<a name="12" href="#12">12</a>  <em> * Unless required by applicable law or agreed to in writing,   *</em>
+<a name="13" href="#13">13</a>  <em> * software distributed under the License is distributed on an  *</em>
+<a name="14" href="#14">14</a>  <em> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a name="15" href="#15">15</a>  <em> * KIND, either express or implied.  See the License for the    *</em>
+<a name="16" href="#16">16</a>  <em> * specific language governing permissions and limitations      *</em>
+<a name="17" href="#17">17</a>  <em> * under the License.                                           *</em>
+<a name="18" href="#18">18</a>  <em> ****************************************************************/</em>
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong>package</strong> org.apache.james.mpt;
+<a name="21" href="#21">21</a>  
+<a name="22" href="#22">22</a>  <strong>import</strong> org.apache.james.mpt.HostSystem.Continuation;
+<a name="23" href="#23">23</a>  <strong>import</strong> org.jmock.Mock;
+<a name="24" href="#24">24</a>  <strong>import</strong> org.jmock.MockObjectTestCase;
+<a name="25" href="#25">25</a>  
+<a name="26" href="#26">26</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../org/apache/james/mpt/TestExternalHostSystem.html">TestExternalHostSystem</a> <strong>extends</strong> MockObjectTestCase {
+<a name="27" href="#27">27</a>  
+<a name="28" href="#28">28</a>      
+<a name="29" href="#29">29</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> String USER = <span class="string">"USER NAME"</span>;
+<a name="30" href="#30">30</a>  
+<a name="31" href="#31">31</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> String PASSWORD = <span class="string">"SOME PASSWORD"</span>;
+<a name="32" href="#32">32</a>  
+<a name="33" href="#33">33</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> String SHABANG = <span class="string">"This Is The Shabang"</span>;
+<a name="34" href="#34">34</a>  
+<a name="35" href="#35">35</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> <strong>int</strong> PORT = 10001;
+<a name="36" href="#36">36</a>      
+<a name="37" href="#37">37</a>      <strong>private</strong> <a href="../../../../org/apache/james/mpt/DiscardProtocol.html">DiscardProtocol</a> protocol;
+<a name="38" href="#38">38</a>      
+<a name="39" href="#39">39</a>      <strong>private</strong> DiscardProtocol.Record record;
+<a name="40" href="#40">40</a>  
+<a name="41" href="#41">41</a>      <strong>private</strong> Continuation continuation;
+<a name="42" href="#42">42</a>  
+<a name="43" href="#43">43</a>      <strong>private</strong> UserAdder userAdder;
+<a name="44" href="#44">44</a>  
+<a name="45" href="#45">45</a>      <strong>private</strong> Mock mockUserAdder;
+<a name="46" href="#46">46</a>      
+<a name="47" href="#47">47</a>      @Override
+<a name="48" href="#48">48</a>      <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="49" href="#49">49</a>          <strong>super</strong>.setUp();
+<a name="50" href="#50">50</a>          protocol = <strong>new</strong> <a href="../../../../org/apache/james/mpt/DiscardProtocol.html">DiscardProtocol</a>(PORT);
+<a name="51" href="#51">51</a>          protocol.start();
+<a name="52" href="#52">52</a>          record = protocol.recordNext();
+<a name="53" href="#53">53</a>          continuation = (Continuation) mock(Continuation.<strong>class</strong>).proxy();
+<a name="54" href="#54">54</a>          mockUserAdder = mock(UserAdder.<strong>class</strong>);
+<a name="55" href="#55">55</a>          userAdder = (UserAdder) mockUserAdder.proxy();
+<a name="56" href="#56">56</a>      }
+<a name="57" href="#57">57</a>  
+<a name="58" href="#58">58</a>      @Override
+<a name="59" href="#59">59</a>      <strong>protected</strong> <strong>void</strong> tearDown() throws Exception {
+<a name="60" href="#60">60</a>          protocol.stop();
+<a name="61" href="#61">61</a>          <strong>super</strong>.tearDown();
+<a name="62" href="#62">62</a>      }
+<a name="63" href="#63">63</a>      
+<a name="64" href="#64">64</a>      <strong>public</strong> <strong>void</strong> testWrite() throws Exception {
+<a name="65" href="#65">65</a>          Session session = newSession(SHABANG);
+<a name="66" href="#66">66</a>          <strong>final</strong> String in = <span class="string">"Hello, World"</span>;
+<a name="67" href="#67">67</a>          session.writeLine(in);
+<a name="68" href="#68">68</a>          session.stop();
+<a name="69" href="#69">69</a>          assertEquals(in + <span class="string">"\r\n"</span>, record.complete());
+<a name="70" href="#70">70</a>      }
+<a name="71" href="#71">71</a>      
+<a name="72" href="#72">72</a>      <strong>public</strong> <strong>void</strong> testAddUser() throws Exception {
+<a name="73" href="#73">73</a>          mockUserAdder.expects(once()).method(<span class="string">"addUser"</span>).with(eq(USER), eq(PASSWORD));
+<a name="74" href="#74">74</a>          ExternalHostSystem system = buildSystem(SHABANG);
+<a name="75" href="#75">75</a>          system.addUser(USER, PASSWORD);
+<a name="76" href="#76">76</a>      }
+<a name="77" href="#77">77</a>  
+<a name="78" href="#78">78</a>      <strong>private</strong> Session newSession(<strong>final</strong> String shabang) throws Exception {
+<a name="79" href="#79">79</a>          ExternalSessionFactory system = buildSystem(shabang);
+<a name="80" href="#80">80</a>          Session session = system.newSession(continuation);
+<a name="81" href="#81">81</a>          <strong>return</strong> session;
+<a name="82" href="#82">82</a>      }
+<a name="83" href="#83">83</a>  
+<a name="84" href="#84">84</a>      <strong>private</strong> ExternalHostSystem buildSystem(<strong>final</strong> String shabang) {
+<a name="85" href="#85">85</a>          ExternalHostSystem system = <strong>new</strong> ExternalHostSystem(<span class="string">"localhost"</span>, PORT ,
+<a name="86" href="#86">86</a>                  <strong>new</strong> NullMonitor(), shabang, userAdder);
+<a name="87" href="#87">87</a>          <strong>return</strong> system;
+<a name="88" href="#88">88</a>      }
+<a name="89" href="#89">89</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestFileProtocolSessionBuilder.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestFileProtocolSessionBuilder.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestFileProtocolSessionBuilder.html (added)
+++ james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestFileProtocolSessionBuilder.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,99 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>TestFileProtocolSessionBuilder xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../../../../../apidocs/org/apache/james/mpt/TestFileProtocolSessionBuilder.html">View Javadoc</a></div><pre>
+
+<a name="1" href="#1">1</a>   <em>/**<em>***************************************************************</em></em>
+<a name="2" href="#2">2</a>   <em> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a name="3" href="#3">3</a>   <em> * or more contributor license agreements.  See the NOTICE file *</em>
+<a name="4" href="#4">4</a>   <em> * distributed with this work for additional information        *</em>
+<a name="5" href="#5">5</a>   <em> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a name="6" href="#6">6</a>   <em> * to you under the Apache License, Version 2.0 (the            *</em>
+<a name="7" href="#7">7</a>   <em> * "License"); you may not use this file except in compliance   *</em>
+<a name="8" href="#8">8</a>   <em> * with the License.  You may obtain a copy of the License at   *</em>
+<a name="9" href="#9">9</a>   <em> *                                                              *</em>
+<a name="10" href="#10">10</a>  <em> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a name="11" href="#11">11</a>  <em> *                                                              *</em>
+<a name="12" href="#12">12</a>  <em> * Unless required by applicable law or agreed to in writing,   *</em>
+<a name="13" href="#13">13</a>  <em> * software distributed under the License is distributed on an  *</em>
+<a name="14" href="#14">14</a>  <em> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a name="15" href="#15">15</a>  <em> * KIND, either express or implied.  See the License for the    *</em>
+<a name="16" href="#16">16</a>  <em> * specific language governing permissions and limitations      *</em>
+<a name="17" href="#17">17</a>  <em> * under the License.                                           *</em>
+<a name="18" href="#18">18</a>  <em> ****************************************************************/</em>
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong>package</strong> org.apache.james.mpt;
+<a name="21" href="#21">21</a>  
+<a name="22" href="#22">22</a>  <strong>import</strong> java.io.StringReader;
+<a name="23" href="#23">23</a>  
+<a name="24" href="#24">24</a>  <strong>import</strong> org.jmock.Mock;
+<a name="25" href="#25">25</a>  <strong>import</strong> org.jmock.MockObjectTestCase;
+<a name="26" href="#26">26</a>  
+<a name="27" href="#27">27</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../org/apache/james/mpt/TestFileProtocolSessionBuilder.html">TestFileProtocolSessionBuilder</a> <strong>extends</strong> MockObjectTestCase {
+<a name="28" href="#28">28</a>  
+<a name="29" href="#29">29</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> String SCRIPT_WITH_VARIABLES = <span class="string">"HELLO ${not} ${foo} WORLD ${bar}"</span>;
+<a name="30" href="#30">30</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> String SCRIPT_WITH_FOO_REPLACED_BY_WHATEVER = <span class="string">"HELLO ${not} whatever WORLD ${bar}"</span>;
+<a name="31" href="#31">31</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> String SCRIPT_WITH_VARIABLES_INLINED = <span class="string">"HELLO not foo WORLD bar"</span>;
+<a name="32" href="#32">32</a>      
+<a name="33" href="#33">33</a>      ProtocolSessionBuilder builder;
+<a name="34" href="#34">34</a>      ProtocolInteractor session;
+<a name="35" href="#35">35</a>  
+<a name="36" href="#36">36</a>      <strong>private</strong> Mock mockSession;
+<a name="37" href="#37">37</a>      
+<a name="38" href="#38">38</a>      @Override
+<a name="39" href="#39">39</a>      <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="40" href="#40">40</a>          <strong>super</strong>.setUp();
+<a name="41" href="#41">41</a>          builder = <strong>new</strong> ProtocolSessionBuilder();
+<a name="42" href="#42">42</a>          mockSession = mock(ProtocolInteractor.<strong>class</strong>);
+<a name="43" href="#43">43</a>          session = (ProtocolInteractor) mockSession.proxy();
+<a name="44" href="#44">44</a>      }
+<a name="45" href="#45">45</a>  
+<a name="46" href="#46">46</a>      @Override
+<a name="47" href="#47">47</a>      <strong>protected</strong> <strong>void</strong> tearDown() throws Exception {
+<a name="48" href="#48">48</a>          <strong>super</strong>.tearDown();
+<a name="49" href="#49">49</a>      }
+<a name="50" href="#50">50</a>  
+<a name="51" href="#51">51</a>      <strong>private</strong> <strong>void</strong> addLines() throws Exception {
+<a name="52" href="#52">52</a>          builder.addProtocolLines(<span class="string">"A Script"</span>, <strong>new</strong> StringReader(ProtocolSessionBuilder.CLIENT_TAG + <span class="string">" "</span> + SCRIPT_WITH_VARIABLES), session);
+<a name="53" href="#53">53</a>      }
+<a name="54" href="#54">54</a>      
+<a name="55" href="#55">55</a>      <strong>public</strong> <strong>void</strong> testShouldPreserveContentsWhenNoVariablesSet() throws Exception {
+<a name="56" href="#56">56</a>          mockSession.expects(once()).method(<span class="string">"CL"</span>).with(eq(-1), eq(SCRIPT_WITH_VARIABLES));
+<a name="57" href="#57">57</a>          addLines();
+<a name="58" href="#58">58</a>      }
+<a name="59" href="#59">59</a>  
+<a name="60" href="#60">60</a>      <strong>public</strong> <strong>void</strong> testShouldReplaceVariableWhenSet() throws Exception {
+<a name="61" href="#61">61</a>          mockSession.expects(once()).method(<span class="string">"CL"</span>).with(eq(-1), eq(SCRIPT_WITH_FOO_REPLACED_BY_WHATEVER));
+<a name="62" href="#62">62</a>          builder.setVariable(<span class="string">"foo"</span>, <span class="string">"whatever"</span>);
+<a name="63" href="#63">63</a>          addLines();
+<a name="64" href="#64">64</a>      }
+<a name="65" href="#65">65</a>      
+<a name="66" href="#66">66</a>      <strong>public</strong> <strong>void</strong> testShouldReplaceAllVariablesWhenSet() throws Exception {
+<a name="67" href="#67">67</a>          mockSession.expects(once()).method(<span class="string">"CL"</span>).with(eq(-1), eq(SCRIPT_WITH_VARIABLES_INLINED));
+<a name="68" href="#68">68</a>          builder.setVariable(<span class="string">"bar"</span>, <span class="string">"bar"</span>);
+<a name="69" href="#69">69</a>          builder.setVariable(<span class="string">"foo"</span>, <span class="string">"foo"</span>);
+<a name="70" href="#70">70</a>          builder.setVariable(<span class="string">"not"</span>, <span class="string">"not"</span>);
+<a name="71" href="#71">71</a>          addLines();
+<a name="72" href="#72">72</a>      }
+<a name="73" href="#73">73</a>      
+<a name="74" href="#74">74</a>      <strong>public</strong> <strong>void</strong> testShouldReplaceVariableAtBeginningAndEnd() throws Exception {
+<a name="75" href="#75">75</a>          mockSession.expects(once()).method(<span class="string">"CL"</span>).with(eq(-1), eq(<span class="string">"whatever Some Other Scriptwhateverwhatever"</span>));
+<a name="76" href="#76">76</a>          builder.setVariable(<span class="string">"foo"</span>, <span class="string">"whatever"</span>);
+<a name="77" href="#77">77</a>          builder.addProtocolLines(<span class="string">"A Script"</span>, <strong>new</strong> StringReader(ProtocolSessionBuilder.CLIENT_TAG + <span class="string">" "</span> + <span class="string">"${foo} Some Other Script${foo}${foo}"</span>), session);
+<a name="78" href="#78">78</a>      }
+<a name="79" href="#79">79</a>      
+<a name="80" href="#80">80</a>      <strong>public</strong> <strong>void</strong> testShouldIgnoreNotQuiteVariables() throws Exception {
+<a name="81" href="#81">81</a>          <strong>final</strong> String NEARLY = <span class="string">"{foo}${}${foo Some Other Script${foo}"</span>;
+<a name="82" href="#82">82</a>          mockSession.expects(once()).method(<span class="string">"CL"</span>).with(eq(-1), eq(NEARLY));
+<a name="83" href="#83">83</a>          builder.setVariable(<span class="string">"foo"</span>, <span class="string">"whatever"</span>);
+<a name="84" href="#84">84</a>          builder.addProtocolLines(<span class="string">"A Script"</span>, <strong>new</strong> StringReader(ProtocolSessionBuilder.CLIENT_TAG + <span class="string">" "</span> + NEARLY), session);
+<a name="85" href="#85">85</a>      }
+<a name="86" href="#86">86</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestScriptedUserAdder.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestScriptedUserAdder.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestScriptedUserAdder.html (added)
+++ james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/TestScriptedUserAdder.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>TestScriptedUserAdder xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../../../../../apidocs/org/apache/james/mpt/TestScriptedUserAdder.html">View Javadoc</a></div><pre>
+
+<a name="1" href="#1">1</a>   <em>/**<em>***************************************************************</em></em>
+<a name="2" href="#2">2</a>   <em> * Licensed to the Apache Software Foundation (ASF) under one   *</em>
+<a name="3" href="#3">3</a>   <em> * or more contributor license agreements.  See the NOTICE file *</em>
+<a name="4" href="#4">4</a>   <em> * distributed with this work for additional information        *</em>
+<a name="5" href="#5">5</a>   <em> * regarding copyright ownership.  The ASF licenses this file   *</em>
+<a name="6" href="#6">6</a>   <em> * to you under the Apache License, Version 2.0 (the            *</em>
+<a name="7" href="#7">7</a>   <em> * "License"); you may not use this file except in compliance   *</em>
+<a name="8" href="#8">8</a>   <em> * with the License.  You may obtain a copy of the License at   *</em>
+<a name="9" href="#9">9</a>   <em> *                                                              *</em>
+<a name="10" href="#10">10</a>  <em> *   <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a>                 *</em>
+<a name="11" href="#11">11</a>  <em> *                                                              *</em>
+<a name="12" href="#12">12</a>  <em> * Unless required by applicable law or agreed to in writing,   *</em>
+<a name="13" href="#13">13</a>  <em> * software distributed under the License is distributed on an  *</em>
+<a name="14" href="#14">14</a>  <em> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *</em>
+<a name="15" href="#15">15</a>  <em> * KIND, either express or implied.  See the License for the    *</em>
+<a name="16" href="#16">16</a>  <em> * specific language governing permissions and limitations      *</em>
+<a name="17" href="#17">17</a>  <em> * under the License.                                           *</em>
+<a name="18" href="#18">18</a>  <em> ****************************************************************/</em>
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong>package</strong> org.apache.james.mpt;
+<a name="21" href="#21">21</a>  
+<a name="22" href="#22">22</a>  <strong>import</strong> junit.framework.TestCase;
+<a name="23" href="#23">23</a>  
+<a name="24" href="#24">24</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../org/apache/james/mpt/TestScriptedUserAdder.html">TestScriptedUserAdder</a> <strong>extends</strong> TestCase {
+<a name="25" href="#25">25</a>      
+<a name="26" href="#26">26</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> <strong>int</strong> PORT = 10001;
+<a name="27" href="#27">27</a>      
+<a name="28" href="#28">28</a>      <strong>private</strong> <a href="../../../../org/apache/james/mpt/DiscardProtocol.html">DiscardProtocol</a> protocol;
+<a name="29" href="#29">29</a>      
+<a name="30" href="#30">30</a>      <strong>private</strong> DiscardProtocol.Record record;
+<a name="31" href="#31">31</a>      
+<a name="32" href="#32">32</a>      <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="33" href="#33">33</a>          <strong>super</strong>.setUp();
+<a name="34" href="#34">34</a>          protocol = <strong>new</strong> <a href="../../../../org/apache/james/mpt/DiscardProtocol.html">DiscardProtocol</a>(PORT);
+<a name="35" href="#35">35</a>          protocol.start();
+<a name="36" href="#36">36</a>          record = protocol.recordNext();
+<a name="37" href="#37">37</a>      }
+<a name="38" href="#38">38</a>  
+<a name="39" href="#39">39</a>      <strong>protected</strong> <strong>void</strong> tearDown() throws Exception {
+<a name="40" href="#40">40</a>          <strong>super</strong>.tearDown();
+<a name="41" href="#41">41</a>          protocol.stop();
+<a name="42" href="#42">42</a>      }
+<a name="43" href="#43">43</a>  
+<a name="44" href="#44">44</a>      <strong>public</strong> <strong>void</strong> testShouldExecuteScriptAgainstPort() throws Exception {
+<a name="45" href="#45">45</a>          ScriptedUserAdder adder = <strong>new</strong> ScriptedUserAdder(<span class="string">"localhost"</span>, PORT, <span class="string">"C: USER='${user}' password='${password}'"</span>);
+<a name="46" href="#46">46</a>          adder.addUser(<span class="string">"A User"</span>, <span class="string">"Some Password"</span>);
+<a name="47" href="#47">47</a>          assertEquals(<span class="string">"USER='A User' password='Some Password'\r\n"</span>, record.complete());
+<a name="48" href="#48">48</a>      }
+<a name="49" href="#49">49</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Added: james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/package-frame.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/package-frame.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/package-frame.html (added)
+++ james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/package-frame.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,36 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+		<title>Apache JAMES MPT Main 0.1-SNAPSHOT Reference Package org.apache.james.mpt</title>
+		<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" />
+	</head>
+	<body>
+
+		<h3>
+        	<a href="package-summary.html" target="classFrame">org.apache.james.mpt</a>
+      	</h3>
+
+      	<h3>Classes</h3>
+
+      	<ul>
+      		          	<li>
+            	<a href="DiscardProtocol.html" target="classFrame">DiscardProtocol</a>
+          	</li>
+          	          	<li>
+            	<a href="TestDiscardProtocol.html" target="classFrame">TestDiscardProtocol</a>
+          	</li>
+          	          	<li>
+            	<a href="TestExternalHostSystem.html" target="classFrame">TestExternalHostSystem</a>
+          	</li>
+          	          	<li>
+            	<a href="TestFileProtocolSessionBuilder.html" target="classFrame">TestFileProtocolSessionBuilder</a>
+          	</li>
+          	          	<li>
+            	<a href="TestScriptedUserAdder.html" target="classFrame">TestScriptedUserAdder</a>
+          	</li>
+          	      	</ul>
+
+	</body>
+</html>
\ No newline at end of file

Added: james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/package-summary.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/package-summary.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/package-summary.html (added)
+++ james/site/trunk/www/mpt/main/xref-test/org/apache/james/mpt/package-summary.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,87 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+		<title>Apache JAMES MPT Main 0.1-SNAPSHOT Reference Package $name</title>
+		<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" />
+	</head>
+	<body>
+		      	<div class="overview">
+        	<ul>
+          		<li>
+            		<a href="../../../../overview-summary.html">Overview</a>
+          		</li>
+          		<li class="selected">Package</li>
+        	</ul>
+      	</div>
+      	<div class="framenoframe">
+        	<ul>
+          		<li>
+            		<a href="../../../../index.html" target="_top">FRAMES</a>
+          		</li>
+          		<li>
+            		<a href="package-summary.html" target="_top">NO FRAMES</a>
+          		</li>
+        	</ul>
+      	</div>
+		
+		      	<h2>Package org.apache.james.mpt</h2>
+
+		<table class="summary">
+        	<thead>
+          		<tr>
+            		<th>Class Summary</th>
+          		</tr>
+        	</thead>
+        	<tbody>
+        		            	<tr>
+              		<td>
+                		<a href="DiscardProtocol.html" target="classFrame">DiscardProtocol</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="TestDiscardProtocol.html" target="classFrame">TestDiscardProtocol</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="TestExternalHostSystem.html" target="classFrame">TestExternalHostSystem</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="TestFileProtocolSessionBuilder.html" target="classFrame">TestFileProtocolSessionBuilder</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="TestScriptedUserAdder.html" target="classFrame">TestScriptedUserAdder</a>
+              		</td>
+            	</tr>
+				        	</tbody>
+      	</table>
+		
+		      	<div class="overview">
+        	<ul>
+          		<li>
+            		<a href="../../../../overview-summary.html">Overview</a>
+          		</li>
+          		<li class="selected">Package</li>
+        	</ul>
+      	</div>
+      	<div class="framenoframe">
+        	<ul>
+          		<li>
+            		<a href="../../../../index.html" target="_top">FRAMES</a>
+          		</li>
+          		<li>
+            		<a href="package-summary.html" target="_top">NO FRAMES</a>
+          		</li>
+        	</ul>
+      	</div>
+				<hr />
+		Copyright &copy; 2008 The Apache Software Foundation. All Rights Reserved.
+	</body>
+</html>
\ No newline at end of file

Added: james/site/trunk/www/mpt/main/xref-test/overview-frame.html
URL: http://svn.apache.org/viewvc/james/site/trunk/www/mpt/main/xref-test/overview-frame.html?rev=722598&view=auto
==============================================================================
--- james/site/trunk/www/mpt/main/xref-test/overview-frame.html (added)
+++ james/site/trunk/www/mpt/main/xref-test/overview-frame.html Tue Dec  2 12:05:59 2008
@@ -0,0 +1,25 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+		<title>Apache JAMES MPT Main 0.1-SNAPSHOT Reference</title>
+		<link rel="stylesheet" type="text/css" href="stylesheet.css" title="style" />
+	</head>
+	<body>
+
+		<h3>
+			<a href="allclasses-frame.html" target="packageFrame">All Classes</a>
+		</h3>
+
+		<h3>Packages</h3>
+
+		<ul>
+						<li>
+				<a href="org/apache/james/mpt/package-frame.html" target="packageFrame">org.apache.james.mpt</a>
+			</li>
+					</ul>
+
+	</body>
+</html>
+