[CVS spice] Remove the event related packages as they are not maintained and never will be

pdonald-yCVjj/[email protected] 19 Jun 2004 14:40:31 -0000
Newsgroups gmane.comp.java.spice.cvs
Message-ID <[email protected]>
<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>spice/sandbox</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>event/<a href="#file1"><span id="removed">.cvsignore</span></a></tt></td><td></td><td align="right" id="removed">-7</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file2"><span id="removed">project.properties</span></a></tt></td><td></td><td align="right" id="removed">-69</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file3"><span id="removed">project.xml</span></a></tt></td><td></td><td align="right" id="removed">-30</td><td nowrap="nowrap">1.5 removed</td></tr>
<tr class="alt"><td><tt>event/src/java/org/codehaus/spice/event/<a href="#file4"><span id="removed">AbstractEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-38</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file5"><span id="removed">AbstractEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-31</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file6"><span id="removed">EventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-31</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file7"><span id="removed">EventJoin.java</span></a></tt></td><td></td><td align="right" id="removed">-19</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file8"><span id="removed">EventSink.java</span></a></tt></td><td></td><td align="right" id="removed">-43</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file9"><span id="removed">EventSource.java</span></a></tt></td><td></td><td align="right" id="removed">-42</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file10"><span id="removed">EventValve.java</span></a></tt></td><td></td><td align="right" id="removed">-33</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>event/src/java/org/codehaus/spice/event/impl/<a href="#file11"><span id="removed">AbstractEventSource.java</span></a></tt></td><td></td><td align="right" id="removed">-95</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file12"><span id="removed">BlockingEventSource.java</span></a></tt></td><td></td><td align="right" id="removed">-95</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file13"><span id="removed">DefaultEventQueue.java</span></a></tt></td><td></td><td align="right" id="removed">-166</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file14"><span id="removed">EventPump.java</span></a></tt></td><td></td><td align="right" id="removed">-135</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file15"><span id="removed">EventPumpRunner.java</span></a></tt></td><td></td><td align="right" id="removed">-143</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file16"><span id="removed">NullEventSink.java</span></a></tt></td><td></td><td align="right" id="removed">-37</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file17"><span id="removed">NullEventValve.java</span></a></tt></td><td></td><td align="right" id="removed">-39</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file18"><span id="removed">ValveControlledSink.java</span></a></tt></td><td></td><td align="right" id="removed">-107</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt>event/src/java/org/codehaus/spice/event/impl/collections/<a href="#file19"><span id="removed">AbstractFifoBuffer.java</span></a></tt></td><td></td><td align="right" id="removed">-165</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file20"><span id="removed">BoundedFifoBuffer.java</span></a></tt></td><td></td><td align="right" id="removed">-69</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file21"><span id="removed">Buffer.java</span></a></tt></td><td></td><td align="right" id="removed">-66</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file22"><span id="removed">UnboundedFifoBuffer.java</span></a></tt></td><td></td><td align="right" id="removed">-80</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>event/src/test/org/codehaus/spice/event/<a href="#file23"><span id="removed">DummyEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-10</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file24"><span id="removed">DummyEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-21</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file25"><span id="removed">DummyEventSource.java</span></a></tt></td><td></td><td align="right" id="removed">-24</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file26"><span id="removed">EventHandlerTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-17</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file27"><span id="removed">EventTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-19</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>event/src/test/org/codehaus/spice/event/impl/<a href="#file28"><span id="removed">BlockingEventSourceTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-138</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file29"><span id="removed">BlockingTestEventSource.java</span></a></tt></td><td></td><td align="right" id="removed">-45</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file30"><span id="removed">DefaultEventQueueTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-189</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file31"><span id="removed">DummyEventSource.java</span></a></tt></td><td></td><td align="right" id="removed">-50</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file32"><span id="removed">EventPumpRunnerTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-95</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file33"><span id="removed">EventPumpTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-191</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file34"><span id="removed">EventSourceTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-67</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file35"><span id="removed">LockChecker.java</span></a></tt></td><td></td><td align="right" id="removed">-52</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file36"><span id="removed">NullEventSinkTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-17</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file37"><span id="removed">NullEventValveTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-18</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file38"><span id="removed">ValveControlledSinkTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-171</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>event/src/test/org/codehaus/spice/event/impl/collections/<a href="#file39"><span id="removed">FifoBufferTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-356</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>event/src/test/org/codehaus/spice/event/impl/perf/<a href="#file40"><span id="removed">EventGenerator.java</span></a></tt></td><td></td><td align="right" id="removed">-70</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file41"><span id="removed">EventPerfTest.java</span></a></tt></td><td></td><td align="right" id="removed">-102</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file42"><span id="removed">EventTerminator.java</span></a></tt></td><td></td><td align="right" id="removed">-62</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file43"><span id="removed">EventTransformer.java</span></a></tt></td><td></td><td align="right" id="removed">-87</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file44"><span id="removed">TestEventPump.java</span></a></tt></td><td></td><td align="right" id="removed">-37</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file45"><span id="removed">TestQueue.java</span></a></tt></td><td></td><td align="right" id="removed">-26</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>event/xdocs/<a href="#file46"><span id="removed">component.menu</span></a></tt></td><td></td><td align="right" id="removed">-4</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file47"><span id="removed">index.xml</span></a></tt></td><td></td><td align="right" id="removed">-13</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>netevent/<a href="#file48"><span id="removed">.cvsignore</span></a></tt></td><td></td><td align="right" id="removed">-7</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file49"><span id="removed">project.properties</span></a></tt></td><td></td><td align="right" id="removed">-69</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file50"><span id="removed">project.xml</span></a></tt></td><td></td><td align="right" id="removed">-35</td><td nowrap="nowrap">1.6 removed</td></tr>
<tr><td><tt>netevent/src/java/org/codehaus/spice/netevent/buffers/<a href="#file51"><span id="removed">BufferManager.java</span></a></tt></td><td></td><td align="right" id="removed">-27</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file52"><span id="removed">DefaultBufferManager.java</span></a></tt></td><td></td><td align="right" id="removed">-88</td><td nowrap="nowrap">1.7 removed</td></tr>
<tr><td><tt>netevent/src/java/org/codehaus/spice/netevent/events/<a href="#file53"><span id="removed">AbstractTransportEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-60</td><td nowrap="nowrap">1.6 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file54"><span id="removed">AcceptErrorEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-57</td><td nowrap="nowrap">1.5 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file55"><span id="removed">AcceptEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-23</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file56"><span id="removed">AcceptPossibleEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-30</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file57"><span id="removed">ChannelClosedEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-30</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file58"><span id="removed">ChannelEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-67</td><td nowrap="nowrap">1.5 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file59"><span id="removed">CloseChannelRequestEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-30</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file60"><span id="removed">ConnectErrorEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-32</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file61"><span id="removed">ConnectEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-23</td><td nowrap="nowrap">1.6 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file62"><span id="removed">ConnectPossibleEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-44</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file63"><span id="removed">DataPresentEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-28</td><td nowrap="nowrap">1.5 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file64"><span id="removed">IOErrorEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-58</td><td nowrap="nowrap">1.5 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file65"><span id="removed">InputDataPresentEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-30</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file66"><span id="removed">OutputDataPresentEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-30</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file67"><span id="removed">ReadErrorEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-32</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file68"><span id="removed">ReadEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-59</td><td nowrap="nowrap">1.6 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file69"><span id="removed">ReadPossibleEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-30</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file70"><span id="removed">WriteErrorEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-32</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file71"><span id="removed">WriteEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-52</td><td nowrap="nowrap">1.4 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file72"><span id="removed">WritePossibleEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-30</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt>netevent/src/java/org/codehaus/spice/netevent/handlers/<a href="#file73"><span id="removed">AbstractDirectedHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-39</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file74"><span id="removed">AbstractIOEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-56</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file75"><span id="removed">AcceptEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-60</td><td nowrap="nowrap">1.5 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file76"><span id="removed">ChannelEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-90</td><td nowrap="nowrap">1.14 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file77"><span id="removed">ClientConnectEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-89</td><td nowrap="nowrap">1.12 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file78"><span id="removed">CloseEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-49</td><td nowrap="nowrap">1.4 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file79"><span id="removed">ConnectEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-101</td><td nowrap="nowrap">1.15 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file80"><span id="removed">InputDataEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-43</td><td nowrap="nowrap">1.6 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file81"><span id="removed">OutputDataEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-36</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file82"><span id="removed">ReadEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-82</td><td nowrap="nowrap">1.7 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file83"><span id="removed">WriteEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-92</td><td nowrap="nowrap">1.8 removed</td></tr>
<tr class="alt"><td><tt>netevent/src/java/org/codehaus/spice/netevent/source/<a href="#file84"><span id="removed">SelectableChannelEventSource.java</span></a></tt></td><td></td><td align="right" id="removed">-189</td><td nowrap="nowrap">1.11 removed</td></tr>
<tr><td><tt>netevent/src/java/org/codehaus/spice/netevent/transport/<a href="#file85"><span id="removed">ChannelTransport.java</span></a></tt></td><td></td><td align="right" id="removed">-334</td><td nowrap="nowrap">1.26 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file86"><span id="removed">MultiBufferInputStream.java</span></a></tt></td><td></td><td align="right" id="removed">-327</td><td nowrap="nowrap">1.9 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file87"><span id="removed">TransportOutputStream.java</span></a></tt></td><td></td><td align="right" id="removed">-167</td><td nowrap="nowrap">1.10 removed</td></tr>
<tr class="alt"><td><tt>netevent/src/test/org/codehaus/spice/netevent/<a href="#file88"><span id="removed">EchoHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-30</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file89"><span id="removed">NetRuntime.java</span></a></tt></td><td></td><td align="right" id="removed">-115</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file90"><span id="removed">TestEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-152</td><td nowrap="nowrap">1.5 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file91"><span id="removed">TestServer.java</span></a></tt></td><td></td><td align="right" id="removed">-101</td><td nowrap="nowrap">1.14 removed</td></tr>
<tr class="alt"><td><tt>netevent/src/test/org/codehaus/spice/netevent/events/<a href="#file92"><span id="removed">EventsTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-78</td><td nowrap="nowrap">1.13 removed</td></tr>
<tr><td><tt>netevent/src/test/org/codehaus/spice/netevent/transport/<a href="#file93"><span id="removed">CallOnceConstraint.java</span></a></tt></td><td></td><td align="right" id="removed">-32</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file94"><span id="removed">ChannelTransportTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-148</td><td nowrap="nowrap">1.5 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file95"><span id="removed">MultiBufferInputStreamTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-302</td><td nowrap="nowrap">1.4 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file96"><span id="removed">TransportOutputStreamTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-166</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt>netevent/xdocs/<a href="#file97"><span id="removed">component.menu</span></a></tt></td><td></td><td align="right" id="removed">-4</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file98"><span id="removed">index.xml</span></a></tt></td><td></td><td align="right" id="removed">-13</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt>packet/<a href="#file99"><span id="removed">.cvsignore</span></a></tt></td><td></td><td align="right" id="removed">-7</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file100"><span id="removed">TODO.txt</span></a></tt></td><td></td><td align="right" id="removed">-1</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file101"><span id="removed">maven.xml</span></a></tt></td><td></td><td align="right" id="removed">-23</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file102"><span id="removed">project.properties</span></a></tt></td><td></td><td align="right" id="removed">-69</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file103"><span id="removed">project.xml</span></a></tt></td><td></td><td align="right" id="removed">-55</td><td nowrap="nowrap">1.12 removed</td></tr>
<tr class="alt"><td><tt>packet/src/java/org/codehaus/spice/packet/<a href="#file104"><span id="removed">Packet.java</span></a></tt></td><td></td><td align="right" id="removed">-94</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>packet/src/java/org/codehaus/spice/packet/events/<a href="#file105"><span id="removed">AbstractPacketEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-48</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file106"><span id="removed">AbstractSessionEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-51</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file107"><span id="removed">ConnectRequestEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-23</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file108"><span id="removed">DataPacketReadyEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-25</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file109"><span id="removed">PacketWriteRequestEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-26</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file110"><span id="removed">PingRequestEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-23</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file111"><span id="removed">SessionActiveEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-23</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file112"><span id="removed">SessionConnectEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-23</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file113"><span id="removed">SessionDisconnectEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-23</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file114"><span id="removed">SessionDisconnectRequestEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-23</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file115"><span id="removed">SessionErrorEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-82</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file116"><span id="removed">SessionInactiveEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-23</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>packet/src/java/org/codehaus/spice/packet/handlers/<a href="#file117"><span id="removed">HexDump.java</span></a></tt></td><td></td><td align="right" id="removed">-105</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file118"><span id="removed">MessageCodes.java</span></a></tt></td><td></td><td align="right" id="removed">-60</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file119"><span id="removed">PacketIOEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-1369</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file120"><span id="removed">Protocol.java</span></a></tt></td><td></td><td align="right" id="removed">-79</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file121"><span id="removed">TimerEntry.java</span></a></tt></td><td></td><td align="right" id="removed">-34</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file122"><span id="removed">TypeIOUtil.java</span></a></tt></td><td></td><td align="right" id="removed">-92</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>packet/src/java/org/codehaus/spice/packet/session/<a href="#file123"><span id="removed">DefaultSessionManager.java</span></a></tt></td><td></td><td align="right" id="removed">-92</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file124"><span id="removed">PacketQueue.java</span></a></tt></td><td></td><td align="right" id="removed">-154</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file125"><span id="removed">SequenceComparator.java</span></a></tt></td><td></td><td align="right" id="removed">-27</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file126"><span id="removed">Session.java</span></a></tt></td><td></td><td align="right" id="removed">-622</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file127"><span id="removed">SessionManager.java</span></a></tt></td><td></td><td align="right" id="removed">-54</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>packet/src/test/org/codehaus/spice/packet/<a href="#file128"><span id="removed">EchoHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-30</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file129"><span id="removed">NetRuntime.java</span></a></tt></td><td></td><td align="right" id="removed">-125</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file130"><span id="removed">PacketTestCase.java</span></a></tt></td><td></td><td align="right" id="removed">-42</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file131"><span id="removed">TestEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-207</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file132"><span id="removed">TestServer.java</span></a></tt></td><td></td><td align="right" id="removed">-152</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file133"><span id="removed">TestSessionData.java</span></a></tt></td><td></td><td align="right" id="removed">-29</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>packet/xdocs/<a href="#file134"><span id="removed">component.menu</span></a></tt></td><td></td><td align="right" id="removed">-4</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file135"><span id="removed">index.xml</span></a></tt></td><td></td><td align="right" id="removed">-13</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>timeevent/<a href="#file136"><span id="removed">.cvsignore</span></a></tt></td><td></td><td align="right" id="removed">-7</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file137"><span id="removed">project.properties</span></a></tt></td><td></td><td align="right" id="removed">-69</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file138"><span id="removed">project.xml</span></a></tt></td><td></td><td align="right" id="removed">-35</td><td nowrap="nowrap">1.5 removed</td></tr>
<tr><td><tt>timeevent/src/java/org/codehaus/spice/timeevent/events/<a href="#file139"><span id="removed">TimeEvent.java</span></a></tt></td><td></td><td align="right" id="removed">-54</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>timeevent/src/java/org/codehaus/spice/timeevent/source/<a href="#file140"><span id="removed">BinaryHeap.java</span></a></tt></td><td></td><td align="right" id="removed">-221</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file141"><span id="removed">SchedulingKey.java</span></a></tt></td><td></td><td align="right" id="removed">-125</td><td nowrap="nowrap">1.4 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file142"><span id="removed">TimeEventSource.java</span></a></tt></td><td></td><td align="right" id="removed">-122</td><td nowrap="nowrap">1.5 removed</td></tr>
<tr><td><tt>timeevent/src/java/org/codehaus/spice/timeevent/triggers/<a href="#file143"><span id="removed">PeriodicTimeTrigger.java</span></a></tt></td><td></td><td align="right" id="removed">-66</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file144"><span id="removed">TimeTrigger.java</span></a></tt></td><td></td><td align="right" id="removed">-16</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>timeevent/src/test/org/codehaus/spice/timeevent/<a href="#file145"><span id="removed">TestEventHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-22</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file146"><span id="removed">TestServer.java</span></a></tt></td><td></td><td align="right" id="removed">-68</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt>timeevent/xdocs/<a href="#file147"><span id="removed">component.menu</span></a></tt></td><td></td><td align="right" id="removed">-4</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file148"><span id="removed">index.xml</span></a></tt></td><td></td><td align="right" id="removed">-13</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td></td><td></td><td align="right" id="removed">-12073</td><td></td></tr>
</table>
<small id="info">148 removed files</small><br />
<pre class="comment">
Remove the event related packages as they are not maintained and never will be
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event<br /></span>
<div class="fileheader" id="removed"><big><b>.cvsignore</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N .cvsignore
--- .cvsignore	16 Dec 2003 02:03:13 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
</small></pre><pre class="diff" id="removed">-dist
-target
-build.properties
-*.log
-*.el
-*.ipr
-*.iws
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event<br /></span>
<div class="fileheader" id="removed"><big><b>project.properties</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N project.properties
--- project.properties	25 Apr 2004 00:44:45 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,69 +0,0 @@
</small></pre><pre class="diff" id="removed">-maven.remote.group=spice
-maven.repo.remote=http://www.ibiblio.com/maven,http://dist.codehaus.org
-
-maven.checkstyle.properties = ${basedir}/../../tools/checkstyle/checkstyle.xml
-maven.checkstyle.license.exists=true
-
-maven.javadoc.links = \
-    http://avalon.apache.org/api/, \
-    http://dna.jcontainer.org/apidocs/, \
-    http://java.sun.com/j2se/1.3/docs/api/
-
-maven.junit.fork=true
-maven.junit.dir=${basedir}/target/test-classes
-
-maven.license.licenseFile=${basedir}/../../LICENSE.txt
-maven.linkcheck.enable=true
-
-maven.xdoc.poweredby.image=
-#maven.xdoc.jsl=target/site.jsl
-
-spice.color1.bright=#FFFFFF
-spice.color1.light=#FFFFCC
-spice.color1.main=#CCCC99
-spice.color1.shaded=#999966
-spice.color1.dark=#666633
-spice.color1.darkest=#333300
-
-maven.ui.body.background=${spice.color1.bright}
-maven.ui.body.foreground=${spice.color1.darkest}
-maven.ui.section.background=${spice.color1.shaded}
-maven.ui.section.foreground=${spice.color1.light}
-maven.ui.subsection.background=${spice.color1.main}
-maven.ui.subsection.foreground=${spice.color1.light}
-maven.ui.table.header.background=${spice.color1.shaded}
-maven.ui.table.header.foreground=${spice.color1.light}
-
-maven.ui.table.row.odd.background=${spice.color1.light}
-maven.ui.table.row.odd.foreground=${spice.color1.dark}
-maven.ui.table.row.even.background=${spice.color1.light}
-maven.ui.table.row.even.foreground=${spice.color1.dark}
-
-maven.ui.banner.background=${spice.color1.bright}
-maven.ui.banner.foreground=${spice.color1.darkest}
-maven.ui.banner.border.top=${spice.color1.bright}
-maven.ui.banner.border.bottom=${spice.color1.shaded}
-
-maven.ui.source.background=${spice.color1.bright}
-maven.ui.source.foreground=${spice.color1.darkest}
-maven.ui.source.border.top=${spice.color1.shaded}
-maven.ui.source.border.bottom=${spice.color1.shaded}
-maven.ui.source.border.right=${spice.color1.shaded}
-maven.ui.source.border.left=${spice.color1.shaded}
-
-maven.ui.navcol.background=${spice.color1.light}
-maven.ui.navcol.background.ns4=${spice.color1.light}
-maven.ui.navcol.foreground=${spice.color1.dark}
-maven.ui.navcol.foreground.ns4=${spice.color1.dark}
-maven.ui.navcol.border.top=${spice.color1.light}
-maven.ui.navcol.border.right=${spice.color1.main}
-maven.ui.navcol.border.bottom=${spice.color1.main}
-
-maven.ui.breadcrumbs.background=${spice.color1.main}
-maven.ui.breadcrumbs.foreground=${spice.color1.dark}
-maven.ui.breadcrumbs.border.top=${spice.color1.light}
-maven.ui.breadcrumbs.border.bottom=${spice.color1.shaded}
-
-maven.ui.href.link=${spice.color1.dark}
-maven.ui.href.link.active=${spice.color1.darkest}
-maven.ui.href.link.selfref=${spice.color1.dark}
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event<br /></span>
<div class="fileheader" id="removed"><big><b>project.xml</b></big> <small id="info">removed after 1.5</small></div>
<pre class="diff"><small id="info">diff -N project.xml
--- project.xml	12 May 2004 08:04:09 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
</small></pre><pre class="diff" id="removed">-&lt;?xml version="1.0"?&gt;
-&lt;project&gt;
-    &lt;extend&gt;${basedir}/../../project.xml&lt;/extend&gt;
-    &lt;name&gt;Spice Event&lt;/name&gt;
-    &lt;id&gt;spice-event&lt;/id&gt;
-    &lt;currentVersion&gt;1.1-dev&lt;/currentVersion&gt;
-    &lt;package&gt;org.codehaus.spice.event&lt;/package&gt;
-    &lt;inceptionYear&gt;2003&lt;/inceptionYear&gt;
-
-    &lt;shortDescription&gt;Event Toolkit&lt;/shortDescription&gt;
-
-    &lt;dependencies&gt;
-        &lt;dependency&gt;
-            &lt;groupId&gt;jmock&lt;/groupId&gt;
-            &lt;artifactId&gt;jmock&lt;/artifactId&gt;
-            &lt;version&gt;20031129.200437&lt;/version&gt;
-        &lt;/dependency&gt;
-    &lt;/dependencies&gt;
-
-    &lt;developers&gt;
-        &lt;developer&gt;
-            &lt;name&gt;Peter Donald&lt;/name&gt;
-            &lt;id&gt;pdonald&lt;/id&gt;            
-            &lt;roles&gt;
-                &lt;role&gt;Developer&lt;/role&gt;
-            &lt;/roles&gt;
-        &lt;/developer&gt;
-    &lt;/developers&gt;
-
-&lt;/project&gt;
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>AbstractEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N AbstractEvent.java
--- AbstractEvent.java	22 Jan 2004 02:10:09 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,38 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event;
-
-/**
- * An abstract base class for net events.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/01/22 02:10:09 $
- */
-public abstract class AbstractEvent
-{
-    /**
-     * @see Object#toString()
-     */
-    public String toString()
-    {
-        final String shortName = getShortName();
-        return shortName + "[" + getEventDescription() + "]";
-    }
-
-    /**
-     * Return the description of event.
-     * 
-     * @return the description of event.
-     */
-    protected abstract String getEventDescription();
-
-    /**
-     * Return the "Short" name of class sans package name.
-     * 
-     * @return the short name of class
-     */
-    String getShortName()
-    {
-        final String name = getClass().getName();
-        final int index = name.lastIndexOf( '.' ) + 1;
-        return name.substring( index );
-    }
-}
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>AbstractEventHandler.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N AbstractEventHandler.java
--- AbstractEventHandler.java	17 Dec 2003 04:57:20 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,31 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event;
-
-/**
- * Abstract class to sublclass to implement EventHandler. The handleEvents
- * method is already implemented and simply calls handleEvent() by iterating
- * over passed arguments.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/17 04:57:20 $
- */
-public abstract class AbstractEventHandler
-    implements EventHandler
-{
-    /**
-     * @see EventHandler#handleEvents(Object[])
-     */
-    public void handleEvents( final Object[] events )
-    {
-        for( int i = 0; i &lt; events.length; i++ )
-        {
-            handleEvent( events[ i ] );
-        }
-    }
-}
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>EventHandler.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventHandler.java
--- EventHandler.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,31 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event;
-
-/**
- * The event handler is responsible for processing events.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public interface EventHandler
-{
-    /**
-     * Handle an event.
-     * 
-     * @param event the event
-     */
-    void handleEvent( Object event );
-
-    /**
-     * Handle a set of events.
-     * 
-     * @param events the events
-     */
-    void handleEvents( Object[] events );
-}
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>EventJoin.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventJoin.java
--- EventJoin.java	22 Jan 2004 02:23:29 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event;
-
-/**
- * A sink that passes events onto a source.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/01/22 02:23:29 $
- */
-public interface EventJoin
-    extends EventSink, EventSource
-{
-}
</pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>EventSink.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventSink.java
--- EventSink.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,43 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event;
-
-/**
- * A EventSink represents the destination for events.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public interface EventSink
-{
-    /**
-     * Attempt to add an event to the sink. Return false if unable to add
-     * event.
-     * 
-     * @param event the event
-     * @return false if unable to add event.
-     */
-    boolean addEvent( Object event );
-
-    /**
-     * Attempt to add a set of events to the sink. If unable to add one event to
-     * sink then do not add any event and return false.
-     * 
-     * @param events the events
-     * @return false if unable to add events.
-     */
-    boolean addEvents( Object[] events );
-
-    /**
-     * Return the underlying object that is synchronized upon if synchronization
-     * is necessary.
-     * 
-     * @return the lock object
-     */
-    Object getSinkLock();
-}
</pre></div>
<hr /><a name="file9" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>EventSource.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventSource.java
--- EventSource.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event;
-
-/**
- * The EventSource represents a source of events.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public interface EventSource
-{
-    /**
-     * Return next event from source. Returning null indicates that there are no
-     * events at this stage.
-     * 
-     * @return the event or null
-     */
-    Object getEvent();
-
-    /**
-     * Return a set of events from source. The maximum number of events returned
-     * is specified by the count parameter.
-     * 
-     * @param count the maximum number of events returned
-     * @return the set of events
-     */
-    Object[] getEvents( int count );
-
-    /**
-     * Return the underlying object that is synchronized upon if synchronization
-     * is necessary.
-     * 
-     * @return the lock object
-     */
-    Object getSourceLock();
-}
</pre></div>
<hr /><a name="file10" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>EventValve.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventValve.java
--- EventValve.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event;
-
-/**
- * The valve controls the flow events into a sink.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public interface EventValve
-{
-    /**
-     * Return true if event should be accepted.
-     * 
-     * @param event the event
-     * @return true if event should be accepted.
-     */
-    boolean acceptEvent( Object event );
-
-    /**
-     * Return true if events should be accepted.
-     * 
-     * @param events the events
-     * @return true if events should be accepted.
-     */
-    boolean acceptEvents( Object[] events );
-}
</pre></div>
<hr /><a name="file11" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>AbstractEventSource.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N AbstractEventSource.java
--- AbstractEventSource.java	22 Jan 2004 02:37:19 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,95 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import org.codehaus.spice.event.EventJoin;
-import org.codehaus.spice.event.EventSource;
-
-/**
- * An abstract class for implementing EventSource objects.
- *
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/01/22 02:37:19 $
- */
-public abstract class AbstractEventSource
-    implements EventSource
-{
-    /**
-     * The underlying join to add events to.
-     */
-    private final EventJoin _join;
-
-    /**
-     * Create Source.
-     *
-     * @param join the underlying join.
-     */
-    protected AbstractEventSource( final EventJoin join )
-    {
-        if( null == join )
-        {
-            throw new NullPointerException( "join" );
-        }
-        _join = join;
-    }
-
-    /**
-     * Return the underlying EventJoin.
-     *
-     * @return the underlying EventJoin.
-     */
-    protected EventJoin getJoin()
-    {
-        return _join;
-    }
-
-    /**
-     * @see EventSource#getEvent()
-     */
-    public Object getEvent()
-    {
-        refresh();
-        return _join.getEvent();
-    }
-
-    /**
-     * @see EventSource#getEvents(int)
-     */
-    public Object[] getEvents( final int count )
-    {
-        refresh();
-        return _join.getEvents( count );
-    }
-
-    /**
-     * @see EventSource#getSourceLock()
-     */
-    public Object getSourceLock()
-    {
-        return _join.getSourceLock();
-    }
-
-    /**
-     * Open associated resources.
-     *
-     * @throws Exception if unable to open resources
-     */
-    public void open()
-        throws Exception
-    {
-    }
-
-    /**
-     * Close associated resources.
-     *
-     * @throws Exception if unable to close resources
-     */
-    public void close()
-        throws Exception
-    {
-    }
-
-    /**
-     * Perform refresh on the underlying resources and thus populate the
-     * EventJoin.
-     */
-    protected abstract void refresh();
-}
</pre></div>
<hr /><a name="file12" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>BlockingEventSource.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N BlockingEventSource.java
--- BlockingEventSource.java	17 May 2004 03:52:23 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,95 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import org.codehaus.spice.event.EventSource;
-
-/**
- * A BlockingEventSource will wait until notified prior to attempting to
- * retrieve events from the underlying EventSource.
- *
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 03:52:23 $
- */
-public class BlockingEventSource
-    implements EventSource
-{
-    /**
-     * The underlying EventSource to retrieve events from.
-     */
-    private final EventSource m_source;
-
-    /**
-     * The duration to wait before unblocking.
-     */
-    private long m_duration;
-
-    /**
-     * Create an instance.
-     *
-     * @param source the source to wrap.
-     */
-    public BlockingEventSource( final EventSource source, final long duration )
-    {
-        if( null == source )
-        {
-            throw new NullPointerException( "source" );
-        }
-        m_source = source;
-        m_duration = duration;
-    }
-
-    /**
-     * @see EventSource#getEvent()
-     */
-    public Object getEvent()
-    {
-        final Object lock = getSourceLock();
-        synchronized( lock )
-        {
-            Object result = m_source.getEvent();
-            if( null == result )
-            {
-                try
-                {
-                    lock.wait( m_duration );
-                }
-                catch( final InterruptedException e )
-                {
-                }
-                result = m_source.getEvent();
-            }
-            return result;
-        }
-    }
-
-    /**
-     * @see EventSource#getEvents(int)
-     */
-    public Object[] getEvents( final int count )
-    {
-        final Object lock = getSourceLock();
-        synchronized( lock )
-        {
-            Object[] results = m_source.getEvents( count );
-            if( 0 == results.length )
-            {
-                try
-                {
-                    lock.wait( m_duration );
-                }
-                catch( final InterruptedException ie )
-                {
-                }
-                results = m_source.getEvents( count );
-            }
-            return results;
-        }
-    }
-
-    /**
-     * @see EventSource#getSourceLock()
-     */
-    public Object getSourceLock()
-    {
-        return m_source.getSourceLock();
-    }
-}
</pre></div>
<hr /><a name="file13" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>DefaultEventQueue.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N DefaultEventQueue.java
--- DefaultEventQueue.java	22 Jan 2004 02:23:29 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,166 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event.impl;
-
-import org.codehaus.spice.event.EventJoin;
-import org.codehaus.spice.event.impl.collections.Buffer;
-
-/**
- * An event queue that acts as a Source and Sink of events.
- * 
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/01/22 02:23:29 $
- */
-public class DefaultEventQueue
-    implements EventJoin
-{
-    /**
-     * An empty array of objects.
-     */
-    private static final Object[] EMPTY_OBJECT_SET = new Object[ 0 ];
-
-    /**
-     * Lock for the sink aspect of queue.
-     */
-    private final Object m_sinkLock = new Object();
-
-    /**
-     * Lock for the source aspect of queue.
-     */
-    private final Object m_sourceLock = new Object();
-
-    /**
-     * The underlying buffer used to store events.
-     */
-    private final Buffer m_buffer;
-
-    /**
-     * Create an Event queue using underlying Buffer.
-     * 
-     * @param buffer the buffer
-     */
-    public DefaultEventQueue( final Buffer buffer )
-    {
-        if( null == buffer )
-        {
-            throw new NullPointerException( "buffer" );
-        }
-        m_buffer = buffer;
-    }
-
-    /**
-     * @see EventJoin#getEvent()
-     */
-    public Object getEvent()
-    {
-        final Object lock = getSinkLock();
-        synchronized( lock )
-        {
-            final Buffer buffer = getBuffer();
-            final int size = buffer.size();
-            if( size &gt; 0 )
-            {
-                final Object result = buffer.pop();
-                lock.notifyAll();
-                return result;
-            }
-            else
-            {
-                return null;
-            }
-        }
-    }
-
-    /**
-     * @see EventJoin#getEvents(int)
-     */
-    public Object[] getEvents( final int count )
-    {
-        final Object lock = getSinkLock();
-        synchronized( lock )
-        {
-            final Buffer buffer = getBuffer();
-            final int size = buffer.size();
-            final int resultCount = Math.min( size, count );
-            if( resultCount &gt; 0 )
-            {
-                final Object[] objects = new Object[ resultCount ];
-                for( int i = 0; i &lt; objects.length; i++ )
-                {
-                    objects[ i ] = buffer.pop();
-                }
-                lock.notifyAll();
-                return objects;
-            }
-            else
-            {
-                return EMPTY_OBJECT_SET;
-            }
-        }
-    }
-
-    /**
-     * @see EventJoin#addEvent(Object)
-     */
-    public boolean addEvent( final Object event )
-    {
-        final Object lock = getSourceLock();
-        synchronized( lock )
-        {
-            final boolean result = getBuffer().add( event );
-            if( result )
-            {
-                lock.notifyAll();
-            }
-            return result;
-        }
-    }
-
-    /**
-     * @see EventJoin#addEvents(Object[])
-     */
-    public boolean addEvents( final Object[] events )
-    {
-        final Object lock = getSourceLock();
-        synchronized( lock )
-        {
-            final boolean result = getBuffer().addAll( events );
-            if( result )
-            {
-                lock.notifyAll();
-            }
-            return result;
-        }
-    }
-
-    /**
-     * @see EventJoin#getSinkLock()
-     */
-    public Object getSinkLock()
-    {
-        return m_sinkLock;
-    }
-
-    /**
-     * @see EventJoin#getSourceLock()
-     */
-    public Object getSourceLock()
-    {
-        return m_sourceLock;
-    }
-
-    /**
-     * Return the underlying buffer for events.
-     * 
-     * @return the underlying buffer for events.
-     */
-    protected Buffer getBuffer()
-    {
-        return m_buffer;
-    }
-}
</pre></div>
<hr /><a name="file14" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>EventPump.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N EventPump.java
--- EventPump.java	18 Mar 2004 03:39:07 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,135 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event.impl;
-
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSource;
-
-/**
- * Pump Events from an EventSource to an EventHandler. The Pump attempts to
- * transmit batchSize events every time it performs a refresh.
- * 
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/03/18 03:39:07 $
- */
-public class EventPump
-{
-    /**
-     * The number events to try to pump from Source to Handler each refresh.
-     */
-    private int m_batchSize = Integer.MAX_VALUE;
-
-    /**
-     * The name of pump. (Useful for debugging).
-     */
-    final String m_name;
-
-    /**
-     * The source of events.
-     */
-    final EventSource m_source;
-
-    /**
-     * The handler for events.
-     */
-    final EventHandler m_handler;
-
-   /**
-     * Create a pump from specified source to specified handler.
-     *
-     * @param source the source
-     * @param handler the handler
-     */
-    public EventPump( final EventSource source,
-                      final EventHandler handler )
-    {
-       this( "", source, handler );
-    }
-
-    /**
-     * Create a pump from specified source to specified handler.
-     *
-     * @param name the name
-     * @param source the source
-     * @param handler the handler
-     */
-    public EventPump( final String name,
-                      final EventSource source,
-                      final EventHandler handler )
-    {
-        if( null == name )
-        {
-            throw new NullPointerException( "name" );
-        }
-        if( null == source )
-        {
-            throw new NullPointerException( "source" );
-        }
-        if( null == handler )
-        {
-            throw new NullPointerException( "handler" );
-        }
-        m_name = name;
-        m_source = source;
-        m_handler = handler;
-    }
-
-    /**
-     * Perform a single refresh and pump events from source to the handler.
-     */
-    public void refresh()
-    {
-        final int batchSize = getBatchSize();
-        if( batchSize &lt; 2 )
-        {
-            final Object event = m_source.getEvent();
-            if( null != event )
-            {
-                m_handler.handleEvent( event );
-            }
-        }
-        else
-        {
-            final Object[] events = m_source.getEvents( batchSize );
-            if( 0 != events.length )
-            {
-                m_handler.handleEvents( events );
-            }
-        }
-    }
-
-    /**
-     * Return the number events pumped every refresh.
-     * 
-     * @return the number events pumped every refresh.
-     */
-    public int getBatchSize()
-    {
-        return m_batchSize;
-    }
-
-    /**
-     * Set the number events pumped every refresh.
-     * 
-     * @param batchSize the number events pumped every refresh.
-     */
-    public void setBatchSize( final int batchSize )
-    {
-        m_batchSize = batchSize;
-    }
-
-   /**
-    * Return the name.
-    *
-    * @return the name
-    */
-    public String getName()
-    {
-        return m_name;
-    }
-}
</pre></div>
<hr /><a name="file15" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>EventPumpRunner.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventPumpRunner.java
--- EventPumpRunner.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,143 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event.impl;
-
-/**
- * The EventPumpRunner will refresh specified Event pumps until deactivated.
- * This essentially means that the Runner can be used to run a single EventPump
- * or a set of event pumps in series.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public class EventPumpRunner
-    implements Runnable
-{
-    /** The set of pumps this runner will refresh. */
-    final EventPump[] _eventPumps;
-
-    /** Flag indicating runner has started. */
-    boolean _started;
-
-    /** Flag indicating runner has finished. */
-    boolean _finished;
-
-    /** Flag indicating runner is active. */
-    boolean _active;
-
-    /**
-     * Create the runner for specified pumps.
-     * 
-     * @param eventPumps the pumps
-     */
-    public EventPumpRunner( final EventPump[] eventPumps )
-    {
-        if( null == eventPumps )
-        {
-            throw new NullPointerException( "eventPumps" );
-        }
-        for( int i = 0; i &lt; eventPumps.length; i++ )
-        {
-            if( null == eventPumps[ i ] )
-            {
-                throw new NullPointerException( "eventPumps[" + i + "]" );
-            }
-        }
-        _eventPumps = eventPumps;
-    }
-
-    /**
-     * Return true if pump has started.
-     * 
-     * @return true if pump has started.
-     */
-    public synchronized boolean isStarted()
-    {
-        return _started;
-    }
-
-    /**
-     * Wait until pump has started.
-     */
-    public synchronized void waitUntilStarted()
-    {
-        while( !isStarted() )
-        {
-            try
-            {
-                wait();
-            }
-            catch( final InterruptedException ie )
-            {
-            }
-        }
-    }
-
-    /**
-     * Return true if pump is active.
-     * 
-     * @return true if pump is active.
-     */
-    public synchronized boolean isActive()
-    {
-        return _active;
-    }
-
-    /**
-     * Signal for the pump to shutdown and wait till deactivation occurs.
-     */
-    public synchronized void deactivate()
-    {
-        _active = false;
-        while( !_finished )
-        {
-            try
-            {
-                wait();
-            }
-            catch( final InterruptedException ie )
-            {
-            }
-        }
-    }
-
-    /**
-     * Actually run the pumps.
-     */
-    public void run()
-    {
-        synchronized( this )
-        {
-            _started = true;
-            _active = true;
-            notifyAll();
-        }
-
-        while( isActive() )
-        {
-            refresh();
-        }
-
-        synchronized( this )
-        {
-            _finished = true;
-            notifyAll();
-        }
-    }
-
-    /**
-     * Perform a refresh on all contained EventPumps.
-     */
-    public void refresh()
-    {
-        for( int i = 0; i &lt; _eventPumps.length; i++ )
-        {
-            _eventPumps[ i ].refresh();
-        }
-    }
-}
</pre></div>
<hr /><a name="file16" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>NullEventSink.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N NullEventSink.java
--- NullEventSink.java	12 Jan 2004 03:03:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import org.codehaus.spice.event.EventSink;
-
-/**
- * A Null implementation of EventSink interface.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/01/12 03:03:50 $
- */
-public class NullEventSink
-    implements EventSink
-{
-    /**
-     * @see EventSink#addEvent(Object)
-     */
-    public boolean addEvent( final Object event )
-    {
-        return false;
-    }
-
-    /**
-     * @see EventSink#addEvents(Object[])
-     */
-    public boolean addEvents( final Object[] events )
-    {
-        return false;
-    }
-
-    /**
-     * @see EventSink#getSinkLock()
-     */
-    public Object getSinkLock()
-    {
-        return this;
-    }
-}
</pre></div>
<hr /><a name="file17" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>NullEventValve.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N NullEventValve.java
--- NullEventValve.java	16 Dec 2003 04:22:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event.impl;
-
-import org.codehaus.spice.event.EventValve;
-
-/**
- * A valve that accepts all events.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 04:22:50 $
- */
-public class NullEventValve
-    implements EventValve
-{
-    /** Constant for instance of null event valve. */
-    public static final NullEventValve VALVE = new NullEventValve();
-
-    /**
-     * @see EventValve#acceptEvent(Object)
-     */
-    public boolean acceptEvent( final Object event )
-    {
-        return true;
-    }
-
-    /**
-     * @see EventValve#acceptEvents(Object[])
-     */
-    public boolean acceptEvents( final Object[] events )
-    {
-        return true;
-    }
-}
</pre></div>
<hr /><a name="file18" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>ValveControlledSink.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N ValveControlledSink.java
--- ValveControlledSink.java	16 Dec 2003 04:22:17 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,107 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event.impl;
-
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.event.EventValve;
-
-/**
- * The ValveControlledSink passes events onto a destination sink unless they are
- * filtered out by a valve.
- * 
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2003/12/16 04:22:17 $
- */
-public class ValveControlledSink
-    implements EventSink
-{
-    /** The destination sink. */
-    EventSink m_sink;
-
-    /** The valve that controls whether event passed onto sink. */
-    EventValve m_valve;
-
-    /**
-     * Create valved sink terminating on specified sink with specified valve.
-     * 
-     * @param sink the sink
-     * @param valve the valve
-     */
-    public ValveControlledSink( final EventSink sink,
-                                final EventValve valve )
-    {
-        setSink( sink );
-        setValve( valve );
-    }
-
-    /**
-     * @see EventSink#addEvent(Object)
-     */
-    public boolean addEvent( final Object event )
-    {
-        if( !m_valve.acceptEvent( event ) )
-        {
-            return false;
-        }
-        else
-        {
-            return m_sink.addEvent( event );
-        }
-    }
-
-    /**
-     * @see EventSink#addEvents(Object[])
-     */
-    public boolean addEvents( final Object[] events )
-    {
-        if( !m_valve.acceptEvents( events ) )
-        {
-            return false;
-        }
-        else
-        {
-            return m_sink.addEvents( events );
-        }
-    }
-
-    /**
-     * @see EventSink#getSinkLock()
-     */
-    public Object getSinkLock()
-    {
-        return m_sink.getSinkLock();
-    }
-
-    /**
-     * Set the valve.
-     * 
-     * @param valve the valve.
-     */
-    public void setValve( final EventValve valve )
-    {
-        if( null == valve )
-        {
-            throw new NullPointerException( "valve" );
-        }
-        m_valve = valve;
-    }
-
-    /**
-     * Set the sink.
-     * 
-     * @param sink the sink.
-     */
-    private void setSink( final EventSink sink )
-    {
-        if( null == sink )
-        {
-            throw new NullPointerException( "sink" );
-        }
-        m_sink = sink;
-    }
-}
</pre></div>
<hr /><a name="file19" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl/collections<br /></span>
<div class="fileheader" id="removed"><big><b>AbstractFifoBuffer.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N AbstractFifoBuffer.java
--- AbstractFifoBuffer.java	5 Feb 2004 03:59:52 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,165 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event.impl.collections;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A unbounded FIFO Buffer implementation. This class is loosely based on the
- * Jakarta-Commons Collections package Buffer implementations.
- * 
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/02/05 03:59:52 $
- */
-public abstract class AbstractFifoBuffer
-    implements Buffer
-{
-    /**
-     * The underlying object array.
-     */
-    Object[] m_buffer;
-
-    /**
-     * The pointer to first element.
-     */
-    int m_head;
-
-    /**
-     * The pointer to last element.
-     */
-    int m_tail;
-
-    /**
-     * Flag indicating whether buffer is wrapped around.
-     */
-    boolean m_isWrappedBuffer;
-
-    /**
-     * Create a buffer with specified initial size.
-     * 
-     * @param size the initial size of the buffer
-     */
-    public AbstractFifoBuffer( final int size )
-    {
-        if( size &lt;= 0 )
-        {
-            throw new IllegalArgumentException( "size &lt;= 0" );
-        }
-        m_buffer = new Object[ size ];
-        m_head = 0;
-        m_tail = 0;
-    }
-
-    /**
-     * @see Buffer#size()
-     */
-    public int size()
-    {
-        if( m_isWrappedBuffer )
-        {
-            return m_buffer.length - m_head + m_tail;
-        }
-        else
-        {
-            return m_tail - m_head;
-        }
-    }
-
-    /**
-     * @see Buffer#addAll(Object[])
-     */
-    public boolean addAll( final Object[] objects )
-    {
-        if( null == objects )
-        {
-            throw new NullPointerException( "objects" );
-        }
-
-        return doAddAll( objects );
-    }
-
-    /**
-     * @see Buffer#add(Object)
-     */
-    public boolean add( final Object object )
-    {
-        if( null == object )
-        {
-            throw new NullPointerException( "object" );
-        }
-        return doAdd( object );
-    }
-
-    /**
-     * @see Buffer#peek()
-     */
-    public Object peek()
-    {
-        if( 0 == size() )
-        {
-            return null;
-        }
-        else
-        {
-            return m_buffer[ m_head ];
-        }
-    }
-
-    /**
-     * @see Buffer#pop()
-     */
-    public Object pop()
-    {
-        final Object element = peek();
-        if( null != element )
-        {
-            m_buffer[ m_head ] = null;
-
-            m_head++;
-            if( m_head &gt;= m_buffer.length )
-            {
-                m_head = 0;
-                m_isWrappedBuffer = false;
-            }
-        }
-
-        return element;
-    }
-
-    /**
-     * Perform addition of objects to buffer.
-     * 
-     * @param objects the objects
-     * @return true if addition successful
-     */
-    protected abstract boolean doAddAll( Object[] objects );
-
-    /**
-     * Perform addition of object to buffer.
-     * 
-     * @param object the object
-     * @return true if addition successful
-     */
-    protected abstract boolean doAdd( Object object );
-
-    /**
-     * @see Buffer#toList()
-     */
-    public List toList()
-    {
-        final int count = size();
-        final ArrayList result = new ArrayList( count );
-        for( int i = 0; i &lt; count; i++ )
-        {
-            final int index = (m_head + i) % m_buffer.length;
-            result.add( m_buffer[ index ] );
-        }
-        return result;
-    }
-}
</pre></div>
<hr /><a name="file20" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl/collections<br /></span>
<div class="fileheader" id="removed"><big><b>BoundedFifoBuffer.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N BoundedFifoBuffer.java
--- BoundedFifoBuffer.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,69 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event.impl.collections;
-
-/**
- * A bounded FIFO Buffer implementation.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public final class BoundedFifoBuffer
-    extends AbstractFifoBuffer
-{
-    /**
-     * Create a buffer with specified size.
-     * 
-     * @param size the size of the buffer
-     */
-    public BoundedFifoBuffer( final int size )
-    {
-        super( size );
-    }
-
-    /**
-     * @see AbstractFifoBuffer#doAddAll(Object[])
-     */
-    protected boolean doAddAll( final Object[] objects )
-    {
-        if( size() + objects.length &gt; m_buffer.length )
-        {
-            return false;
-        }
-        else
-        {
-            for( int i = 0; i &lt; objects.length; i++ )
-            {
-                add( objects[ i ] );
-            }
-            return true;
-        }
-    }
-
-    /**
-     * @see AbstractFifoBuffer#doAdd(Object)
-     */
-    protected boolean doAdd( final Object object )
-    {
-        if( size() + 1 &gt; m_buffer.length )
-        {
-            return false;
-        }
-        else
-        {
-            m_buffer[ m_tail ] = object;
-            m_tail++;
-            if( m_tail &gt;= m_buffer.length )
-            {
-                m_tail = 0;
-                m_isWrappedBuffer = true;
-            }
-            return true;
-        }
-    }
-}
</pre></div>
<hr /><a name="file21" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl/collections<br /></span>
<div class="fileheader" id="removed"><big><b>Buffer.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N Buffer.java
--- Buffer.java	5 Feb 2004 03:59:52 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,66 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event.impl.collections;
-
-import java.nio.BufferUnderflowException;
-import java.util.List;
-
-/**
- * Simple Buffer interface.
- * 
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/02/05 03:59:52 $
- */
-public interface Buffer
-{
-    /**
-     * Adds the object to the buffer.
-     * 
-     * @param object the object to add
-     * @return true
-     */
-    boolean add( Object object );
-
-    /**
-     * Adds the objects to the buffer.
-     * 
-     * @param objects the objects to add
-     * @return true
-     */
-    boolean addAll( Object[] objects );
-
-    /**
-     * Returns next object.
-     * 
-     * @return the next object
-     * @throws BufferUnderflowException if the buffer is empty
-     */
-    Object peek();
-
-    /**
-     * Returns next object and removes from the buffer.
-     * 
-     * @return the next object
-     * @throws BufferUnderflowException if the buffer is empty
-     */
-    Object pop();
-
-    /**
-     * Return the number of objects that are stored in buffer.
-     * 
-     * @return the number of objects that are stored in buffer.
-     */
-    int size();
-
-    /**
-     * Convert buffer into a list of objects.
-     *
-     * @return the list of objects
-     */
-    List toList();
-}
</pre></div>
<hr /><a name="file22" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/java/org/codehaus/spice/event/impl/collections<br /></span>
<div class="fileheader" id="removed"><big><b>UnboundedFifoBuffer.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N UnboundedFifoBuffer.java
--- UnboundedFifoBuffer.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,80 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event.impl.collections;
-
-/**
- * A unbounded FIFO Buffer implementation.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public final class UnboundedFifoBuffer
-    extends AbstractFifoBuffer
-{
-    /**
-     * Create a buffer with specified initial size.
-     * 
-     * @param size the initial size of the buffer
-     */
-    public UnboundedFifoBuffer( final int size )
-    {
-        super( size );
-    }
-
-    /**
-     * @see AbstractFifoBuffer#doAddAll(Object[])
-     */
-    protected boolean doAddAll( final Object[] objects )
-    {
-        for( int i = 0; i &lt; objects.length; i++ )
-        {
-            add( objects[ i ] );
-        }
-        return true;
-    }
-
-    /**
-     * @see AbstractFifoBuffer#doAdd(Object)
-     */
-    protected boolean doAdd( final Object object )
-    {
-        if( size() + 1 &gt;= m_buffer.length )
-        {
-            final int newSize = ((m_buffer.length - 1) * 2) + 1;
-            final Object[] tmp = new Object[ newSize ];
-
-            int j = 0;
-            for( int i = m_head; i != m_tail; )
-            {
-                tmp[ j ] = m_buffer[ i ];
-                m_buffer[ i ] = null;
-
-                j++;
-                i++;
-                if( i == m_buffer.length )
-                {
-                    i = 0;
-                }
-            }
-
-            m_buffer = tmp;
-            m_head = 0;
-            m_tail = j;
-            m_isWrappedBuffer = false;
-        }
-
-        m_buffer[ m_tail ] = object;
-        m_tail++;
-        if( m_tail &gt;= m_buffer.length )
-        {
-            m_tail = 0;
-            m_isWrappedBuffer = true;
-        }
-        return true;
-    }
-}
</pre></div>
<hr /><a name="file23" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>DummyEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N DummyEvent.java
--- DummyEvent.java	19 Apr 2004 08:05:36 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event;
-
-public class DummyEvent
-    extends AbstractEvent
-{
-    protected String getEventDescription()
-    {
-        return "Blah";
-    }
-}
</pre></div>
<hr /><a name="file24" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>DummyEventHandler.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N DummyEventHandler.java
--- DummyEventHandler.java	19 Apr 2004 08:05:36 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/04/19 08:05:36 $
- */
-public class DummyEventHandler
-    extends AbstractEventHandler
-{
-    private int _callCount;
-
-    public int getCallCount()
-    {
-        return _callCount;
-    }
-
-    public void handleEvent( final Object event )
-    {
-        _callCount++;
-    }
-}
</pre></div>
<hr /><a name="file25" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>DummyEventSource.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N DummyEventSource.java
--- DummyEventSource.java	19 Apr 2004 08:25:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/04/19 08:25:55 $
- */
-public class DummyEventSource
-    implements EventSource
-{
-    public Object[] getEvents( final int count )
-    {
-        return new Object[]{getEvent()};
-    }
-
-    public Object getSourceLock()
-    {
-        return this;
-    }
-
-    public Object getEvent()
-    {
-        return "Event";
-    }
-}
</pre></div>
<hr /><a name="file26" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>EventHandlerTestCase.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventHandlerTestCase.java
--- EventHandlerTestCase.java	19 Apr 2004 08:05:36 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event;
-
-import junit.framework.TestCase;
-
-public class EventHandlerTestCase
-    extends TestCase
-{
-    public void testGetEvents()
-    {
-        final DummyEventHandler handler = new DummyEventHandler();
-        assertEquals( "A handler.getCallCount()", 0, handler.getCallCount() );
-        handler.handleEvent( new Object() );
-        assertEquals( "B handler.getCallCount()", 1, handler.getCallCount() );
-        handler.handleEvents( new Object[]{new Object(), new Object()} );
-        assertEquals( "C handler.getCallCount()", 3, handler.getCallCount() );
-    }
-}
</pre></div>
<hr /><a name="file27" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event<br /></span>
<div class="fileheader" id="removed"><big><b>EventTestCase.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventTestCase.java
--- EventTestCase.java	19 Apr 2004 08:05:36 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event;
-
-import junit.framework.TestCase;
-
-public class EventTestCase
-    extends TestCase
-{
-    public void testGetShortName()
-    {
-        final DummyEvent handler = new DummyEvent();
-        assertEquals( "getShortName()", "DummyEvent", handler.getShortName() );
-    }
-
-    public void testGetString()
-    {
-        final DummyEvent handler = new DummyEvent();
-        assertEquals( "toString()", "DummyEvent[Blah]", handler.toString() );
-    }
-}
</pre></div>
<hr /><a name="file28" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>BlockingEventSourceTestCase.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N BlockingEventSourceTestCase.java
--- BlockingEventSourceTestCase.java	17 May 2004 03:52:23 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,138 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import junit.framework.TestCase;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/05/17 03:52:23 $
- */
-public class BlockingEventSourceTestCase
-    extends TestCase
-{
-    private Object m_result;
-    private boolean m_started;
-    private boolean m_returned;
-
-    public void testNull_buffer_PassedIntoCtor()
-        throws Exception
-    {
-        try
-        {
-            new BlockingEventSource( null, 0 );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "source", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing source into Ctor" );
-    }
-
-    public void testEternallyBlocked()
-        throws Exception
-    {
-        final BlockingTestEventSource base = new BlockingTestEventSource();
-        final BlockingEventSource source = new BlockingEventSource( base, 0 );
-
-        final Runnable runnable = new Runnable()
-        {
-            public void run()
-            {
-                m_result = source.getEvent();
-            }
-        };
-
-        final Thread thread = startThread( runnable );
-        Thread.sleep( 30 );
-        assertEquals( "Eternally Blocking - Locked - has returned?",
-                      false,
-                      m_returned );
-        assertEquals( "Eternally Blocking - Locked",
-                      null,
-                      m_result );
-        base.unlock();
-        Thread.sleep( 2 );
-        assertEquals( "Eternally Blocking - UnLocked - has returned?",
-                      true,
-                      m_returned );
-        assertEquals( "Eternally Blocking - UnLocked",
-                      BlockingTestEventSource.EVENT,
-                      m_result );
-        destroy( thread );
-    }
-
-    private void destroy( final Thread thread )
-        throws InterruptedException
-    {
-        thread.interrupt();
-        thread.join();
-    }
-
-    public void testTimeBlocked()
-        throws Exception
-    {
-        final BlockingTestEventSource base = new BlockingTestEventSource();
-        final BlockingEventSource source = new BlockingEventSource( base, 200 );
-
-        final Runnable runnable = new Runnable()
-        {
-            public void run()
-            {
-                m_result = source.getEvent();
-            }
-        };
-
-        final Thread thread = startThread( runnable );
-        Thread.sleep( 30 );
-        assertEquals( "Pre-Timeout Blocking - Locked - has returned?",
-                      false,
-                      m_returned );
-        assertEquals( "Pre-Timeout Blocking - Locked",
-                      null,
-                      m_result );
-        Thread.sleep( 300 );
-        assertEquals( "Post-Timeout Blocking has returned?",
-                      true,
-                      m_returned );
-        assertEquals( "Post-Timeout Blocking",
-                      null,
-                      m_result );
-        destroy( thread );
-
-        final Thread thread2 = startThread( runnable );
-        base.unlock();
-        assertEquals( "UnLocked - has returned?",
-                      true,
-                      m_returned );
-        assertEquals( "UnLocked result?",
-                      BlockingTestEventSource.EVENT,
-                      m_result );
-        destroy( thread2 );
-    }
-
-    private Thread startThread( final Runnable runnable )
-        throws InterruptedException
-    {
-        final Runnable work = new Runnable()
-        {
-            public void run()
-            {
-                m_started = true;
-                runnable.run();
-                m_returned = true;
-            }
-        };
-
-        m_result = null;
-        m_returned = false;
-        m_started = false;
-        final Thread thread = new Thread( work );
-        thread.start();
-        while( false == m_started )
-        {
-            Thread.sleep( 2 );
-        }
-
-        return thread;
-    }
-}
</pre></div>
<hr /><a name="file29" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>BlockingTestEventSource.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N BlockingTestEventSource.java
--- BlockingTestEventSource.java	17 May 2004 03:52:23 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,45 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import org.codehaus.spice.event.EventSource;
-
-class BlockingTestEventSource
-    implements EventSource
-{
-    static final Object EVENT = new Object();
-    static final Object[] EVENTS = new Object[] {EVENT};
-
-    private final Object m_lock = new Object();
-    private boolean m_unlocked;
-
-    void unlock()
-    {
-        m_unlocked = true;
-        synchronized( m_lock )
-        {
-            m_lock.notifyAll();
-        }
-    }
-
-    public Object getEvent()
-    {
-        if( m_unlocked )
-        {
-            return EVENT;
-        }
-        return null;
-    }
-
-    public Object[] getEvents( int count )
-    {
-        if( m_unlocked )
-        {
-            return EVENTS;
-        }
-        return new Object[0];
-    }
-
-    public Object getSourceLock()
-    {
-        return m_lock;
-    }
-}
</pre></div>
<hr /><a name="file30" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>DefaultEventQueueTestCase.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N DefaultEventQueueTestCase.java
--- DefaultEventQueueTestCase.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,189 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import junit.framework.TestCase;
-import org.codehaus.spice.event.impl.collections.Buffer;
-import org.jmock.C;
-import org.jmock.Mock;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public class DefaultEventQueueTestCase
-    extends TestCase
-{
-    public void testNull_buffer_PassedIntoCtor()
-        throws Exception
-    {
-        try
-        {
-            new DefaultEventQueue( null );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "buffer", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing buffer into Ctor" );
-    }
-
-    public void testCreation()
-        throws Exception
-    {
-        final Mock mockBuffer = new Mock( Buffer.class );
-        final Buffer buffer = (Buffer)mockBuffer.proxy();
-        final DefaultEventQueue queue = new DefaultEventQueue( buffer );
-        assertEquals( "buffer", buffer, queue.getBuffer() );
-    }
-
-    public void testAddEventSuccessfully()
-        throws Exception
-    {
-        final Object object = new Object();
-
-        final Mock mockBuffer = new Mock( Buffer.class );
-        mockBuffer.expectAndReturn( "add", C.args( C.eq( object ) ), true );
-        final Buffer buffer = (Buffer)mockBuffer.proxy();
-        final DefaultEventQueue queue = new DefaultEventQueue( buffer );
-
-        final LockChecker checker = new LockChecker( queue.getSourceLock() );
-        assertEquals( "Lock Notified pre-add", false, checker.isUnlocked() );
-        assertEquals( "queue.addEvent( object )", true,
-                      queue.addEvent( object ) );
-        assertEquals( "Lock Notified  post-add", true, checker.isUnlocked() );
-
-        mockBuffer.verify();
-    }
-
-    public void testAddEventUnsuccessfully()
-        throws Exception
-    {
-        final Object object = new Object();
-
-        final Mock mockBuffer = new Mock( Buffer.class );
-        mockBuffer.expectAndReturn( "add", C.args( C.eq( object ) ), false );
-        final Buffer buffer = (Buffer)mockBuffer.proxy();
-        final DefaultEventQueue queue = new DefaultEventQueue( buffer );
-
-        final LockChecker checker = new LockChecker( queue.getSourceLock() );
-        assertEquals( "Lock Notified pre-add", false, checker.isUnlocked() );
-        assertEquals( "queue.addEvent( object )", false,
-                      queue.addEvent( object ) );
-        assertEquals( "Lock Notified  post-add", false, checker.isUnlocked() );
-
-        mockBuffer.verify();
-    }
-
-    public void testAddEventsSuccessfully()
-        throws Exception
-    {
-        final Object[] objects = new Object[ 0 ];
-
-        final Mock mockBuffer = new Mock( Buffer.class );
-        mockBuffer.expectAndReturn( "addAll", C.args( C.eq( objects ) ), true );
-        final Buffer buffer = (Buffer)mockBuffer.proxy();
-        final DefaultEventQueue queue = new DefaultEventQueue( buffer );
-
-        final LockChecker checker = new LockChecker( queue.getSourceLock() );
-        assertEquals( "Lock Notified pre-add", false, checker.isUnlocked() );
-        assertEquals( "queue.addEvents( objects )", true,
-                      queue.addEvents( objects ) );
-        assertEquals( "Lock Notified  post-add", true, checker.isUnlocked() );
-
-        mockBuffer.verify();
-    }
-
-    public void testAddEventsUnsuccessfully()
-        throws Exception
-    {
-        final Object[] objects = new Object[ 0 ];
-
-        final Mock mockBuffer = new Mock( Buffer.class );
-        mockBuffer.expectAndReturn( "addAll", C.args( C.eq( objects ) ), false );
-        final Buffer buffer = (Buffer)mockBuffer.proxy();
-        final DefaultEventQueue queue = new DefaultEventQueue( buffer );
-
-        final LockChecker checker = new LockChecker( queue.getSourceLock() );
-        assertEquals( "Lock Notified pre-add", false, checker.isUnlocked() );
-        assertEquals( "queue.addEvents( objects )", false,
-                      queue.addEvents( objects ) );
-        assertEquals( "Lock Notified  post-add", false, checker.isUnlocked() );
-
-        mockBuffer.verify();
-    }
-
-    public void testGetEventSuccessfully()
-        throws Exception
-    {
-        final Object object = new Object();
-
-        final Mock mockBuffer = new Mock( Buffer.class );
-        mockBuffer.expectAndReturn( "size", 1 );
-        mockBuffer.expectAndReturn( "pop", object );
-        final Buffer buffer = (Buffer)mockBuffer.proxy();
-
-        final DefaultEventQueue queue = new DefaultEventQueue( buffer );
-        final LockChecker checker = new LockChecker( queue.getSinkLock() );
-        assertEquals( "Lock Notified pre-add", false, checker.isUnlocked() );
-        assertEquals( "queue.getEvent()", object, queue.getEvent() );
-        assertEquals( "Lock Notified  post-add", true, checker.isUnlocked() );
-
-        mockBuffer.verify();
-    }
-
-    public void testGetEventUnsuccessfully()
-        throws Exception
-    {
-        final Mock mockBuffer = new Mock( Buffer.class );
-        mockBuffer.expectAndReturn( "size", 0 );
-        final Buffer buffer = (Buffer)mockBuffer.proxy();
-
-        final DefaultEventQueue queue = new DefaultEventQueue( buffer );
-        final LockChecker checker = new LockChecker( queue.getSinkLock() );
-        assertEquals( "Lock Notified pre-add", false, checker.isUnlocked() );
-        assertEquals( "queue.getEvent()", null, queue.getEvent() );
-        assertEquals( "Lock Notified  post-add", false, checker.isUnlocked() );
-
-        mockBuffer.verify();
-    }
-
-    public void testGetEventsSuccessfully()
-        throws Exception
-    {
-        final Object object = new Object();
-
-        final Mock mockBuffer = new Mock( Buffer.class );
-        mockBuffer.expectAndReturn( "size", 1 );
-        mockBuffer.expectAndReturn( "pop", object );
-        final Buffer buffer = (Buffer)mockBuffer.proxy();
-
-        final DefaultEventQueue queue = new DefaultEventQueue( buffer );
-        final LockChecker checker = new LockChecker( queue.getSinkLock() );
-        assertEquals( "Lock Notified pre-add", false, checker.isUnlocked() );
-        final Object[] events = queue.getEvents( 20 );
-        assertEquals( "Lock Notified  post-add", true, checker.isUnlocked() );
-
-        assertEquals( "events.length", 1, events.length );
-        assertEquals( "events[ 0 ]", object, events[ 0 ] );
-
-        mockBuffer.verify();
-    }
-
-    public void testGetEventsUnsuccessfully()
-        throws Exception
-    {
-        final Mock mockBuffer = new Mock( Buffer.class );
-        mockBuffer.expectAndReturn( "size", 0 );
-        final Buffer buffer = (Buffer)mockBuffer.proxy();
-
-        final DefaultEventQueue queue = new DefaultEventQueue( buffer );
-        final LockChecker checker = new LockChecker( queue.getSinkLock() );
-        assertEquals( "Lock Notified pre-add", false, checker.isUnlocked() );
-        final Object[] events = queue.getEvents( 20 );
-        assertEquals( "Lock Notified  post-add", false, checker.isUnlocked() );
-
-        assertEquals( "events.length", 0, events.length );
-
-        mockBuffer.verify();
-    }
-}
</pre></div>
<hr /><a name="file31" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>DummyEventSource.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N DummyEventSource.java
--- DummyEventSource.java	12 May 2004 08:04:09 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import org.codehaus.spice.event.EventJoin;
-
-class DummyEventSource
-    extends AbstractEventSource
-{
-    private boolean m_refreshCall;
-    private boolean m_openCall;
-    private boolean m_closeCall;
-
-    public DummyEventSource( final EventJoin join )
-    {
-        super( join );
-    }
-
-    public void open()
-        throws Exception
-    {
-        super.open();
-        m_openCall = true;
-    }
-
-    public void close()
-        throws Exception
-    {
-        super.close();
-        m_closeCall = true;
-    }
-
-    protected void refresh()
-    {
-        m_refreshCall = true;
-    }
-
-    public boolean isRefreshCall()
-    {
-        return m_refreshCall;
-    }
-
-    public boolean isOpenCall()
-    {
-        return m_openCall;
-    }
-
-    public boolean isCloseCall()
-    {
-        return m_closeCall;
-    }
-}
</pre></div>
<hr /><a name="file32" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>EventPumpRunnerTestCase.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N EventPumpRunnerTestCase.java
--- EventPumpRunnerTestCase.java	19 Apr 2004 08:25:54 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,95 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import junit.framework.TestCase;
-import org.codehaus.spice.event.DummyEventHandler;
-import org.codehaus.spice.event.DummyEventSource;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/04/19 08:25:54 $
- */
-public class EventPumpRunnerTestCase
-    extends TestCase
-{
-    public void testNull_eventPumps_PassedIntoCtor() throws Exception
-    {
-        try
-        {
-            new EventPumpRunner( null );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "eventPumps", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing eventPumps into Ctor" );
-    }
-
-    public void testNull_eventPumps_ElementPassedIntoCtor() throws Exception
-    {
-        try
-        {
-            new EventPumpRunner( new EventPump[ 1 ] );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()",
-                          "eventPumps[0]",
-                          npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing eventPumps[0] into Ctor" );
-    }
-
-    public void testCreation() throws Exception
-    {
-        final EventPump[] eventPumps = new EventPump[ 0 ];
-        final EventPumpRunner runner = new EventPumpRunner( eventPumps );
-        assertEquals( "runner._eventPumps", eventPumps, runner._eventPumps );
-    }
-
-    public void testStartThenDeactivate() throws Exception
-    {
-        final EventPump[] eventPumps = new EventPump[ 0 ];
-        final EventPumpRunner runner = new EventPumpRunner( eventPumps );
-
-        synchronized( runner )
-        {
-            final Thread thread = new Thread( runner );
-            thread.start();
-            runner.waitUntilStarted();
-        }
-        assertEquals( "runner._started", true, runner._started );
-        assertEquals( "runner._active", true, runner._active );
-        runner.deactivate();
-        assertEquals( "runner._finished", true, runner._finished );
-        assertEquals( "runner._active", false, runner._active );
-    }
-
-    public void testSimpleRun() throws Exception
-    {
-        final DummyEventHandler eventHandler = new DummyEventHandler();
-        final DummyEventSource source = new DummyEventSource();
-        final EventPump pump = new EventPump( source, eventHandler );
-        final EventPump[] eventPumps = new EventPump[]{pump};
-        final EventPumpRunner runner = new EventPumpRunner( eventPumps );
-
-        synchronized( runner )
-        {
-            final Thread thread = new Thread( runner );
-            thread.start();
-            runner.waitUntilStarted();
-        }
-
-        assertEquals( "runner._started", true, runner._started );
-        assertEquals( "runner._active", true, runner._active );
-        Thread.sleep( 30 );
-
-        assertTrue( "eventHandler.getCallCount() &gt; 0",
-                    eventHandler.getCallCount() &gt; 0 );
-
-        runner.deactivate();
-        assertEquals( "runner._finished", true, runner._finished );
-        assertEquals( "runner._active", false, runner._active );
-    }
-}
</pre></div>
<hr /><a name="file33" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>EventPumpTestCase.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N EventPumpTestCase.java
--- EventPumpTestCase.java	19 Apr 2004 07:30:02 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,191 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import junit.framework.TestCase;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSource;
-import org.jmock.C;
-import org.jmock.Mock;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/04/19 07:30:02 $
- */
-public class EventPumpTestCase
-    extends TestCase
-{
-    public void testName_PassedIntoCtor() throws Exception
-    {
-        final Mock mockHandler = new Mock( EventHandler.class );
-        final EventHandler handler = (EventHandler) mockHandler.proxy();
-        final Mock mockSource = new Mock( EventSource.class );
-        final EventSource source = (EventSource) mockSource.proxy();
-        final String name = "Fred";
-        final EventPump pump = new EventPump( name, source, handler );
-        assertEquals( "pump.getName()", name, pump.getName() );
-    }
-
-    public void testNull_name_PassedIntoCtor() throws Exception
-    {
-        final Mock mockHandler = new Mock( EventHandler.class );
-        final EventHandler handler = (EventHandler) mockHandler.proxy();
-        final Mock mockSource = new Mock( EventSource.class );
-        final EventSource source = (EventSource) mockSource.proxy();
-        try
-        {
-            new EventPump( null, source, handler );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "name", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing source into Ctor" );
-    }
-
-    public void testNull_source_PassedIntoCtor() throws Exception
-    {
-        final Mock mockHandler = new Mock( EventHandler.class );
-        final EventHandler handler = (EventHandler) mockHandler.proxy();
-        try
-        {
-            new EventPump( null, handler );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "source", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing source into Ctor" );
-    }
-
-    public void testNull_handler_PassedIntoCtor() throws Exception
-    {
-        final Mock mockSource = new Mock( EventSource.class );
-        final EventSource source = (EventSource) mockSource.proxy();
-        try
-        {
-            new EventPump( source, null );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "handler", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing handler into Ctor" );
-    }
-
-    public void testCreation() throws Exception
-    {
-        final Mock mockSource = new Mock( EventSource.class );
-        final EventSource source = (EventSource) mockSource.proxy();
-
-        final Mock mockHandler = new Mock( EventHandler.class );
-        final EventHandler handler = (EventHandler) mockHandler.proxy();
-
-        final EventPump pump = new EventPump( source, handler );
-        assertEquals( "pump.m_source", source, pump.m_source );
-        assertEquals( "pump.m_handler", handler, pump.m_handler );
-
-        mockHandler.verify();
-        mockSource.verify();
-    }
-
-    public void testSetBatchCount() throws Exception
-    {
-        final Mock mockSource = new Mock( EventSource.class );
-        final EventSource source = (EventSource) mockSource.proxy();
-
-        final Mock mockHandler = new Mock( EventHandler.class );
-        final EventHandler handler = (EventHandler) mockHandler.proxy();
-
-        final EventPump pump = new EventPump( source, handler );
-        assertEquals( "batchSize", Integer.MAX_VALUE, pump.getBatchSize() );
-        pump.setBatchSize( 15 );
-        assertEquals( "batchSize", 15, pump.getBatchSize() );
-
-        mockHandler.verify();
-        mockSource.verify();
-    }
-
-    public void testRefreshNonBatchedWithHandling() throws Exception
-    {
-        final Object event = new Object();
-        final Mock mockSource = new Mock( EventSource.class );
-        mockSource.expectAndReturn( "getEvent", event );
-        final EventSource source = (EventSource) mockSource.proxy();
-
-        final Mock mockHandler = new Mock( EventHandler.class );
-        mockHandler.expect( "handleEvent", C.args( C.eq( event ) ) );
-        final EventHandler handler = (EventHandler) mockHandler.proxy();
-
-        final EventPump pump = new EventPump( source, handler );
-        pump.setBatchSize( 1 );
-
-        pump.refresh();
-
-        mockHandler.verify();
-        mockSource.verify();
-    }
-
-    public void testRefreshNonBatchedWithNoHandling() throws Exception
-    {
-        final Mock mockSource = new Mock( EventSource.class );
-        mockSource.expectAndReturn( "getEvent", null );
-        final EventSource source = (EventSource) mockSource.proxy();
-
-        final Mock mockHandler = new Mock( EventHandler.class );
-        final EventHandler handler = (EventHandler) mockHandler.proxy();
-
-        final EventPump pump = new EventPump( source, handler );
-        pump.setBatchSize( 1 );
-
-        pump.refresh();
-
-        mockHandler.verify();
-        mockSource.verify();
-    }
-
-    public void testRefreshBatchedWithHandling() throws Exception
-    {
-        final Object event = new Object();
-        final Object[] events = new Object[]{event};
-        final Mock mockSource = new Mock( EventSource.class );
-        mockSource.expectAndReturn( "getEvents",
-                                    C.args( C.eq( 20 ) ),
-                                    events );
-        final EventSource source = (EventSource) mockSource.proxy();
-
-        final Mock mockHandler = new Mock( EventHandler.class );
-        mockHandler.expect( "handleEvents", C.args( C.eq( events ) ) );
-        final EventHandler handler = (EventHandler) mockHandler.proxy();
-
-        final EventPump pump = new EventPump( source, handler );
-        pump.setBatchSize( 20 );
-
-        pump.refresh();
-
-        mockHandler.verify();
-        mockSource.verify();
-    }
-
-    public void testRefreshBatchedWithNoHandling() throws Exception
-    {
-        final Object[] events = new Object[ 0 ];
-        final Mock mockSource = new Mock( EventSource.class );
-        mockSource.expectAndReturn( "getEvents",
-                                    C.args( C.eq( 20 ) ),
-                                    events );
-        final EventSource source = (EventSource) mockSource.proxy();
-
-        final Mock mockHandler = new Mock( EventHandler.class );
-        final EventHandler handler = (EventHandler) mockHandler.proxy();
-
-        final EventPump pump = new EventPump( source, handler );
-        pump.setBatchSize( 20 );
-
-        pump.refresh();
-
-        mockHandler.verify();
-        mockSource.verify();
-    }
-}
</pre></div>
<hr /><a name="file34" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>EventSourceTestCase.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventSourceTestCase.java
--- EventSourceTestCase.java	12 May 2004 08:04:09 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,67 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import junit.framework.TestCase;
-import org.codehaus.spice.event.EventJoin;
-import org.jmock.C;
-import org.jmock.Mock;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/05/12 08:04:09 $
- */
-public class EventSourceTestCase
-    extends TestCase
-{
-    public void testNull_buffer_PassedIntoCtor()
-        throws Exception
-    {
-        try
-        {
-            new DummyEventSource( null );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "join", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing join into Ctor" );
-    }
-
-    public void testAddEventSuccessfully()
-        throws Exception
-    {
-        final Object lock = new Object();
-        final Object event = new Object();
-        final Object[] events = new Object[]{event};
-
-        final Mock mockBuffer = new Mock( EventJoin.class );
-        mockBuffer.expectAndReturn( "getEvent", event );
-        mockBuffer.expectAndReturn( "getEvents", C.ANY_ARGS, events );
-        mockBuffer.expectAndReturn( "getSourceLock", C.NO_ARGS, lock );
-
-        final EventJoin join = (EventJoin) mockBuffer.proxy();
-        final DummyEventSource source = new DummyEventSource( join );
-
-        assertEquals( "PreOpen: isOpenCalled()", false, source.isOpenCall() );
-        source.open();
-        assertEquals( "PostOpen: isOpenCalled()", true, source.isOpenCall() );
-
-        assertEquals( "PreRefresh: isRefreshCalled()", false, source.isRefreshCall() );
-        source.refresh();
-        assertEquals( "PostRefresh: isRefreshCalled()", true, source.isRefreshCall() );
-
-        assertEquals( "PreClose: isCloseCalled()", false, source.isCloseCall() );
-        source.close();
-        assertEquals( "PostClose: isCloseCalled()", true, source.isCloseCall() );
-
-        assertEquals( "getSourceLock()", lock, source.getSourceLock() );
-
-        assertEquals( "getJoin()", join, source.getJoin() );
-
-        assertEquals( "getEvent()", event, source.getEvent() );
-
-        assertEquals( "getEvents()", events, source.getEvents( 1 ) );
-
-        mockBuffer.verify();
-    }
-}
</pre></div>
<hr /><a name="file35" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>LockChecker.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N LockChecker.java
--- LockChecker.java	12 May 2004 07:22:48 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/05/12 07:22:48 $
- */
-class LockChecker
-    implements Runnable
-{
-    private final Object _lock;
-    private boolean _unlocked;
-    private boolean _started;
-
-    LockChecker( final Object lock )
-    {
-        _lock = lock;
-        final Thread thread = new Thread( this );
-        thread.start();
-        while( !_started )
-        {
-            Thread.yield();
-        }
-    }
-
-    public void run()
-    {
-        synchronized( _lock )
-        {
-            _started = true;
-            try
-            {
-                _lock.wait();
-                _unlocked = true;
-            }
-            catch( InterruptedException e )
-            {
-            }
-        }
-    }
-
-    boolean isUnlocked()
-    {
-        try
-        {
-            Thread.sleep( 1 );
-        }
-        catch( InterruptedException e )
-        {
-        }
-        return _unlocked;
-    }
-}
</pre></div>
<hr /><a name="file36" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>NullEventSinkTestCase.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N NullEventSinkTestCase.java
--- NullEventSinkTestCase.java	19 Apr 2004 08:16:59 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import junit.framework.TestCase;
-
-public class NullEventSinkTestCase
-    extends TestCase
-{
-    public void testGetEvents()
-    {
-        final NullEventSink sink = new NullEventSink();
-        assertEquals( "getSinkLock()", sink, sink.getSinkLock() );
-        assertEquals( "addEvent()", false, sink.addEvent( new Object() ) );
-        assertEquals( "addEvents()",
-                      false,
-                      sink.addEvents( new Object[]{new Object()} ) );
-    }
-}
</pre></div>
<hr /><a name="file37" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>NullEventValveTestCase.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N NullEventValveTestCase.java
--- NullEventValveTestCase.java	19 Apr 2004 08:24:44 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import junit.framework.TestCase;
-
-public class NullEventValveTestCase
-    extends TestCase
-{
-    public void testGetEvents()
-    {
-        final NullEventValve sink = new NullEventValve();
-        assertEquals( "acceptEvent()",
-                      true,
-                      sink.acceptEvent( new Object() ) );
-        assertEquals( "acceptEvents()",
-                      true,
-                      sink.acceptEvents( new Object[]{new Object()} ) );
-    }
-}
</pre></div>
<hr /><a name="file38" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl<br /></span>
<div class="fileheader" id="removed"><big><b>ValveControlledSinkTestCase.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N ValveControlledSinkTestCase.java
--- ValveControlledSinkTestCase.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,171 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl;
-
-import junit.framework.TestCase;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.event.EventValve;
-import org.jmock.C;
-import org.jmock.Mock;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public class ValveControlledSinkTestCase
-    extends TestCase
-{
-    public void testNullSinkPassedIntoCtor()
-        throws Exception
-    {
-        final Mock mockValve = new Mock( EventValve.class );
-        final EventValve valve = (EventValve)mockValve.proxy();
-        try
-        {
-            new ValveControlledSink( null, valve );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "sink", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing sink into Ctor" );
-    }
-
-    public void testNullValvePassedIntoCtor()
-        throws Exception
-    {
-        final Mock mockSink = new Mock( EventSink.class );
-        final EventSink sink = (EventSink)mockSink.proxy();
-        try
-        {
-            new ValveControlledSink( sink, null );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "valve", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing valve into Ctor" );
-    }
-
-    public void testCreation()
-        throws Exception
-    {
-        final Mock mockValve = new Mock( EventValve.class );
-        final EventValve valve = (EventValve)mockValve.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        final EventSink sink = (EventSink)mockSink.proxy();
-        final ValveControlledSink vcs = new ValveControlledSink( sink, valve );
-        assertEquals( "vcs.m_sink", sink, vcs.m_sink );
-        assertEquals( "vcs.m_valve", valve, vcs.m_valve );
-
-        mockSink.verify();
-        mockValve.verify();
-    }
-
-    public void testGetSyncLock()
-        throws Exception
-    {
-        final Mock mockValve = new Mock( EventValve.class );
-        final EventValve valve = (EventValve)mockValve.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        final Object lock = new Object();
-        mockSink.expectAndReturn( "getSinkLock", lock );
-        final EventSink sink = (EventSink)mockSink.proxy();
-        final ValveControlledSink vcs = new ValveControlledSink( sink, valve );
-
-        assertEquals( "vcs.getSinkLock()", lock, vcs.getSinkLock() );
-
-        mockSink.verify();
-        mockValve.verify();
-    }
-
-    public void testAddEventsThatAccepted()
-        throws Exception
-    {
-        final Object[] events = new Object[ 0 ];
-        final Mock mockValve = new Mock( EventValve.class );
-        mockValve.expectAndReturn( "acceptEvents",
-                                   C.args( C.eq( events ) ),
-                                   true );
-        final EventValve valve = (EventValve)mockValve.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        mockSink.expectAndReturn( "addEvents",
-                                  C.args( C.eq( events ) ),
-                                  true );
-        final EventSink sink = (EventSink)mockSink.proxy();
-        final ValveControlledSink vcs = new ValveControlledSink( sink, valve );
-
-        assertEquals( "vcs.addEvents( events )", true, vcs.addEvents( events ) );
-
-        mockSink.verify();
-        mockValve.verify();
-    }
-
-    public void testAddEventsThatNotAccepted()
-        throws Exception
-    {
-        final Object[] events = new Object[ 0 ];
-        final Mock mockValve = new Mock( EventValve.class );
-        mockValve.expectAndReturn( "acceptEvents",
-                                   C.args( C.eq( events ) ),
-                                   false );
-        final EventValve valve = (EventValve)mockValve.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        final EventSink sink = (EventSink)mockSink.proxy();
-        final ValveControlledSink vcs = new ValveControlledSink( sink, valve );
-
-        assertEquals( "vcs.addEvents( events )", false,
-                      vcs.addEvents( events ) );
-
-        mockSink.verify();
-        mockValve.verify();
-    }
-
-    public void testAddEventThatAccepted()
-        throws Exception
-    {
-        final Object event = new Object();
-        final Mock mockValve = new Mock( EventValve.class );
-        mockValve.expectAndReturn( "acceptEvent",
-                                   C.args( C.eq( event ) ),
-                                   true );
-        final EventValve valve = (EventValve)mockValve.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        mockSink.expectAndReturn( "addEvent",
-                                  C.args( C.eq( event ) ),
-                                  true );
-        final EventSink sink = (EventSink)mockSink.proxy();
-        final ValveControlledSink vcs = new ValveControlledSink( sink, valve );
-
-        assertEquals( "vcs.addEvent( event )", true, vcs.addEvent( event ) );
-
-        mockSink.verify();
-        mockValve.verify();
-    }
-
-    public void testAddEventThatNotAccepted()
-        throws Exception
-    {
-        final Object event = new Object();
-        final Mock mockValve = new Mock( EventValve.class );
-        mockValve.expectAndReturn( "acceptEvent",
-                                   C.args( C.eq( event ) ),
-                                   false );
-        final EventValve valve = (EventValve)mockValve.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        final EventSink sink = (EventSink)mockSink.proxy();
-        final ValveControlledSink vcs = new ValveControlledSink( sink, valve );
-
-        assertEquals( "vcs.addEvent( event )", false,
-                      vcs.addEvent( event ) );
-
-        mockSink.verify();
-        mockValve.verify();
-    }
-}
</pre></div>
<hr /><a name="file39" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl/collections<br /></span>
<div class="fileheader" id="removed"><big><b>FifoBufferTestCase.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N FifoBufferTestCase.java
--- FifoBufferTestCase.java	19 Apr 2004 08:09:52 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,356 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.event.impl.collections;
-
-import java.util.List;
-import junit.framework.TestCase;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/04/19 08:09:52 $
- */
-public class FifoBufferTestCase
-    extends TestCase
-{
-    public void testNegativeSizedBuffer() throws Exception
-    {
-        try
-        {
-            new BoundedFifoBuffer( -1 );
-        }
-        catch( final IllegalArgumentException iae )
-        {
-            assertEquals( "iae.getMessage()", "size &lt;= 0", iae.getMessage() );
-            return;
-        }
-        fail( "Exected to fail due to negative buffer size " );
-    }
-
-    public void testCreate() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        assertEquals( "buffer.size()", 0, buffer.size() );
-        assertEquals( "buffer.m_buffer.length", 3, buffer.m_buffer.length );
-        assertEquals( "buffer.m_head", 0, buffer.m_head );
-        assertEquals( "buffer.m_tail", 0, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer",
-                      false,
-                      buffer.m_isWrappedBuffer );
-    }
-
-    public void testSimpleAdd() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        final Object object = new Object();
-        assertEquals( "buffer.add( object )", true, buffer.add( object ) );
-        assertEquals( "buffer.size()", 1, buffer.size() );
-        assertEquals( "buffer.m_head", 0, buffer.m_head );
-        assertEquals( "buffer.m_tail", 1, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer",
-                      false,
-                      buffer.m_isWrappedBuffer );
-        assertEquals( "buffer.m_buffer[ 0 ]", object, buffer.m_buffer[ 0 ] );
-        assertEquals( "buffer.add( object )", true, buffer.add( object ) );
-        assertEquals( "buffer.size()", 2, buffer.size() );
-        assertEquals( "buffer.m_head", 0, buffer.m_head );
-        assertEquals( "buffer.m_tail", 2, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer",
-                      false,
-                      buffer.m_isWrappedBuffer );
-        assertEquals( "buffer.m_buffer[ 1 ]", object, buffer.m_buffer[ 1 ] );
-    }
-
-    public void testAddWithWrap() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        final Object object1 = new Object();
-        final Object object2 = new Object();
-        final Object object3 = new Object();
-        final Object object4 = new Object();
-
-        assertEquals( "buffer.add( object1 )", true, buffer.add( object1 ) );
-        assertEquals( "buffer.add( object2 )", true, buffer.add( object2 ) );
-        assertEquals( "buffer.add( object3 )", true, buffer.add( object3 ) );
-        assertEquals( "buffer.size()", 3, buffer.size() );
-        assertEquals( "buffer.m_head", 0, buffer.m_head );
-        assertEquals( "buffer.m_tail", 0, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer",
-                      true,
-                      buffer.m_isWrappedBuffer );
-
-        assertEquals( "buffer.peek()", object1, buffer.peek() );
-        assertEquals( "buffer.size() After Peek", 3, buffer.size() );
-        assertEquals( "buffer.m_head After Peek", 0, buffer.m_head );
-        assertEquals( "buffer.m_tail After Peek", 0, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer After Peek",
-                      true,
-                      buffer.m_isWrappedBuffer );
-
-        assertEquals( "buffer.pop()", object1, buffer.pop() );
-        assertEquals( "buffer.size() After Pop", 2, buffer.size() );
-        assertEquals( "buffer.m_head After Pop", 1, buffer.m_head );
-        assertEquals( "buffer.m_tail After Pop", 0, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer After Pop",
-                      true,
-                      buffer.m_isWrappedBuffer );
-
-        assertEquals( "buffer.add( object4 )", true, buffer.add( object4 ) );
-        assertEquals( "buffer.size() After Add", 3, buffer.size() );
-        assertEquals( "buffer.m_head After Add", 1, buffer.m_head );
-        assertEquals( "buffer.m_tail After Add", 1, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer After Add",
-                      true,
-                      buffer.m_isWrappedBuffer );
-        assertEquals( "buffer.m_buffer[ 0 ]", object4, buffer.m_buffer[ 0 ] );
-        assertEquals( "buffer.m_buffer[ 1 ]", object2, buffer.m_buffer[ 1 ] );
-        assertEquals( "buffer.m_buffer[ 2 ]", object3, buffer.m_buffer[ 2 ] );
-    }
-
-    public void testSimpleAddAll() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        final Object object = new Object();
-        final Object[] objects = new Object[]{object};
-        assertEquals( "buffer.addAll( objects )",
-                      true,
-                      buffer.addAll( objects ) );
-        assertEquals( "buffer.size()", 1, buffer.size() );
-        assertEquals( "buffer.m_head", 0, buffer.m_head );
-        assertEquals( "buffer.m_tail", 1, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer",
-                      false,
-                      buffer.m_isWrappedBuffer );
-        assertEquals( "buffer.m_buffer[ 0 ]", object, buffer.m_buffer[ 0 ] );
-    }
-
-    public void testFillingAddAll() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        final Object object1 = new Object();
-        final Object object2 = new Object();
-        final Object object3 = new Object();
-        final Object[] objects = new Object[]{object1, object2, object3};
-        assertEquals( "buffer.addAll( objects )",
-                      true,
-                      buffer.addAll( objects ) );
-        assertEquals( "buffer.size()", 3, buffer.size() );
-        assertEquals( "buffer.m_head", 0, buffer.m_head );
-        assertEquals( "buffer.m_tail", 0, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer",
-                      true,
-                      buffer.m_isWrappedBuffer );
-        assertEquals( "buffer.m_buffer[ 0 ]", object1, buffer.m_buffer[ 0 ] );
-        assertEquals( "buffer.m_buffer[ 1 ]", object2, buffer.m_buffer[ 1 ] );
-        assertEquals( "buffer.m_buffer[ 2 ]", object3, buffer.m_buffer[ 2 ] );
-    }
-
-    public void testAddAllWithWrap() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        final Object object1 = new Object();
-        final Object object2 = new Object();
-        final Object object3 = new Object();
-        final Object object4 = new Object();
-
-        assertEquals( "buffer.add( object1 )", true, buffer.add( object1 ) );
-        assertEquals( "buffer.add( object2 )", true, buffer.add( object2 ) );
-        assertEquals( "buffer.add( object3 )", true, buffer.add( object3 ) );
-        assertEquals( "buffer.size()", 3, buffer.size() );
-        assertEquals( "buffer.m_head", 0, buffer.m_head );
-        assertEquals( "buffer.m_tail", 0, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer",
-                      true,
-                      buffer.m_isWrappedBuffer );
-
-        assertEquals( "buffer.peek()", object1, buffer.peek() );
-        assertEquals( "buffer.size() After Peek", 3, buffer.size() );
-        assertEquals( "buffer.m_head After Peek", 0, buffer.m_head );
-        assertEquals( "buffer.m_tail After Peek", 0, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer After Peek",
-                      true,
-                      buffer.m_isWrappedBuffer );
-
-        assertEquals( "buffer.pop()", object1, buffer.pop() );
-        assertEquals( "buffer.size() After Pop", 2, buffer.size() );
-        assertEquals( "buffer.m_head After Pop", 1, buffer.m_head );
-        assertEquals( "buffer.m_tail After Pop", 0, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer After Pop",
-                      true,
-                      buffer.m_isWrappedBuffer );
-
-        assertEquals( "buffer.addAll( new Object[]{object4} )",
-                      true,
-                      buffer.addAll( new Object[]{object4} ) );
-        assertEquals( "buffer.size() After Add", 3, buffer.size() );
-        assertEquals( "buffer.m_head After Add", 1, buffer.m_head );
-        assertEquals( "buffer.m_tail After Add", 1, buffer.m_tail );
-        assertEquals( "buffer.m_isWrappedBuffer After Add",
-                      true,
-                      buffer.m_isWrappedBuffer );
-
-        assertEquals( "buffer.m_buffer[ 0 ]", object4, buffer.m_buffer[ 0 ] );
-        assertEquals( "buffer.m_buffer[ 1 ]", object2, buffer.m_buffer[ 1 ] );
-        assertEquals( "buffer.m_buffer[ 2 ]", object3, buffer.m_buffer[ 2 ] );
-    }
-
-    public void testObjectsPassedIntoAddAll() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        try
-        {
-            buffer.addAll( null );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "objects", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing objects into AddAll" );
-    }
-
-    public void testObjectPassedIntoAdd() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        try
-        {
-            buffer.add( null );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "object", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing object into Add" );
-    }
-
-    public void testPopOnEmpty() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        final Object element = buffer.pop();
-        assertEquals( "element", null, element );
-    }
-
-    public void testToList()
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        final Object object1 = new Object();
-        final Object object2 = new Object();
-        final Object object3 = new Object();
-        buffer.add( object1 );
-        buffer.add( object2 );
-        buffer.add( object3 );
-
-        final List list = buffer.toList();
-
-        assertEquals( "list.size()", 3, list.size() );
-        assertEquals( "list.get(0)", object1, list.get( 0 ) );
-        assertEquals( "list.get(0)", object2, list.get( 1 ) );
-        assertEquals( "list.get(0)", object3, list.get( 2 ) );
-    }
-
-    public void testPopAndWrap() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        final Object object1 = new Object();
-        final Object object2 = new Object();
-        final Object object3 = new Object();
-        final Object object4 = new Object();
-        buffer.add( object1 );
-        buffer.add( object2 );
-        buffer.add( object3 );
-        final Object element1 = buffer.pop();
-        final Object element2 = buffer.pop();
-        final Object element3 = buffer.pop();
-        buffer.add( object4 );
-        final Object element4 = buffer.pop();
-
-        assertEquals( "element1", object1, element1 );
-        assertEquals( "element2", object2, element2 );
-        assertEquals( "element3", object3, element3 );
-        assertEquals( "element4", object4, element4 );
-    }
-
-    public void testOverAddOnBoundedBuffer() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        final Object object1 = new Object();
-        final Object object2 = new Object();
-        final Object object3 = new Object();
-        final Object object4 = new Object();
-
-        assertEquals( "buffer.add( object1 )", true, buffer.add( object1 ) );
-        assertEquals( "buffer.add( object2 )", true, buffer.add( object2 ) );
-        assertEquals( "buffer.add( object3 )", true, buffer.add( object3 ) );
-        assertEquals( "buffer.add( object4 )", false, buffer.add( object4 ) );
-    }
-
-    public void testOverAddAllOnBoundedBuffer() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new BoundedFifoBuffer( 3 );
-        final Object object1 = new Object();
-        final Object object2 = new Object();
-        final Object object3 = new Object();
-        final Object object4 = new Object();
-        final Object[] objects = new Object[]{object1,
-                                              object2,
-                                              object3,
-                                              object4};
-
-        assertEquals( "buffer.addAll( objects )",
-                      false,
-                      buffer.addAll( objects ) );
-    }
-
-    public void testOverAddAllOnUnBoundedBuffer() throws Exception
-    {
-        final AbstractFifoBuffer buffer = new UnboundedFifoBuffer( 3 );
-        final Object object1 = new Object();
-        final Object object2 = new Object();
-        final Object object3 = new Object();
-        final Object object4 = new Object();
-        final Object[] objects = new Object[]{object1,
-                                              object2,
-                                              object3,
-                                              object4};
-
-        assertEquals( "buffer.addAll( objects )",
-                      true,
-                      buffer.addAll( objects ) );
-        assertEquals( "buffer.m_buffer.length", 5, buffer.m_buffer.length );
-        assertEquals( "buffer.m_buffer[ 0 ]", object1, buffer.m_buffer[ 0 ] );
-        assertEquals( "buffer.m_buffer[ 1 ]", object2, buffer.m_buffer[ 1 ] );
-        assertEquals( "buffer.m_buffer[ 2 ]", object3, buffer.m_buffer[ 2 ] );
-        assertEquals( "buffer.m_buffer[ 3 ]", object4, buffer.m_buffer[ 3 ] );
-        assertEquals( "buffer.m_buffer[ 4 ]", null, buffer.m_buffer[ 4 ] );
-    }
-
-    public void testOverAddAllOnUnBoundedBufferWithNonZeroHead()
-        throws Exception
-    {
-        final AbstractFifoBuffer buffer = new UnboundedFifoBuffer( 3 );
-        final Object start = new Object();
-        assertEquals( "buffer.add( start )", true, buffer.add( start ) );
-        assertEquals( "buffer.pop()", start, buffer.pop() );
-
-        final Object object1 = new Object();
-        final Object object2 = new Object();
-        final Object object3 = new Object();
-        final Object object4 = new Object();
-        assertEquals( "buffer.add( object1 )", true, buffer.add( object1 ) );
-        assertEquals( "buffer.add( object2 )", true, buffer.add( object2 ) );
-        assertEquals( "buffer.add( object3 )", true, buffer.add( object3 ) );
-        assertEquals( "buffer.add( object4 )", true, buffer.add( object4 ) );
-
-        assertEquals( "buffer.m_buffer.length", 5, buffer.m_buffer.length );
-        assertEquals( "buffer.m_buffer[ 0 ]", object1, buffer.m_buffer[ 0 ] );
-        assertEquals( "buffer.m_buffer[ 1 ]", object2, buffer.m_buffer[ 1 ] );
-        assertEquals( "buffer.m_buffer[ 2 ]", object3, buffer.m_buffer[ 2 ] );
-        assertEquals( "buffer.m_buffer[ 3 ]", object4, buffer.m_buffer[ 3 ] );
-        assertEquals( "buffer.m_buffer[ 4 ]", null, buffer.m_buffer[ 4 ] );
-    }
-}
</pre></div>
<hr /><a name="file40" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl/perf<br /></span>
<div class="fileheader" id="removed"><big><b>EventGenerator.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventGenerator.java
--- EventGenerator.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,70 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl.perf;
-
-import java.util.Arrays;
-import java.util.List;
-import org.codehaus.spice.event.EventSource;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public class EventGenerator
-    implements EventSource
-{
-    private final String m_prefix;
-    private int m_index;
-
-    public EventGenerator( final String prefix )
-    {
-        m_prefix = prefix;
-    }
-
-    public Object[] getEvents( final int count )
-    {
-        doWait();
-        final int size =
-            Math.min( count,
-                      Math.abs( EventPerfTest.RANDOM.nextInt() % count ) +
-                      count / 2 );
-        final Object[] events = new Object[ size ];
-        for( int i = 0; i &lt; events.length; i++ )
-        {
-            events[ i ] = createEvent();
-        }
-        final List list = Arrays.asList( events );
-        if( EventPerfTest.DEBUG )
-        {
-            System.out.println( m_prefix + " generating events " + list );
-        }
-        return events;
-    }
-
-    public Object getEvent()
-    {
-        doWait();
-        return createEvent();
-    }
-
-    private Object createEvent()
-    {
-        return m_prefix + m_index++;
-    }
-
-    private void doWait()
-    {
-        try
-        {
-            final int time = 50 +
-                             Math.abs( EventPerfTest.RANDOM.nextInt() % 1000 );
-            Thread.sleep( time );
-        }
-        catch( final InterruptedException ie )
-        {
-        }
-    }
-
-    public Object getSourceLock()
-    {
-        return this;
-    }
-}
</pre></div>
<hr /><a name="file41" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl/perf<br /></span>
<div class="fileheader" id="removed"><big><b>EventPerfTest.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventPerfTest.java
--- EventPerfTest.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,102 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl.perf;
-
-import java.util.Random;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.event.impl.DefaultEventQueue;
-import org.codehaus.spice.event.impl.EventPump;
-import org.codehaus.spice.event.impl.collections.AbstractFifoBuffer;
-import org.codehaus.spice.event.impl.collections.BoundedFifoBuffer;
-import org.codehaus.spice.event.impl.collections.UnboundedFifoBuffer;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public class EventPerfTest
-{
-    static final Random RANDOM = new Random();
-    static boolean DEBUG = false;
-
-    public static void main( final String[] args )
-    {
-        final AbstractFifoBuffer buffer1 = new BoundedFifoBuffer( 20 );
-        final AbstractFifoBuffer buffer2 = new BoundedFifoBuffer( 20 );
-        final AbstractFifoBuffer buffer3 = new BoundedFifoBuffer( 20 );
-        final AbstractFifoBuffer buffer4 = new UnboundedFifoBuffer( 5 );
-
-        final DefaultEventQueue queue1 = new TestQueue( "Q1", buffer1 );
-        final DefaultEventQueue queue2 = new TestQueue( "Q2", buffer2 );
-        final DefaultEventQueue queue3 = new TestQueue( "Q3", buffer3 );
-        final DefaultEventQueue queue4 = new TestQueue( "Q4", buffer4 );
-
-        final EventGenerator generator1 = new EventGenerator( "A" );
-        final EventGenerator generator2 = new EventGenerator( "B" );
-
-        final EventTerminator terminator1 = new EventTerminator( "Term1" );
-        final EventTerminator terminator2 = new EventTerminator( "Term2" );
-
-        final EventTransformer transformer1 =
-            new EventTransformer( "T1", new EventSink[]{queue2, queue4}, "xT1" );
-
-        final EventTransformer pass1 =
-            new EventTransformer( "T2", new EventSink[]{queue1} );
-        final EventTransformer pass2 =
-            new EventTransformer( "T3", new EventSink[]{queue3} );
-        final EventTransformer pass3 =
-            new EventTransformer( "T4", new EventSink[]{terminator1} );
-        final EventTransformer pass4 =
-            new EventTransformer( "T5", new EventSink[]{terminator2} );
-
-        final EventPump pump1 = new TestEventPump( generator1, pass1, "Pump1" );
-        pump1.setBatchSize( 10 );
-
-        final EventPump pump2 = new TestEventPump( generator2, pass1, "Pump2" );
-        pump1.setBatchSize( 10 );
-
-        final EventPump pump3 =
-            new TestEventPump( queue1, transformer1, "Pump3" );
-        pump3.setBatchSize( 10 );
-
-        final EventPump pump4 = new TestEventPump( queue2, pass2, "Pump4" );
-        pump4.setBatchSize( 4 );
-
-        final EventPump pump5 = new TestEventPump( queue3, pass3, "Pump5" );
-        pump5.setBatchSize( 2 );
-
-        final EventPump pump6 = new TestEventPump( queue4, pass4, "Pump6" );
-        pump6.setBatchSize( 7 );
-
-        final EventPump[] pumps =
-            new EventPump[]{pump1, pump2, pump3, pump4, pump5, pump6};
-        //final EventPumpRunner runner1 = new EventPumpRunner( pumps );
-
-        for( int i = 0; i &lt; 100; i++ )
-        {
-            if( DEBUG )
-            {
-                System.out.println( "Tick Tock ......................" );
-            }
-            for( int j = 0; j &lt; pumps.length; j++ )
-            {
-                final EventPump pump = pumps[ j ];
-                refreshPump( pump, buffer1, buffer2, buffer3, buffer4 );
-            }
-        }
-    }
-
-    private static void refreshPump( final EventPump pump,
-                                     final AbstractFifoBuffer buffer1,
-                                     final AbstractFifoBuffer buffer2,
-                                     final AbstractFifoBuffer buffer3,
-                                     final AbstractFifoBuffer buffer4 )
-    {
-        pump.refresh();
-        if( DEBUG )
-        {
-            System.out.println( "Q1.Size: " + buffer1.size() );
-            System.out.println( "Q2.Size: " + buffer2.size() );
-            System.out.println( "Q3.Size: " + buffer3.size() );
-            System.out.println( "Q4.Size: " + buffer4.size() );
-        }
-    }
-}
</pre></div>
<hr /><a name="file42" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl/perf<br /></span>
<div class="fileheader" id="removed"><big><b>EventTerminator.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventTerminator.java
--- EventTerminator.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,62 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl.perf;
-
-import java.util.Arrays;
-import java.util.List;
-import org.codehaus.spice.event.EventSink;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public class EventTerminator
-    implements EventSink
-{
-    private final String m_name;
-
-    public EventTerminator( final String name )
-    {
-        m_name = name;
-    }
-
-    public boolean addEvent( final Object event )
-    {
-        return addEvents( new Object[]{event} );
-    }
-
-    public boolean addEvents( final Object[] events )
-    {
-        final boolean drop =
-            EventPerfTest.RANDOM.nextBoolean() &amp;&amp;
-            EventPerfTest.RANDOM.nextBoolean() &amp;&amp;
-            EventPerfTest.RANDOM.nextBoolean() &amp;&amp;
-            EventPerfTest.RANDOM.nextBoolean() &amp;&amp;
-            EventPerfTest.RANDOM.nextBoolean();
-        final List list = Arrays.asList( events );
-        if( drop )
-        {
-            if( EventPerfTest.DEBUG )
-            {
-                System.out.println( m_name + " rejecting Events: " + list );
-            }
-            return false;
-        }
-        else
-        {
-            if( EventPerfTest.DEBUG )
-            {
-                System.out.println( m_name + " terminating Events: " + list );
-            }
-            return true;
-        }
-    }
-
-    public Object getSinkLock()
-    {
-        return this;
-    }
-
-    public String toString()
-    {
-        return m_name;
-    }
-}
</pre></div>
<hr /><a name="file43" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl/perf<br /></span>
<div class="fileheader" id="removed"><big><b>EventTransformer.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N EventTransformer.java
--- EventTransformer.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,87 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl.perf;
-
-import java.util.Arrays;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public class EventTransformer
-    implements EventHandler
-{
-    private final String _name;
-    private final EventSink[] _sinks;
-    private final String _postfix;
-
-    public EventTransformer( final String name, final EventSink[] sinks )
-    {
-        this( name, sinks, "" );
-    }
-
-    public EventTransformer( final String name,
-                             final EventSink[] sinks,
-                             final String postfix )
-    {
-        _name = name;
-        _sinks = sinks;
-        _postfix = postfix;
-    }
-
-    public void handleEvent( final Object event )
-    {
-        final Object newEvent = transformEvent( event );
-        for( int i = 0; i &lt; _sinks.length; i++ )
-        {
-            final EventSink sink = _sinks[ i ];
-            final boolean result = sink.addEvent( newEvent );
-            if( result )
-            {
-                return;
-            }
-        }
-        if( EventPerfTest.DEBUG )
-        {
-            System.out.println(
-                "Dropping Event " + event +
-                " at " + _name );
-        }
-    }
-
-    public void handleEvents( final Object[] events )
-    {
-        final Object[] newEvents = new Object[ events.length ];
-        for( int i = 0; i &lt; newEvents.length; i++ )
-        {
-            newEvents[ i ] = transformEvent( events[ i ] );
-        }
-
-        for( int i = 0; i &lt; _sinks.length; i++ )
-        {
-            final EventSink sink = _sinks[ i ];
-            final boolean result = sink.addEvents( events );
-            if( result )
-            {
-                if( EventPerfTest.DEBUG )
-                {
-                    final String message =
-                        events.length + " events transformed via " + _name +
-                        " and passed to sink " + sink;
-                    System.out.println( message );
-                }
-                return;
-            }
-        }
-        if( true || EventPerfTest.DEBUG )
-        {
-            System.out.println( "Dropping Events " + Arrays.asList( events ) +
-                                " at " + _name );
-        }
-    }
-
-    private Object transformEvent( final Object event )
-    {
-        return event + _postfix;
-    }
-}
</pre></div>
<hr /><a name="file44" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl/perf<br /></span>
<div class="fileheader" id="removed"><big><b>TestEventPump.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N TestEventPump.java
--- TestEventPump.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl.perf;
-
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSource;
-import org.codehaus.spice.event.impl.EventPump;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public class TestEventPump
-    extends EventPump
-{
-    private final String _name;
-
-    public TestEventPump( final EventSource source,
-                          final EventHandler handler,
-                          final String name )
-    {
-        super( source, handler );
-        _name = name;
-    }
-
-    public String toString()
-    {
-        return _name;
-    }
-
-    public void refresh()
-    {
-        if( EventPerfTest.DEBUG )
-        {
-            System.out.println( "Refreshing: " + _name );
-        }
-        super.refresh();
-    }
-}
</pre></div>
<hr /><a name="file45" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/src/test/org/codehaus/spice/event/impl/perf<br /></span>
<div class="fileheader" id="removed"><big><b>TestQueue.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N TestQueue.java
--- TestQueue.java	16 Dec 2003 02:03:12 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.event.impl.perf;
-
-import org.codehaus.spice.event.impl.DefaultEventQueue;
-import org.codehaus.spice.event.impl.collections.Buffer;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2003/12/16 02:03:12 $
- */
-public class TestQueue
-    extends DefaultEventQueue
-{
-    private final String _name;
-
-    public TestQueue( final String name,
-                      final Buffer buffer )
-    {
-        super( buffer );
-        _name = name;
-    }
-
-    public String toString()
-    {
-        return _name;
-    }
-}
</pre></div>
<hr /><a name="file46" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/xdocs<br /></span>
<div class="fileheader" id="removed"><big><b>component.menu</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N component.menu
--- component.menu	25 Apr 2004 01:15:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
</small></pre><pre class="diff" id="removed">-
-    &lt;menu name="Component"&gt;
-      &lt;item name="Home"           href="/index.html"/&gt;
-    &lt;/menu&gt;
</pre></div>
<hr /><a name="file47" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/event/xdocs<br /></span>
<div class="fileheader" id="removed"><big><b>index.xml</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N index.xml
--- index.xml	25 Apr 2004 01:15:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
</small></pre><pre class="diff" id="removed">-&lt;?xml version="1.0"?&gt;
-&lt;document&gt;
-
-  &lt;properties&gt;
-    	&lt;title&gt;Event&lt;/title&gt;
-  &lt;/properties&gt;
-
-  &lt;body&gt;
-	  &lt;section name="Introduction"&gt;
- 	 &lt;/section&gt;
-  &lt;/body&gt;
-
-&lt;/document&gt;
</pre></div>
<hr /><a name="file48" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent<br /></span>
<div class="fileheader" id="removed"><big><b>.cvsignore</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N .cvsignore
--- .cvsignore	7 Jan 2004 02:51:41 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
</small></pre><pre class="diff" id="removed">-dist
-target
-build.properties
-*.log
-*.el
-*.ipr
-*.iws
</pre></div>
<hr /><a name="file49" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent<br /></span>
<div class="fileheader" id="removed"><big><b>project.properties</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N project.properties
--- project.properties	25 Apr 2004 00:44:46 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,69 +0,0 @@
</small></pre><pre class="diff" id="removed">-maven.remote.group=spice
-maven.repo.remote=http://www.ibiblio.com/maven,http://dist.codehaus.org
-
-maven.checkstyle.properties = ${basedir}/../../tools/checkstyle/checkstyle.xml
-maven.checkstyle.license.exists=true
-
-maven.javadoc.links = \
-    http://avalon.apache.org/api/, \
-    http://dna.jcontainer.org/apidocs/, \
-    http://java.sun.com/j2se/1.3/docs/api/
-
-maven.license.licenseFile=${basedir}/../../LICENSE.txt
-maven.linkcheck.enable=true
-
-maven.junit.fork=true
-maven.junit.dir=${basedir}/target/test-classes
-
-maven.xdoc.poweredby.image=
-#maven.xdoc.jsl=target/site.jsl
-
-spice.color1.bright=#FFFFFF
-spice.color1.light=#FFFFCC
-spice.color1.main=#CCCC99
-spice.color1.shaded=#999966
-spice.color1.dark=#666633
-spice.color1.darkest=#333300
-
-maven.ui.body.background=${spice.color1.bright}
-maven.ui.body.foreground=${spice.color1.darkest}
-maven.ui.section.background=${spice.color1.shaded}
-maven.ui.section.foreground=${spice.color1.light}
-maven.ui.subsection.background=${spice.color1.main}
-maven.ui.subsection.foreground=${spice.color1.light}
-maven.ui.table.header.background=${spice.color1.shaded}
-maven.ui.table.header.foreground=${spice.color1.light}
-
-maven.ui.table.row.odd.background=${spice.color1.light}
-maven.ui.table.row.odd.foreground=${spice.color1.dark}
-maven.ui.table.row.even.background=${spice.color1.light}
-maven.ui.table.row.even.foreground=${spice.color1.dark}
-
-maven.ui.banner.background=${spice.color1.bright}
-maven.ui.banner.foreground=${spice.color1.darkest}
-maven.ui.banner.border.top=${spice.color1.bright}
-maven.ui.banner.border.bottom=${spice.color1.shaded}
-
-maven.ui.source.background=${spice.color1.bright}
-maven.ui.source.foreground=${spice.color1.darkest}
-maven.ui.source.border.top=${spice.color1.shaded}
-maven.ui.source.border.bottom=${spice.color1.shaded}
-maven.ui.source.border.right=${spice.color1.shaded}
-maven.ui.source.border.left=${spice.color1.shaded}
-
-maven.ui.navcol.background=${spice.color1.light}
-maven.ui.navcol.background.ns4=${spice.color1.light}
-maven.ui.navcol.foreground=${spice.color1.dark}
-maven.ui.navcol.foreground.ns4=${spice.color1.dark}
-maven.ui.navcol.border.top=${spice.color1.light}
-maven.ui.navcol.border.right=${spice.color1.main}
-maven.ui.navcol.border.bottom=${spice.color1.main}
-
-maven.ui.breadcrumbs.background=${spice.color1.main}
-maven.ui.breadcrumbs.foreground=${spice.color1.dark}
-maven.ui.breadcrumbs.border.top=${spice.color1.light}
-maven.ui.breadcrumbs.border.bottom=${spice.color1.shaded}
-
-maven.ui.href.link=${spice.color1.dark}
-maven.ui.href.link.active=${spice.color1.darkest}
-maven.ui.href.link.selfref=${spice.color1.dark}
</pre></div>
<hr /><a name="file50" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent<br /></span>
<div class="fileheader" id="removed"><big><b>project.xml</b></big> <small id="info">removed after 1.6</small></div>
<pre class="diff"><small id="info">diff -N project.xml
--- project.xml	17 May 2004 03:54:01 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
</small></pre><pre class="diff" id="removed">-&lt;?xml version="1.0"?&gt;
-&lt;project&gt;
-    &lt;extend&gt;${basedir}/../../project.xml&lt;/extend&gt;
-    &lt;name&gt;Spice NetEvent&lt;/name&gt;
-    &lt;id&gt;spice-netevent&lt;/id&gt;
-    &lt;currentVersion&gt;1.1-dev&lt;/currentVersion&gt;
-    &lt;package&gt;org.codehaus.spice.netevent&lt;/package&gt;
-    &lt;inceptionYear&gt;2003&lt;/inceptionYear&gt;
-
-    &lt;shortDescription&gt;Net Event Toolkit&lt;/shortDescription&gt;
-
-    &lt;dependencies&gt;
-        &lt;dependency&gt;
-            &lt;groupId&gt;spice&lt;/groupId&gt;
-            &lt;artifactId&gt;spice-event&lt;/artifactId&gt;
-            &lt;version&gt;1.1-dev&lt;/version&gt;
-        &lt;/dependency&gt;
-        &lt;dependency&gt;
-            &lt;groupId&gt;jmock&lt;/groupId&gt;
-            &lt;artifactId&gt;jmock&lt;/artifactId&gt;
-            &lt;version&gt;20031129.200437&lt;/version&gt;
-        &lt;/dependency&gt;
-    &lt;/dependencies&gt;
-
-    &lt;developers&gt;
-        &lt;developer&gt;
-            &lt;name&gt;Peter Donald&lt;/name&gt;
-            &lt;id&gt;pdonald&lt;/id&gt;
-            &lt;roles&gt;
-                &lt;role&gt;Developer&lt;/role&gt;
-            &lt;/roles&gt;
-        &lt;/developer&gt;
-    &lt;/developers&gt;
-
-&lt;/project&gt;
</pre></div>
<hr /><a name="file51" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/buffers<br /></span>
<div class="fileheader" id="removed"><big><b>BufferManager.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N BufferManager.java
--- BufferManager.java	9 Jan 2004 00:28:32 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.buffers;
-
-import java.nio.ByteBuffer;
-
-/**
- * Interface for management of Buffers used in reading and writing data.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/01/09 00:28:32 $
- */
-public interface BufferManager
-{
-    /**
-     * Aquire a buffer that is of specified size or larger.
-     * 
-     * @param size the size
-     * @return the buffer
-     */
-    ByteBuffer aquireBuffer( int size );
-
-    /**
-     * Release specified buffer.
-     * 
-     * @param buffer the buffer
-     */
-    void releaseBuffer( ByteBuffer buffer );
-}
</pre></div>
<hr /><a name="file52" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/buffers<br /></span>
<div class="fileheader" id="removed"><big><b>DefaultBufferManager.java</b></big> <small id="info">removed after 1.7</small></div>
<pre class="diff"><small id="info">diff -N DefaultBufferManager.java
--- DefaultBufferManager.java	17 May 2004 06:21:38 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,88 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.buffers;
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A simple BufferManager that caches buffers in map.
- * 
- * @author Peter Donald
- * @version $Revision: 1.7 $ $Date: 2004/05/17 06:21:38 $
- */
-public class DefaultBufferManager
-    implements BufferManager
-{
-    /** The buffer cache. */
-    private final List _cache = new ArrayList();
-
-    /** the number of new buffers created. */
-    private int _newCount;
-
-    /** the number of buffers currently active. */
-    private int _activeCount;
-    private static final int DEFAULT_SIZE = 1024 * 8;
-
-    /**
-     * @see BufferManager#aquireBuffer(int)
-     */
-    public synchronized ByteBuffer aquireBuffer( final int size )
-    {
-        _activeCount++;
-        final int count = _cache.size();
-        if( count &gt; 0 )
-        {
-            final ByteBuffer buffer = (ByteBuffer) _cache.get( count - 1 );
-            if( buffer.capacity() &gt;= size )
-            {
-                _cache.remove( count - 1 );
-                clean( buffer );
-                return buffer;
-            }
-        }
-        _newCount++;
-        final int sz = Math.max( DEFAULT_SIZE, size );
-        final ByteBuffer buffer = ByteBuffer.allocate( sz );
-        clean( buffer );
-        return buffer;
-    }
-
-    /**
-     * Reset state of buffer.
-     * 
-     * @param buffer the buffer
-     */
-    private void clean( final ByteBuffer buffer )
-    {
-        buffer.clear();
-    }
-
-    /**
-     * @see BufferManager#releaseBuffer(ByteBuffer)
-     */
-    public synchronized void releaseBuffer( final ByteBuffer buffer )
-    {
-        _activeCount--;
-        _cache.add( buffer );
-    }
-
-    /**
-     * Return the number of new buffers created.
-     * 
-     * @return the number of new buffers created.
-     */
-    public int getNewCount()
-    {
-        return _newCount;
-    }
-
-    /**
-     * Return the number of buffers currently active.
-     * 
-     * @return the number of buffers currently active.
-     */
-    public int getActiveCount()
-    {
-        return _activeCount;
-    }
-}
</pre></div>
<hr /><a name="file53" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>AbstractTransportEvent.java</b></big> <small id="info">removed after 1.6</small></div>
<pre class="diff"><small id="info">diff -N AbstractTransportEvent.java
--- AbstractTransportEvent.java	17 May 2004 06:21:38 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,60 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import org.codehaus.spice.event.AbstractEvent;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * An Event related to a particular transport.
- * 
- * @author Peter Donald
- * @version $Revision: 1.6 $ $Date: 2004/05/17 06:21:38 $
- */
-public abstract class AbstractTransportEvent
-    extends AbstractEvent
-{
-    /**
-     * The transport.
-     */
-    private final ChannelTransport m_transport;
-
-    /**
-     * Create event for specified transport.
-     * 
-     * @param transport the transport
-     */
-    public AbstractTransportEvent( final ChannelTransport transport )
-    {
-        if( null == transport )
-        {
-            throw new NullPointerException( "transport" );
-        }
-        m_transport = transport;
-    }
-
-    /**
-     * Return the transport.
-     * 
-     * @return the transport.
-     */
-    public ChannelTransport getTransport()
-    {
-        return m_transport;
-    }
-
-    /**
-     * Return the description of event.
-     * 
-     * @return the description of event.
-     */
-    protected String getEventDescription()
-    {
-        return String.valueOf( getTransport() );
-    }
-}
</pre></div>
<hr /><a name="file54" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>AcceptErrorEvent.java</b></big> <small id="info">removed after 1.5</small></div>
<pre class="diff"><small id="info">diff -N AcceptErrorEvent.java
--- AcceptErrorEvent.java	17 May 2004 06:21:38 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,57 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import java.io.IOException;
-import java.nio.channels.Channel;
-
-/**
- * An Event indicating that ServerSocket failed to accept a socket.
- * 
- * @author Peter Donald
- * @version $Revision: 1.5 $ $Date: 2004/05/17 06:21:38 $
- */
-public class AcceptErrorEvent
-    extends ChannelEvent
-{
-    /** the exception. */
-    private final IOException m_ioe;
-
-    /**
-     * Create event.
-     * 
-     * @param channel the channel.
-     */
-    public AcceptErrorEvent( final Channel channel, final Object userData, final IOException ioe )
-    {
-        super( channel, userData );
-        if( null == ioe )
-        {
-            throw new NullPointerException( "ioe" );
-        }
-        m_ioe = ioe;
-    }
-
-    /**
-     * Return the exception.
-     * 
-     * @return the exception.
-     */
-    public IOException getIoe()
-    {
-        return m_ioe;
-    }
-
-    /**
-     * @see ChannelEvent#getEventDescription()
-     */
-    protected String getEventDescription()
-    {
-        return getIoe() + " error connected to " + super.getEventDescription();
-    }
-}
</pre></div>
<hr /><a name="file55" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>AcceptEvent.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N AcceptEvent.java
--- AcceptEvent.java	17 May 2004 06:21:38 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.events;
-
-import java.nio.channels.Channel;
-
-/**
- * Event to indicate Channel was accepted.
- * 
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 06:21:38 $
- */
-public class AcceptEvent
-    extends ChannelEvent
-{
-    /**
-     * Create Event.
-     * 
-     * @param channel the channel
-     */
-    public AcceptEvent( final Channel channel )
-    {
-        super( channel, null );
-    }
-}
</pre></div>
<hr /><a name="file56" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>AcceptPossibleEvent.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N AcceptPossibleEvent.java
--- AcceptPossibleEvent.java	17 May 2004 06:21:38 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import java.nio.channels.Channel;
-
-/**
- * An Event indicating that ServerSocket can accept a connection.
- * 
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 06:21:38 $
- */
-public class AcceptPossibleEvent
-    extends ChannelEvent
-{
-    /**
-     * Create event.
-     * 
-     * @param channel the channel.
-     */
-    public AcceptPossibleEvent( final Channel channel, final Object userData )
-    {
-        super( channel, userData );
-    }
-}
</pre></div>
<hr /><a name="file57" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>ChannelClosedEvent.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N ChannelClosedEvent.java
--- ChannelClosedEvent.java	17 May 2004 06:21:38 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Event indicating that it is possible to read from the socket.
- * 
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/05/17 06:21:38 $
- */
-public class ChannelClosedEvent
-    extends AbstractTransportEvent
-{
-    /**
-     * Create Event.
-     * 
-     * @param transport the transport
-     */
-    public ChannelClosedEvent( final ChannelTransport transport )
-    {
-        super( transport );
-    }
-}
</pre></div>
<hr /><a name="file58" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>ChannelEvent.java</b></big> <small id="info">removed after 1.5</small></div>
<pre class="diff"><small id="info">diff -N ChannelEvent.java
--- ChannelEvent.java	17 May 2004 06:21:38 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,67 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.events;
-
-import java.nio.channels.Channel;
-import org.codehaus.spice.event.AbstractEvent;
-
-/**
- * Abstract event about Channels.
- * 
- * @author Peter Donald
- * @version $Revision: 1.5 $ $Date: 2004/05/17 06:21:38 $
- */
-public abstract class ChannelEvent
-    extends AbstractEvent
-{
-    /**
-     * The Channel.
-     */
-    private final Channel m_channel;
-
-    /**
-     * The associated userdata.
-     */
-    private final Object m_userData;
-
-    /**
-     * Create Event.
-     * 
-     * @param channel the channel
-     */
-    public ChannelEvent( final Channel channel, final Object userData )
-    {
-        if( null == channel )
-        {
-            throw new NullPointerException( "channel" );
-        }
-        m_channel = channel;
-        m_userData = userData;
-    }
-
-    /**
-     * Return the socket channel.
-     * 
-     * @return the socket channel.
-     */
-    public Channel getChannel()
-    {
-        return m_channel;
-    }
-
-    /**
-     * Return the associated user data.
-     * 
-     * @return the associated user data.
-     */
-    public Object getUserData()
-    {
-        return m_userData;
-    }
-
-    /**
-     * @see AbstractEvent#getEventDescription()
-     */
-    protected String getEventDescription()
-    {
-        return String.valueOf( m_channel );
-    }
-}
</pre></div>
<hr /><a name="file59" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>CloseChannelRequestEvent.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N CloseChannelRequestEvent.java
--- CloseChannelRequestEvent.java	17 May 2004 06:21:38 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Event indicating that it is possible to read from the socket.
- * 
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/05/17 06:21:38 $
- */
-public class CloseChannelRequestEvent
-    extends AbstractTransportEvent
-{
-    /**
-     * Create Event.
-     * 
-     * @param transport the transport
-     */
-    public CloseChannelRequestEvent( final ChannelTransport transport )
-    {
-        super( transport );
-    }
-}
</pre></div>
<hr /><a name="file60" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>ConnectErrorEvent.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N ConnectErrorEvent.java
--- ConnectErrorEvent.java	17 May 2004 06:21:38 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import java.io.IOException;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * An Event indicating a read error.
- * 
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/05/17 06:21:38 $
- */
-public class ConnectErrorEvent
-    extends IOErrorEvent
-{
-    /**
-     * Create event.
-     * 
-     * @param transport the transport
-     * @param ioe the error
-     */
-    public ConnectErrorEvent( final ChannelTransport transport, final IOException ioe )
-    {
-        super( transport, ioe );
-    }
-}
</pre></div>
<hr /><a name="file61" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>ConnectEvent.java</b></big> <small id="info">removed after 1.6</small></div>
<pre class="diff"><small id="info">diff -N ConnectEvent.java
--- ConnectEvent.java	17 May 2004 06:21:38 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.events;
-
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Event to indicate Channel was accepted.
- * 
- * @author Peter Donald
- * @version $Revision: 1.6 $ $Date: 2004/05/17 06:21:38 $
- */
-public class ConnectEvent
-    extends AbstractTransportEvent
-{
-    /**
-     * Create Event.
-     * 
-     * @param transport the transport
-     */
-    public ConnectEvent( final ChannelTransport transport )
-    {
-        super( transport );
-    }
-}
</pre></div>
<hr /><a name="file62" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>ConnectPossibleEvent.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N ConnectPossibleEvent.java
--- ConnectPossibleEvent.java	17 May 2004 06:21:38 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import java.nio.channels.Channel;
-import java.nio.channels.SelectionKey;
-
-/**
- * Event indicating that it is possible to read from the socket.
- * 
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 06:21:38 $
- */
-public class ConnectPossibleEvent
-    extends ChannelEvent
-{
-    /**
-     * Key that used to generate event.
-     */
-    private final SelectionKey _key;
-
-    /**
-     * Create event.
-     * 
-     * @param channel the channel.
-     */
-    public ConnectPossibleEvent( final Channel channel,
-                                 final Object userData,
-                                 final SelectionKey key )
-    {
-        super( channel, userData );
-        _key = key;
-    }
-
-    public SelectionKey getKey()
-    {
-        return _key;
-    }
-}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file63" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>DataPresentEvent.java</b></big> <small id="info">removed after 1.5</small></div>
<pre class="diff"><small id="info">diff -N DataPresentEvent.java
--- DataPresentEvent.java	17 May 2004 06:21:38 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.events;
-
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.5 $ $Date: 2004/05/17 06:21:38 $
- */
-public abstract class DataPresentEvent
-    extends AbstractTransportEvent
-{
-    /** The number of bytes present. */
-    private final int _count;
-
-    public DataPresentEvent( final ChannelTransport transport, final int count )
-    {
-        super( transport );
-        _count = count;
-    }
-
-    /**
-     * @see AbstractTransportEvent#getEventDescription()
-     */
-    protected String getEventDescription()
-    {
-        return "count=" + _count + " " + super.getEventDescription();
-    }
-}
</pre></div>
<hr /><a name="file64" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>IOErrorEvent.java</b></big> <small id="info">removed after 1.5</small></div>
<pre class="diff"><small id="info">diff -N IOErrorEvent.java
--- IOErrorEvent.java	17 May 2004 06:21:38 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,58 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import java.io.IOException;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Abstract event for IO errors.
- * 
- * @author Peter Donald
- * @version $Revision: 1.5 $ $Date: 2004/05/17 06:21:38 $
- */
-public abstract class IOErrorEvent
-    extends AbstractTransportEvent
-{
-    /** The Error. */
-    private final IOException m_ioe;
-
-    /**
-     * Create event for transport with error.
-     * 
-     * @param transport the transport
-     * @param ioe the error
-     */
-    public IOErrorEvent( final ChannelTransport transport, final IOException ioe )
-    {
-        super( transport );
-        if( null == ioe )
-        {
-            throw new NullPointerException( "ioe" );
-        }
-        m_ioe = ioe;
-    }
-
-    /**
-     * Return the error.
-     * 
-     * @return the error.
-     */
-    public IOException getIoe()
-    {
-        return m_ioe;
-    }
-
-    /**
-     * @see AbstractTransportEvent#getEventDescription()
-     */
-    protected String getEventDescription()
-    {
-        return getIoe() + " error connected to " + super.getEventDescription();
-    }
-}
</pre></div>
<hr /><a name="file65" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>InputDataPresentEvent.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N InputDataPresentEvent.java
--- InputDataPresentEvent.java	17 May 2004 06:21:38 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Event indicating more data ready in stream were read.
- * 
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 06:21:38 $
- */
-public class InputDataPresentEvent
-    extends DataPresentEvent
-{
-    /**
-     * Create event.
-     * 
-     * @param transport the transport
-     */
-    public InputDataPresentEvent( final ChannelTransport transport, final int count )
-    {
-        super( transport, count );
-    }
-}
</pre></div>
<hr /><a name="file66" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>OutputDataPresentEvent.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N OutputDataPresentEvent.java
--- OutputDataPresentEvent.java	17 May 2004 06:21:38 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Event indicating more data is ready to be written.
- * 
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 06:21:38 $
- */
-public class OutputDataPresentEvent
-    extends DataPresentEvent
-{
-    /**
-     * Create event.
-     * 
-     * @param transport the transport
-     */
-    public OutputDataPresentEvent( final ChannelTransport transport, final int count )
-    {
-        super( transport, count );
-    }
-}
</pre></div>
<hr /><a name="file67" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>ReadErrorEvent.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N ReadErrorEvent.java
--- ReadErrorEvent.java	17 May 2004 06:21:38 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import java.io.IOException;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * An Event indicating a read error.
- * 
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 06:21:38 $
- */
-public class ReadErrorEvent
-    extends IOErrorEvent
-{
-    /**
-     * Create event.
-     * 
-     * @param transport the transport
-     * @param ioe the error
-     */
-    public ReadErrorEvent( final ChannelTransport transport, final IOException ioe )
-    {
-        super( transport, ioe );
-    }
-}
</pre></div>
<hr /><a name="file68" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>ReadEvent.java</b></big> <small id="info">removed after 1.6</small></div>
<pre class="diff"><small id="info">diff -N ReadEvent.java
--- ReadEvent.java	17 May 2004 06:21:38 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,59 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import java.nio.ByteBuffer;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Event indicating events were read.
- * 
- * @author Peter Donald
- * @version $Revision: 1.6 $ $Date: 2004/05/17 06:21:38 $
- */
-public class ReadEvent
-    extends AbstractTransportEvent
-{
-    /** The Buffer. */
-    private final ByteBuffer m_buffer;
-
-    /**
-     * Create event.
-     * 
-     * @param transport the transport
-     * @param buffer the ByteBuffer
-     */
-    public ReadEvent( final ChannelTransport transport, final ByteBuffer buffer )
-    {
-        super( transport );
-        if( null == buffer )
-        {
-            throw new NullPointerException( "buffer" );
-        }
-        m_buffer = buffer;
-    }
-
-    /**
-     * Return the ByteBuffer.
-     * 
-     * @return the ByteBuffer.
-     */
-    public ByteBuffer getBuffer()
-    {
-        return m_buffer;
-    }
-
-    /**
-     * @see AbstractTransportEvent#getEventDescription()
-     */
-    protected String getEventDescription()
-    {
-        final int count = getBuffer().limit();
-        return "count=" + count + " " + super.getEventDescription();
-    }
-}
</pre></div>
<hr /><a name="file69" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>ReadPossibleEvent.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N ReadPossibleEvent.java
--- ReadPossibleEvent.java	17 May 2004 06:21:38 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Event indicating that it is possible to read from the socket.
- * 
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 06:21:38 $
- */
-public class ReadPossibleEvent
-    extends AbstractTransportEvent
-{
-    /**
-     * Create Event.
-     * 
-     * @param transport the transport
-     */
-    public ReadPossibleEvent( final ChannelTransport transport )
-    {
-        super( transport );
-    }
-}
</pre></div>
<hr /><a name="file70" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>WriteErrorEvent.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N WriteErrorEvent.java
--- WriteErrorEvent.java	17 May 2004 06:21:38 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import java.io.IOException;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Event indicating a write error occured.
- * 
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 06:21:38 $
- */
-public class WriteErrorEvent
-    extends IOErrorEvent
-{
-    /**
-     * Create event.
-     * 
-     * @param transport the transport
-     * @param ioe the error
-     */
-    public WriteErrorEvent( final ChannelTransport transport, final IOException ioe )
-    {
-        super( transport, ioe );
-    }
-}
</pre></div>
<hr /><a name="file71" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>WriteEvent.java</b></big> <small id="info">removed after 1.4</small></div>
<pre class="diff"><small id="info">diff -N WriteEvent.java
--- WriteEvent.java	17 May 2004 06:21:38 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * An Event indicating a write.
- * 
- * @author Peter Donald
- * @version $Revision: 1.4 $ $Date: 2004/05/17 06:21:38 $
- */
-public class WriteEvent
-    extends AbstractTransportEvent
-{
-    /** The number of bytes written. */
-    private final int _count;
-
-    /**
-     * Create event.
-     * 
-     * @param transport the transport
-     */
-    public WriteEvent( final ChannelTransport transport, final int count )
-    {
-        super( transport );
-        _count = count;
-    }
-
-    /**
-     * Return the number of bytes written.
-     * 
-     * @return the number of bytes written.
-     */
-    public int getCount()
-    {
-        return _count;
-    }
-
-    /**
-     * @see AbstractTransportEvent#getEventDescription()
-     */
-    protected String getEventDescription()
-    {
-        return "count=" + getCount() + " " + super.getEventDescription();
-    }
-}
</pre></div>
<hr /><a name="file72" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>WritePossibleEvent.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N WritePossibleEvent.java
--- WritePossibleEvent.java	17 May 2004 06:21:38 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.events;
-
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Event indicating that it is possible to read from the socket.
- * 
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 06:21:38 $
- */
-public class WritePossibleEvent
-    extends AbstractTransportEvent
-{
-    /**
-     * Create Event.
-     * 
-     * @param transport the transport
-     */
-    public WritePossibleEvent( final ChannelTransport transport )
-    {
-        super( transport );
-    }
-}
</pre></div>
<hr /><a name="file73" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>AbstractDirectedHandler.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N AbstractDirectedHandler.java
--- AbstractDirectedHandler.java	17 May 2004 06:21:38 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.handlers;
-
-import org.codehaus.spice.event.AbstractEventHandler;
-import org.codehaus.spice.event.EventSink;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/05/17 06:21:38 $
- */
-public abstract class AbstractDirectedHandler
-    extends AbstractEventHandler
-{
-    /** The destination sink for events. */
-    private final EventSink _sink;
-
-    /**
-     * Create handler with specified destination sink.
-     * 
-     * @param sink the destination
-     */
-    protected AbstractDirectedHandler( final EventSink sink )
-    {
-        if( null == sink )
-        {
-            throw new NullPointerException( "sink" );
-        }
-        _sink = sink;
-    }
-
-    /**
-     * Return the destination.
-     * 
-     * @return the destination.
-     */
-    protected EventSink getSink()
-    {
-        return _sink;
-    }
-}
</pre></div>
<hr /><a name="file74" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>AbstractIOEventHandler.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N AbstractIOEventHandler.java
--- AbstractIOEventHandler.java	17 May 2004 06:21:38 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,56 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.handlers;
-
-import java.nio.ByteBuffer;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.events.AbstractTransportEvent;
-
-/**
- * Abstract handler for IO based events.
- * 
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 06:21:38 $
- */
-public abstract class AbstractIOEventHandler
-    extends AbstractDirectedHandler
-{
-    /** The associated BufferManager. */
-    private final BufferManager _bufferManager;
-
-    /**
-     * Create handler with specified destination sink.
-     * 
-     * @param sink the destination
-     * @param bufferManager the bufferManager
-     */
-    protected AbstractIOEventHandler( final EventSink sink, final BufferManager bufferManager )
-    {
-        super( sink );
-        if( null == bufferManager )
-        {
-            throw new NullPointerException( "bufferManager" );
-        }
-        _bufferManager = bufferManager;
-    }
-
-    /**
-     * Aquire a buffer for specified event.
-     * 
-     * @param event the event
-     * @return the buffer
-     */
-    protected ByteBuffer aquireBuffer( final AbstractTransportEvent event )
-    {
-        return _bufferManager.aquireBuffer( 1024 * 8 );
-    }
-
-    /**
-     * Return the associated BufferManager.
-     * 
-     * @return the associated BufferManager.
-     */
-    protected BufferManager getBufferManager()
-    {
-        return _bufferManager;
-    }
-}
</pre></div>
<hr /><a name="file75" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>AcceptEventHandler.java</b></big> <small id="info">removed after 1.5</small></div>
<pre class="diff"><small id="info">diff -N AcceptEventHandler.java
--- AcceptEventHandler.java	17 May 2004 06:21:38 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,60 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.handlers;
-
-import java.io.IOException;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.events.AcceptErrorEvent;
-import org.codehaus.spice.netevent.events.AcceptEvent;
-import org.codehaus.spice.netevent.events.AcceptPossibleEvent;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.5 $ $Date: 2004/05/17 06:21:38 $
- */
-public class AcceptEventHandler
-    extends AbstractDirectedHandler
-{
-    public AcceptEventHandler( final EventSink sink )
-    {
-        super( sink );
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        final AcceptPossibleEvent ce = (AcceptPossibleEvent) event;
-        final ServerSocketChannel ssChannel = (ServerSocketChannel) ce.getChannel();
-        if( !ssChannel.isOpen() )
-        {
-            return;
-        }
-
-        try
-        {
-            final SocketChannel channel = ssChannel.accept();
-            if( null != channel )
-            {
-                final AcceptEvent result = new AcceptEvent( channel );
-                getSink().addEvent( result );
-            }
-        }
-        catch( final IOException ioe )
-        {
-            final AcceptErrorEvent error = new AcceptErrorEvent( ssChannel,
-                                                                 ce.getUserData(),
-                                                                 ioe );
-            getSink().addEvent( error );
-        }
-    }
-}
</pre></div>
<hr /><a name="file76" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>ChannelEventHandler.java</b></big> <small id="info">removed after 1.14</small></div>
<pre class="diff"><small id="info">diff -N ChannelEventHandler.java
--- ChannelEventHandler.java	17 May 2004 06:21:38 -0000	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,90 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.handlers;
-
-import org.codehaus.spice.event.AbstractEventHandler;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.events.AcceptEvent;
-import org.codehaus.spice.netevent.events.AcceptPossibleEvent;
-import org.codehaus.spice.netevent.events.CloseChannelRequestEvent;
-import org.codehaus.spice.netevent.events.ConnectPossibleEvent;
-import org.codehaus.spice.netevent.events.IOErrorEvent;
-import org.codehaus.spice.netevent.events.OutputDataPresentEvent;
-import org.codehaus.spice.netevent.events.ReadEvent;
-import org.codehaus.spice.netevent.events.ReadPossibleEvent;
-import org.codehaus.spice.netevent.events.WritePossibleEvent;
-import org.codehaus.spice.netevent.source.SelectableChannelEventSource;
-
-/**
- * An event handler that is capable of handling any of the standard channel
- * events.
- * 
- * @author Peter Donald
- * @version $Revision: 1.14 $ $Date: 2004/05/17 06:21:38 $
- */
-public class ChannelEventHandler
-    extends AbstractEventHandler
-{
-    private final InputDataEventHandler _inputHandler;
-    private final OutputDataEventHandler _outputHandler;
-    private final CloseEventHandler _closeHandler;
-    private final ReadEventHandler _readHandler;
-    private final WriteEventHandler _writeHandler;
-    private final AcceptEventHandler _acceptHandler;
-    private final ClientConnectEventHandler _clientConnectHandler;
-    private final ConnectEventHandler _connectHandler;
-
-    public ChannelEventHandler( final SelectableChannelEventSource source,
-                                final EventSink queue,
-                                final EventSink target,
-                                final BufferManager bufferManager )
-    {
-        _closeHandler = new CloseEventHandler( target );
-        _acceptHandler = new AcceptEventHandler( queue );
-        _connectHandler = new ConnectEventHandler( queue, target, bufferManager, source );
-        _readHandler = new ReadEventHandler( queue, bufferManager );
-        _writeHandler = new WriteEventHandler( queue, bufferManager );
-        _inputHandler = new InputDataEventHandler( target );
-        _outputHandler = new OutputDataEventHandler( queue );
-        _clientConnectHandler = new ClientConnectEventHandler( queue, target, bufferManager );
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        if( event instanceof CloseChannelRequestEvent || event instanceof IOErrorEvent )
-        {
-            _closeHandler.handleEvent( event );
-        }
-        else if( event instanceof ConnectPossibleEvent )
-        {
-            _clientConnectHandler.handleEvent( event );
-        }
-        else if( event instanceof AcceptPossibleEvent )
-        {
-            _acceptHandler.handleEvent( event );
-        }
-        else if( event instanceof AcceptEvent )
-        {
-            _connectHandler.handleEvent( event );
-        }
-        else if( event instanceof ReadPossibleEvent )
-        {
-            _readHandler.handleEvent( event );
-        }
-        else if( event instanceof WritePossibleEvent )
-        {
-            _writeHandler.handleEvent( event );
-        }
-        else if( event instanceof ReadEvent )
-        {
-            _inputHandler.handleEvent( event );
-        }
-        else if( event instanceof OutputDataPresentEvent )
-        {
-            _outputHandler.handleEvent( event );
-        }
-    }
-}
</pre></div>
<hr /><a name="file77" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>ClientConnectEventHandler.java</b></big> <small id="info">removed after 1.12</small></div>
<pre class="diff"><small id="info">diff -N ClientConnectEventHandler.java
--- ClientConnectEventHandler.java	17 May 2004 06:21:38 -0000	1.12
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,89 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.handlers;
-
-import java.io.IOException;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.SocketChannel;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.event.impl.collections.UnboundedFifoBuffer;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.events.ConnectErrorEvent;
-import org.codehaus.spice.netevent.events.ConnectEvent;
-import org.codehaus.spice.netevent.events.ConnectPossibleEvent;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Handler for Connecting a socket (which means creating a transport and
- * registering it for events).
- * 
- * @author Peter Donald
- * @version $Revision: 1.12 $ $Date: 2004/05/17 06:21:38 $
- */
-public class ClientConnectEventHandler
-    extends AbstractIOEventHandler
-{
-    /**
-     * The destination for events relating to next layer.
-     */
-    private EventSink _target;
-
-    /**
-     * Create handler with specified destination sink.
-     * 
-     * @param sink the destination
-     * @param bufferManager the bufferManager
-     */
-    public ClientConnectEventHandler( final EventSink sink,
-                                      final EventSink target,
-                                      final BufferManager bufferManager )
-    {
-        super( sink, bufferManager );
-        if( null == target )
-        {
-            throw new NullPointerException( "target" );
-        }
-        _target = target;
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        final ConnectPossibleEvent ce = (ConnectPossibleEvent) event;
-        final SocketChannel channel = (SocketChannel) ce.getChannel();
-        if( !channel.isConnectionPending() )
-        {
-            return;
-        }
-
-        final ChannelTransport transport = new ChannelTransport( channel,
-                                                                 new UnboundedFifoBuffer( 4 ),
-                                                                 getBufferManager(),
-                                                                 getSink() );
-        transport.setUserData( ce.getUserData() );
-        final SelectionKey key = ce.getKey();
-        transport.setKey( key );
-        key.attach( transport );
-        try
-        {
-            channel.finishConnect();
-            final ConnectEvent response = new ConnectEvent( transport );
-            _target.addEvent( response );
-            transport.reregister();
-        }
-        catch( final IOException ioe )
-        {
-            transport.close();
-            final ConnectErrorEvent error = new ConnectErrorEvent( transport, ioe );
-            _target.addEvent( error );
-        }
-    }
-}
</pre></div>
<hr /><a name="file78" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>CloseEventHandler.java</b></big> <small id="info">removed after 1.4</small></div>
<pre class="diff"><small id="info">diff -N CloseEventHandler.java
--- CloseEventHandler.java	17 May 2004 06:21:38 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,49 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.handlers;
-
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.events.AbstractTransportEvent;
-import org.codehaus.spice.netevent.events.ChannelClosedEvent;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Simple handler that closes underlying transport.
- * 
- * @author Peter Donald
- * @version $Revision: 1.4 $ $Date: 2004/05/17 06:21:38 $
- */
-public class CloseEventHandler
-    extends AbstractDirectedHandler
-{
-    /**
-     * Create handler with specified target.
-     * 
-     * @param sink the destination sink
-     */
-    public CloseEventHandler( final EventSink sink )
-    {
-        super( sink );
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        final AbstractTransportEvent ce = (AbstractTransportEvent) event;
-        final ChannelTransport transport = ce.getTransport();
-        if( !transport.isClosed() )
-        {
-            transport.close();
-            final ChannelClosedEvent result = new ChannelClosedEvent( transport );
-            getSink().addEvent( result );
-        }
-    }
-}
</pre></div>
<hr /><a name="file79" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>ConnectEventHandler.java</b></big> <small id="info">removed after 1.15</small></div>
<pre class="diff"><small id="info">diff -N ConnectEventHandler.java
--- ConnectEventHandler.java	17 May 2004 06:21:38 -0000	1.15
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,101 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.handlers;
-
-import java.io.IOException;
-import java.nio.channels.Channel;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.spi.AbstractSelectableChannel;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.event.impl.collections.UnboundedFifoBuffer;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.events.AcceptEvent;
-import org.codehaus.spice.netevent.events.ConnectErrorEvent;
-import org.codehaus.spice.netevent.events.ConnectEvent;
-import org.codehaus.spice.netevent.source.SelectableChannelEventSource;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Handler for Connecting a socket (which means creating a transport and
- * registering it for events).
- * 
- * @author Peter Donald
- * @version $Revision: 1.15 $ $Date: 2004/05/17 06:21:38 $
- */
-public class ConnectEventHandler
-    extends AbstractIOEventHandler
-{
-    /**
-     * Handler to pass events on to.
-     */
-    private final SelectableChannelEventSource _source;
-
-    /**
-     * Handler to pass high-level events on to.
-     */
-    private final EventSink _target;
-
-    /**
-     * Create handler with specified destination sink.
-     * 
-     * @param sink the destination
-     * @param bufferManager the bufferManager
-     * @param source the source
-     */
-    public ConnectEventHandler( final EventSink sink,
-                                final EventSink target,
-                                final BufferManager bufferManager,
-                                final SelectableChannelEventSource source )
-    {
-        super( sink, bufferManager );
-        if( null == target )
-        {
-            throw new NullPointerException( "target" );
-        }
-        if( null == source )
-        {
-            throw new NullPointerException( "source" );
-        }
-        _target = target;
-        _source = source;
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        final AcceptEvent ce = (AcceptEvent) event;
-        final Channel channel = ce.getChannel();
-        if( !channel.isOpen() )
-        {
-            return;
-        }
-
-        final ChannelTransport transport = new ChannelTransport( channel,
-                                                                 new UnboundedFifoBuffer( 4 ),
-                                                                 getBufferManager(),
-                                                                 getSink() );
-        try
-        {
-            final AbstractSelectableChannel asc = (AbstractSelectableChannel) channel;
-            final SelectionKey key = _source.registerChannel( asc, 0, transport );
-            transport.setKey( key );
-            transport.reregister();
-            final ConnectEvent response = new ConnectEvent( transport );
-            _target.addEvent( response );
-        }
-        catch( final IOException ioe )
-        {
-            transport.close();
-            final ConnectErrorEvent error = new ConnectErrorEvent( transport, ioe );
-            _target.addEvent( error );
-        }
-    }
-}
</pre></div>
<hr /><a name="file80" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>InputDataEventHandler.java</b></big> <small id="info">removed after 1.6</small></div>
<pre class="diff"><small id="info">diff -N InputDataEventHandler.java
--- InputDataEventHandler.java	17 May 2004 06:21:38 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,43 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.handlers;
-
-import java.nio.ByteBuffer;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.events.InputDataPresentEvent;
-import org.codehaus.spice.netevent.events.ReadEvent;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-import org.codehaus.spice.netevent.transport.MultiBufferInputStream;
-
-/**
- * Stuff data into stream and send resultent event.
- * 
- * @author Peter Donald
- * @version $Revision: 1.6 $ $Date: 2004/05/17 06:21:38 $
- */
-public class InputDataEventHandler
-    extends AbstractDirectedHandler
-{
-    /**
-     * Create handler with specified destination sink.
-     * 
-     * @param sink the destination
-     */
-    public InputDataEventHandler( final EventSink sink )
-    {
-        super( sink );
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        final ReadEvent re = (ReadEvent) event;
-        final ChannelTransport transport = re.getTransport();
-        final ByteBuffer buffer = re.getBuffer();
-        final MultiBufferInputStream in = transport.getInputStream();
-        transport.setLastRxTime( System.currentTimeMillis() );
-        in.addBuffer( buffer );
-        getSink().addEvent( new InputDataPresentEvent( transport, in.available() ) );
-    }
-}
</pre></div>
<hr /><a name="file81" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>OutputDataEventHandler.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N OutputDataEventHandler.java
--- OutputDataEventHandler.java	17 May 2004 06:21:38 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,36 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.handlers;
-
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.events.OutputDataPresentEvent;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Stuff data into stream and send resultent event.
- * 
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/05/17 06:21:38 $
- */
-public class OutputDataEventHandler
-    extends AbstractDirectedHandler
-{
-    /**
-     * Create handler with specified destination sink.
-     * 
-     * @param sink the destination
-     */
-    public OutputDataEventHandler( final EventSink sink )
-    {
-        super( sink );
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        final OutputDataPresentEvent oe = (OutputDataPresentEvent) event;
-        final ChannelTransport transport = oe.getTransport();
-        transport.reregister();
-    }
-}
</pre></div>
<hr /><a name="file82" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>ReadEventHandler.java</b></big> <small id="info">removed after 1.7</small></div>
<pre class="diff"><small id="info">diff -N ReadEventHandler.java
--- ReadEventHandler.java	17 May 2004 06:21:38 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,82 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.handlers;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.channels.ReadableByteChannel;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.events.CloseChannelRequestEvent;
-import org.codehaus.spice.netevent.events.ReadErrorEvent;
-import org.codehaus.spice.netevent.events.ReadEvent;
-import org.codehaus.spice.netevent.events.ReadPossibleEvent;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Handler for reading data from channel.
- * 
- * @author Peter Donald
- * @version $Revision: 1.7 $ $Date: 2004/05/17 06:21:38 $
- */
-public class ReadEventHandler
-    extends AbstractIOEventHandler
-{
-    /**
-     * Create handler with specified destination sink.
-     * 
-     * @param sink the destination
-     * @param bufferManager the bufferManager
-     */
-    public ReadEventHandler( final EventSink sink, final BufferManager bufferManager )
-    {
-        super( sink, bufferManager );
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        final ReadPossibleEvent ce = (ReadPossibleEvent) event;
-        final ChannelTransport transport = ce.getTransport();
-        final ReadableByteChannel channel = (ReadableByteChannel) transport.getChannel();
-        if( !channel.isOpen() )
-        {
-            return;
-        }
-
-        final ByteBuffer buffer = aquireBuffer( ce );
-        try
-        {
-            final int count = channel.read( buffer );
-            if( -1 == count )
-            {
-                final CloseChannelRequestEvent result = new CloseChannelRequestEvent( transport );
-                getSink().addEvent( result );
-                getBufferManager().releaseBuffer( buffer );
-            }
-            else if( 0 == count )
-            {
-                getBufferManager().releaseBuffer( buffer );
-            }
-            else
-            {
-                buffer.flip();
-                final ReadEvent result = new ReadEvent( transport, buffer );
-                getSink().addEvent( result );
-            }
-        }
-        catch( final IOException ioe )
-        {
-            final ReadErrorEvent error = new ReadErrorEvent( transport, ioe );
-            getSink().addEvent( error );
-        }
-    }
-}
</pre></div>
<hr /><a name="file83" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>WriteEventHandler.java</b></big> <small id="info">removed after 1.8</small></div>
<pre class="diff"><small id="info">diff -N WriteEventHandler.java
--- WriteEventHandler.java	17 May 2004 06:21:38 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,92 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.handlers;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.channels.WritableByteChannel;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.event.impl.collections.Buffer;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.events.WriteErrorEvent;
-import org.codehaus.spice.netevent.events.WriteEvent;
-import org.codehaus.spice.netevent.events.WritePossibleEvent;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * Handler for writing data to channel.
- * 
- * @author Peter Donald
- * @version $Revision: 1.8 $ $Date: 2004/05/17 06:21:38 $
- */
-public class WriteEventHandler
-    extends AbstractIOEventHandler
-{
-    /**
-     * Create handler with specified destination sink.
-     * 
-     * @param sink the destination
-     * @param bufferManager the bufferManager
-     */
-    public WriteEventHandler( final EventSink sink, final BufferManager bufferManager )
-    {
-        super( sink, bufferManager );
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        final WritePossibleEvent we = (WritePossibleEvent) event;
-        final ChannelTransport transport = we.getTransport();
-        final WritableByteChannel channel = (WritableByteChannel) transport.getChannel();
-        if( !channel.isOpen() )
-        {
-            return;
-        }
-
-        final Buffer transmitBuffer = transport.getTransmitBuffer();
-        final ByteBuffer buffer = (ByteBuffer) transmitBuffer.peek();
-        if( null == buffer )
-        {
-            return;
-        }
-        final int remaining = buffer.remaining();
-        if( 0 == remaining )
-        {
-            releaseBuffer( transmitBuffer, transport, buffer );
-            return;
-        }
-        try
-        {
-            final int count = channel.write( buffer );
-            if( remaining == count )
-            {
-                releaseBuffer( transmitBuffer, transport, buffer );
-            }
-            transport.setLastTxTime( System.currentTimeMillis() );
-            getSink().addEvent( new WriteEvent( transport, count ) );
-        }
-        catch( final IOException ioe )
-        {
-            final WriteErrorEvent error = new WriteErrorEvent( transport, ioe );
-            getSink().addEvent( error );
-        }
-    }
-
-    private void releaseBuffer( final Buffer transmitBuffer,
-                                final ChannelTransport transport,
-                                final ByteBuffer buffer )
-    {
-        transmitBuffer.pop();
-        transport.reregister();
-        getBufferManager().releaseBuffer( buffer );
-    }
-}
</pre></div>
<hr /><a name="file84" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/source<br /></span>
<div class="fileheader" id="removed"><big><b>SelectableChannelEventSource.java</b></big> <small id="info">removed after 1.11</small></div>
<pre class="diff"><small id="info">diff -N SelectableChannelEventSource.java
--- SelectableChannelEventSource.java	17 May 2004 06:21:39 -0000	1.11
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,189 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.source;
-
-import java.io.IOException;
-import java.nio.channels.SelectableChannel;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.Selector;
-import java.nio.channels.ServerSocketChannel;
-import java.util.Iterator;
-import java.util.Set;
-import org.codehaus.spice.event.EventJoin;
-import org.codehaus.spice.event.impl.AbstractEventSource;
-import org.codehaus.spice.netevent.events.AcceptPossibleEvent;
-import org.codehaus.spice.netevent.events.ConnectPossibleEvent;
-import org.codehaus.spice.netevent.events.ReadPossibleEvent;
-import org.codehaus.spice.netevent.events.WritePossibleEvent;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * An event source that generates events based from SelectableChannels.
- *
- * @author Peter Donald
- * @version $Revision: 1.11 $ $Date: 2004/05/17 06:21:39 $
- */
-public class SelectableChannelEventSource
-    extends AbstractEventSource
-{
-    /**
-     * The source used to schedule events.
-     */
-    private Selector _selector;
-
-    /**
-     * The amount of time to wait in select.
-     */
-    private long _selectTimeout = -1;
-
-    /**
-     * Create source.
-     *
-     * @param join the join
-     * @throws IOException if error creating source.
-     */
-    public SelectableChannelEventSource( final EventJoin join )
-        throws IOException
-    {
-        super( join );
-        open();
-    }
-
-    /**
-     * Specify the timeout to use.
-     * Note that this should not be 0 as it can cause a deadlock. If
-     * no events wake up the polling thread and another threads wishes
-     * to request a channel close it is possible that requester will
-     * not be able to aquire lock. In which case it is recomended that
-     * a timeout of 200 or similar is utilized.
-     *
-     * @param selectTimeout the timeout
-     */
-    public void setSelectTimeout( final long selectTimeout )
-    {
-        _selectTimeout = selectTimeout;
-    }
-
-    /**
-     * Register channel with source.
-     *
-     * @param channel the channel
-     * @param ops the operations interested in
-     * @param userData the associated userdata (if any)
-     * @return the SelectionKey
-     * @throws IOException if unable to register with source
-     */
-    public synchronized SelectionKey registerChannel( final SelectableChannel channel,
-                                                      final int ops,
-                                                      final Object userData )
-        throws IOException
-    {
-        if( null == _selector )
-        {
-            throw new IOException( "_selector == null" );
-        }
-        channel.configureBlocking( false );
-        _selector.wakeup();
-        return channel.register( _selector, ops, userData );
-    }
-
-    /**
-     * @see AbstractEventSource#open()
-     */
-    public synchronized void open()
-        throws IOException
-    {
-        _selector = Selector.open();
-    }
-
-    /**
-     * @see AbstractEventSource#close()
-     */
-    public synchronized void close()
-        throws IOException
-    {
-        _selector.wakeup();
-        _selector.close();
-        _selector = null;
-    }
-
-    /**
-     * @see AbstractEventSource#refresh()
-     */
-    protected void refresh()
-    {
-        final Selector selector;
-        synchronized( this )
-        {
-            selector = _selector;
-        }
-        if( null == selector )
-        {
-            return;
-        }
-        try
-        {
-            selector.selectedKeys().clear();
-            if( 0 &gt; _selectTimeout )
-            {
-                selector.selectNow();
-            }
-            else
-            {
-                selector.select( _selectTimeout );
-            }
-        }
-        catch( final IOException ioe )
-        {
-            return;
-        }
-        final Set keys = selector.selectedKeys();
-        final Iterator iterator = keys.iterator();
-
-        // Walk through the ready keys collection and process date requests.
-        while( iterator.hasNext() )
-        {
-            final SelectionKey key = (SelectionKey) iterator.next();
-            iterator.remove();
-            handleSelectorEvent( key );
-        }
-    }
-
-    /**
-     * Handle event on specified SelectionKey.
-     *
-     * @param key the SelectionKey.
-     */
-    private void handleSelectorEvent( final SelectionKey key )
-    {
-        if( !key.isValid() )
-        {
-            return;
-        }
-        final Object userData = key.attachment();
-
-        if( key.isAcceptable() )
-        {
-            final ServerSocketChannel channel = (ServerSocketChannel) key.channel();
-            final AcceptPossibleEvent event = new AcceptPossibleEvent( channel, userData );
-            getJoin().addEvent( event );
-        }
-        if( key.isWritable() )
-        {
-            final ChannelTransport transport = (ChannelTransport) userData;
-            final WritePossibleEvent event = new WritePossibleEvent( transport );
-            getJoin().addEvent( event );
-        }
-        if( key.isReadable() )
-        {
-            final ChannelTransport transport = (ChannelTransport) userData;
-            final ReadPossibleEvent event = new ReadPossibleEvent( transport );
-            getJoin().addEvent( event );
-        }
-        if( key.isConnectable() )
-        {
-            final ConnectPossibleEvent event = new ConnectPossibleEvent( key.channel(),
-                                                                         userData,
-                                                                         key );
-            getJoin().addEvent( event );
-        }
-    }
-}
</pre></div>
<hr /><a name="file85" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/transport<br /></span>
<div class="fileheader" id="removed"><big><b>ChannelTransport.java</b></big> <small id="info">removed after 1.26</small></div>
<pre class="diff"><small id="info">diff -N ChannelTransport.java
--- ChannelTransport.java	17 May 2004 06:21:39 -0000	1.26
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,334 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.transport;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.channels.Channel;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.SocketChannel;
-import java.util.List;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.event.impl.collections.Buffer;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-
-/**
- * An underlying transport layer that uses TCP/IP.
- * 
- * @author Peter Donald
- * @version $Revision: 1.26 $ $Date: 2004/05/17 06:21:39 $
- */
-public class ChannelTransport
-{
-    /**
-     * The associated channel.
-     */
-    private final Channel m_channel;
-
-    /**
-     * The buffer used to store outgoing data.
-     */
-    private final Buffer m_transmitBuffer;
-
-    /**
-     * The Stream representing data received from channel.
-     */
-    private final MultiBufferInputStream m_inputStream;
-
-    /**
-     * The Stream representing data to transmit on channel.
-     */
-    private final TransportOutputStream m_outputStream;
-
-    /**
-     * The key used to register channel in source.
-     */
-    private SelectionKey m_key;
-
-    /**
-     * Associated userData.
-     */
-    private Object _userData;
-
-    /**
-     * Flag indicating whether transport is closed.
-     */
-    private boolean m_closed;
-
-    /**
-     * The number of bytes transmitted.
-     */
-    private long _txByteCount;
-
-    /**
-     * The number of bytes received.
-     */
-    private long _rxByteCount;
-
-    /**
-     * The time of last transmit.
-     */
-    private long _lastTxTime;
-
-    /**
-     * The time of last receive.
-     */
-    private long _lastRxTime;
-
-    /**
-     * Create transport.
-     *
-     * @param channel the underlying channel
-     * @param transmitBuffer the transmit buffer
-     */
-    public ChannelTransport( final Channel channel,
-                             final Buffer transmitBuffer,
-                             final BufferManager bufferManager,
-                             final EventSink sink )
-    {
-        if( null == channel )
-        {
-            throw new NullPointerException( "channel" );
-        }
-        if( null == transmitBuffer )
-        {
-            throw new NullPointerException( "transmitBuffer" );
-        }
-        m_channel = channel;
-        m_transmitBuffer = transmitBuffer;
-        m_inputStream = new MultiBufferInputStream( bufferManager, this, sink );
-        m_outputStream = new TransportOutputStream( bufferManager, this, sink, 1024 * 8 );
-    }
-
-    public long getLastTxTime()
-    {
-        return _lastTxTime;
-    }
-
-    public void setLastTxTime( final long lastTxTime )
-    {
-        _lastTxTime = lastTxTime;
-    }
-
-    public long getLastRxTime()
-    {
-        return _lastRxTime;
-    }
-
-    public void setLastRxTime( final long lastRxTime )
-    {
-        _lastRxTime = lastRxTime;
-    }
-
-    /**
-     * Return the SelectionKey.
-     *
-     * @return the SelectionKey.
-     */
-    public SelectionKey getKey()
-    {
-        return m_key;
-    }
-
-    /**
-     * Return the associated user data.
-     *
-     * @return the associated user data.
-     */
-    public Object getUserData()
-    {
-        return _userData;
-    }
-
-    /**
-     * Set the associated user data.
-     *
-     * @param userData the associated user data.
-     */
-    public void setUserData( final Object userData )
-    {
-        _userData = userData;
-    }
-
-    /**
-     * Return the operations transport can is waiting on. The value is the AND of
-     * {@link SelectionKey#OP_WRITE} and {@link SelectionKey#OP_READ} masks.
-     *
-     * @return the operations transport will wait on.
-     */
-    public int getSelectOps()
-    {
-        int ops = SelectionKey.OP_READ;
-        if( getTransmitBuffer().size() &gt; 0 )
-        {
-            ops |= SelectionKey.OP_WRITE;
-        }
-        final Channel channel = getChannel();
-        if( channel instanceof SocketChannel )
-        {
-            final SocketChannel sc = (SocketChannel) channel;
-            if( !sc.isConnected() )
-            {
-                ops |= SelectionKey.OP_CONNECT;
-            }
-        }
-        return ops;
-    }
-
-    /**
-     * Get underlying channel for transport.
-     *
-     * @return the channel
-     */
-    public Channel getChannel()
-    {
-        return m_channel;
-    }
-
-    /**
-     * Return the number of bytes queued for output.
-     *
-     * @return the number of bytes queued for output.
-     */
-    public long getOutputCount()
-    {
-        long count = 0;
-        final List list = m_transmitBuffer.toList();
-        for( int i = 0; i &lt; list.size(); i++ )
-        {
-            final ByteBuffer buffer = (ByteBuffer) list.get( i );
-            count += buffer.remaining();
-        }
-        return count;
-    }
-
-    public long getRxByteCount()
-    {
-        return _rxByteCount;
-    }
-
-    public void incRxByteCount()
-    {
-        _rxByteCount++;
-    }
-
-    public void setRxByteCount( final long rxByteCount )
-    {
-        _rxByteCount = rxByteCount;
-    }
-
-    public void incTxByteCount()
-    {
-        _txByteCount++;
-    }
-
-    public long getTxByteCount()
-    {
-        return _txByteCount;
-    }
-
-    /**
-     * Return the write buffer.
-     *
-     * @return the write buffer.
-     */
-    public Buffer getTransmitBuffer()
-    {
-        return m_transmitBuffer;
-    }
-
-    /**
-     * Return the stream containing received data.
-     *
-     * @return the stream containing received data.
-     */
-    public MultiBufferInputStream getInputStream()
-    {
-        return m_inputStream;
-    }
-
-    /**
-     * Return the stream used to write output data for channel.
-     *
-     * @return the stream used to write output data for channel.
-     */
-    public TransportOutputStream getOutputStream()
-    {
-        return m_outputStream;
-    }
-
-    public synchronized void setKey( final SelectionKey key )
-    {
-        if( null != m_key )
-        {
-            m_key.cancel();
-            m_key = null;
-        }
-        m_key = key;
-    }
-
-    /**
-     * Reregister key operations. Call this after the transmit buffer has been
-     * modified.
-     */
-    public synchronized void reregister()
-    {
-        if( null != m_key &amp;&amp; m_key.isValid() )
-        {
-            m_key.interestOps( getSelectOps() );
-        }
-    }
-
-    /**
-     * Return true if transport is closed.
-     *
-     * @return true if transport is closed.
-     */
-    public boolean isClosed()
-    {
-        return m_closed;
-    }
-
-    /**
-     * Close the channel and disconnect the key.
-     */
-    public synchronized void close()
-    {
-        if( !m_closed )
-        {
-            m_closed = true;
-            m_outputStream.setClosed();
-            setKey( null );
-            if( m_channel.isOpen() )
-            {
-                try
-                {
-                    m_channel.close();
-                }
-                catch( final IOException ioe )
-                {
-                    //Ignore
-                }
-            }
-        }
-    }
-
-    public int getId()
-    {
-        return hashCode();
-    }
-
-    /**
-     * @see Object#toString()
-     */
-    public String toString()
-    {
-        return "[TransportID=" + getId() + ", channel=" + String.valueOf( getChannel() ) + " UserData=" + getUserData() +
-               "]";
-    }
-}
</pre></div>
<hr /><a name="file86" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/transport<br /></span>
<div class="fileheader" id="removed"><big><b>MultiBufferInputStream.java</b></big> <small id="info">removed after 1.9</small></div>
<pre class="diff"><small id="info">diff -N MultiBufferInputStream.java
--- MultiBufferInputStream.java	17 May 2004 06:21:39 -0000	1.9
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,327 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.transport;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-import java.util.Iterator;
-import java.util.LinkedList;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.events.CloseChannelRequestEvent;
-
-/**
- * This input stream will read data out of multiple ByteBuffer objects. The
- * developer adds ByteBuffers to the stream by calling {@link
- * #addBuffer(ByteBuffer)}. The buffers are recycled using the BufferManager
- * specified in the constructor.
- * 
- * @author Peter Donald
- * @version $Revision: 1.9 $ $Date: 2004/05/17 06:21:39 $
- */
-public class MultiBufferInputStream
-    extends InputStream
-{
-    /**
-     * The BufferManager to return Buffers to after they have been read.
-     */
-    private final BufferManager _bufferManager;
-
-    /**
-     * The underlying transport that this stream is linked to.
-     */
-    private final ChannelTransport _transport;
-
-    /**
-     * The sink ythat write requests are sent to.
-     */
-    private final EventSink _sink;
-
-    /**
-     * thye list of ByteBuffers.
-     */
-    private final LinkedList _buffers = new LinkedList();
-
-    /**
-     * The index of current buffer in linked list. -1 indicates that there is no
-     * current buffer.
-     */
-    private int _currentBuffer = -1;
-
-    /**
-     * The index into buffer 0 where mark is set. -1 indicates that there is no
-     * mark set.
-     */
-    private int _markBufferIndex = -1;
-
-    /**
-     * The amount of data required before mark can be removed.
-     */
-    private int _markDataRemaining = -1;
-
-    /**
-     * Flag set to true when close occurs after last buffer is cleared.
-     */
-    private boolean _closePending;
-
-    /**
-     * Flag set to true when stream actually closed.
-     */
-    private boolean _closed;
-
-    /**
-     * The number of bytes read at mark.
-     */
-    private long _markByteCount;
-
-    /**
-     * Create Stream that returns buffers to specified manager.
-     * 
-     * @param bufferManager the BufferManager
-     */
-    public MultiBufferInputStream( final BufferManager bufferManager,
-                                   final ChannelTransport transport,
-                                   final EventSink sink )
-    {
-        if( null == bufferManager )
-        {
-            throw new NullPointerException( "bufferManager" );
-        }
-        if( null == transport )
-        {
-            throw new NullPointerException( "transport" );
-        }
-        if( null == sink )
-        {
-            throw new NullPointerException( "sink" );
-        }
-        _bufferManager = bufferManager;
-        _transport = transport;
-        _sink = sink;
-    }
-
-    /**
-     * Add a buffer to list that stream is reading from.
-     * 
-     * @param buffer the buffer
-     */
-    public synchronized void addBuffer( final ByteBuffer buffer )
-    {
-        if( _closed )
-        {
-            return;
-        }
-        _buffers.addLast( buffer );
-        if( -1 == _currentBuffer )
-        {
-            _currentBuffer = 0;
-        }
-        notifyAll();
-    }
-
-    /**
-     * Set the flag that indicates that the underlying source has closed.
-     */
-    public synchronized void setClosePending()
-    {
-        _closePending = true;
-        notifyAll();
-    }
-
-    public boolean isClosed()
-    {
-        return _closed;
-    }
-
-    /**
-     * @see InputStream#close()
-     */
-    public synchronized void close()
-    {
-        if( !_closed )
-        {
-            setClosedState();
-            _sink.addEvent( new CloseChannelRequestEvent( _transport ) );
-            setClosePending();
-        }
-    }
-
-    /**
-     * Set up state for closed stream.
-     */
-    private void setClosedState()
-    {
-        _closed = true;
-        _buffers.clear();
-        _markBufferIndex = -1;
-        _currentBuffer = -1;
-    }
-
-    /**
-     * @see InputStream#read()
-     */
-    public synchronized int read()
-        throws IOException
-    {
-        if( _markDataRemaining &lt;= 0 &amp;&amp; -1 != _markBufferIndex )
-        {
-            clearMark();
-        }
-        _markDataRemaining--;
-
-        while( true )
-        {
-            if( _closed )
-            {
-                return -1;
-            }
-            else if( -1 == _currentBuffer &amp;&amp; _closePending )
-            {
-                setClosedState();
-                return -1;
-            }
-            else if( -1 != _currentBuffer )
-            {
-                final ByteBuffer buffer = (ByteBuffer) _buffers.get( _currentBuffer );
-                if( buffer.remaining() &gt; 0 )
-                {
-                    _transport.incRxByteCount();
-                    return buffer.get() &amp; 0xff;
-                }
-                else if( _currentBuffer + 1 != _buffers.size() )
-                {
-                    if( -1 == _markBufferIndex )
-                    {
-                        _bufferManager.releaseBuffer( buffer );
-                        _buffers.remove( 0 );
-                    }
-                    else
-                    {
-                        _currentBuffer++;
-                    }
-                    continue;
-                }
-                else if( _closePending )
-                {
-                    if( -1 == _markBufferIndex )
-                    {
-                        _bufferManager.releaseBuffer( buffer );
-                        _buffers.remove( 0 );
-                    }
-                    return -1;
-                }
-            }
-
-            try
-            {
-                wait();
-            }
-            catch( final InterruptedException ie )
-            {
-                //Ignored
-            }
-        }
-    }
-
-    /**
-     * @see InputStream#mark(int)
-     */
-    public synchronized void mark( final int readlimit )
-    {
-        if( -1 != _markBufferIndex )
-        {
-            clearMark();
-        }
-        _markDataRemaining = readlimit;
-        _markByteCount = _transport.getRxByteCount();
-        if( _currentBuffer &gt;= 0 )
-        {
-            final ByteBuffer buffer = (ByteBuffer) _buffers.get( 0 );
-            _markBufferIndex = buffer.position();
-        }
-        else
-        {
-            _markBufferIndex = 0;
-        }
-    }
-
-    /**
-     * @see InputStream#reset()
-     */
-    public synchronized void reset()
-        throws IOException
-    {
-        if( -1 != _markBufferIndex )
-        {
-            for( int i = 1; i &lt;= _currentBuffer; i++ )
-            {
-                final ByteBuffer buffer = (ByteBuffer) _buffers.get( i );
-                buffer.position( 0 );
-            }
-
-            if( _currentBuffer &gt;= 0 )
-            {
-                final ByteBuffer buffer = (ByteBuffer) _buffers.get( 0 );
-                buffer.position( _markBufferIndex );
-                _currentBuffer = 0;
-            }
-            _markBufferIndex = -1;
-            _transport.setRxByteCount( _markByteCount );
-        }
-        else
-        {
-            throw new IOException( "No such mark" );
-        }
-    }
-
-    /**
-     * @see InputStream#markSupported()
-     */
-    public boolean markSupported()
-    {
-        return true;
-    }
-
-    /**
-     * @see InputStream#available()
-     */
-    public synchronized int available()
-    {
-        if( _closed || -1 == _currentBuffer )
-        {
-            return 0;
-        }
-
-        int available = 0;
-        final int count = _buffers.size();
-        for( int i = _currentBuffer; i &lt; count; i++ )
-        {
-            final ByteBuffer buffer = (ByteBuffer) _buffers.get( i );
-            available += buffer.remaining();
-        }
-
-        return available;
-    }
-
-    /**
-     * Clear any marks that are set and reclaim the buffers as necessary.
-     */
-    protected synchronized void clearMark()
-    {
-        if( -1 == _markBufferIndex )
-        {
-            return;
-        }
-        else
-        {
-            _markBufferIndex = -1;
-            final Iterator iterator = _buffers.iterator();
-            while( iterator.hasNext() &amp;&amp; _currentBuffer &gt; 0 )
-            {
-                final ByteBuffer buffer = (ByteBuffer) iterator.next();
-                iterator.remove();
-                _bufferManager.releaseBuffer( buffer );
-                _currentBuffer--;
-            }
-        }
-    }
-}
</pre></div>
<hr /><a name="file87" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/java/org/codehaus/spice/netevent/transport<br /></span>
<div class="fileheader" id="removed"><big><b>TransportOutputStream.java</b></big> <small id="info">removed after 1.10</small></div>
<pre class="diff"><small id="info">diff -N TransportOutputStream.java
--- TransportOutputStream.java	17 May 2004 06:21:39 -0000	1.10
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,167 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.transport;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.events.CloseChannelRequestEvent;
-import org.codehaus.spice.netevent.events.OutputDataPresentEvent;
-
-/**
- * An output stream that will send chunks of data via transport.
- * 
- * @author Peter Donald
- * @version $Revision: 1.10 $ $Date: 2004/05/17 06:21:39 $
- */
-public class TransportOutputStream
-    extends OutputStream
-{
-    /**
-     * The bufferManager used to get buffers to store data in.
-     */
-    private final BufferManager _bufferManager;
-
-    /**
-     * The underlying transport that this stream is linked to.
-     */
-    private final ChannelTransport _transport;
-
-    /**
-     * The sink ythat write requests are sent to.
-     */
-    private final EventSink _sink;
-
-    /**
-     * The size of buffer requested.
-     */
-    private final int _bufferSize;
-
-    /**
-     * The current byte buffer that is written to. May be null.
-     */
-    private ByteBuffer _buffer;
-
-    /**
-     * The flag indicating whether stream is closed.
-     */
-    private boolean _closed;
-
-    /**
-     * Create output stream.
-     *
-     * @param bufferManager the bufferManager
-     * @param transport the transport
-     * @param sink the sink
-     */
-    public TransportOutputStream( final BufferManager bufferManager,
-                                  final ChannelTransport transport,
-                                  final EventSink sink,
-                                  final int bufferSize )
-    {
-        if( null == bufferManager )
-        {
-            throw new NullPointerException( "bufferManager" );
-        }
-        if( null == transport )
-        {
-            throw new NullPointerException( "transport" );
-        }
-        if( null == sink )
-        {
-            throw new NullPointerException( "sink" );
-        }
-        if( bufferSize &lt;= 0 )
-        {
-            throw new NullPointerException( "bufferSize &lt;= 0" );
-        }
-        _bufferManager = bufferManager;
-        _transport = transport;
-        _sink = sink;
-        _bufferSize = bufferSize;
-    }
-
-    /**
-     * @see OutputStream#write(int)
-     */
-    public synchronized void write( final int data )
-        throws IOException
-    {
-        if( _closed )
-        {
-            throw new EOFException();
-        }
-        ByteBuffer buffer = getBuffer();
-        if( 0 == buffer.remaining() )
-        {
-            flush();
-            buffer = getBuffer();
-        }
-
-        _transport.incTxByteCount();
-        buffer.put( (byte) data );
-    }
-
-    /**
-     * Return the current ByteBuffer or create a new one.
-     *
-     * @return the current ByteBuffer or create a new one.
-     */
-    protected ByteBuffer getBuffer()
-    {
-        if( null != _buffer )
-        {
-            return _buffer;
-        }
-        else
-        {
-            _buffer = _bufferManager.aquireBuffer( _bufferSize );
-            return _buffer;
-        }
-    }
-
-    /**
-     * @see OutputStream#flush()
-     */
-    public synchronized void flush()
-    {
-        if( null != _buffer )
-        {
-            _buffer.flip();
-            _transport.getTransmitBuffer().add( _buffer );
-            final OutputDataPresentEvent event = new OutputDataPresentEvent( _transport,
-                                                                             _buffer.limit() );
-            _sink.addEvent( event );
-            _buffer = null;
-        }
-    }
-
-    /**
-     * @see OutputStream#close()
-     */
-    public void close()
-    {
-        if( !_closed )
-        {
-            setClosed();
-            _sink.addEvent( new CloseChannelRequestEvent( _transport ) );
-        }
-    }
-
-    void setClosed()
-    {
-        flush();
-        _closed = true;
-    }
-
-    /**
-     * Return true if stream is closed.
-     *
-     * @return true if stream is closed.
-     */
-    public boolean isClosed()
-    {
-        return _closed;
-    }
-}
</pre></div>
<hr /><a name="file88" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/test/org/codehaus/spice/netevent<br /></span>
<div class="fileheader" id="removed"><big><b>EchoHandler.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N EchoHandler.java
--- EchoHandler.java	17 May 2004 06:21:39 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent;
-
-import org.codehaus.spice.event.AbstractEventHandler;
-import org.codehaus.spice.event.EventHandler;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/05/17 06:21:39 $
- */
-class EchoHandler
-    extends AbstractEventHandler
-{
-    private final EventHandler _eventHandler;
-    private final String _header;
-
-    EchoHandler( final String header, final EventHandler eventHandler )
-    {
-        _header = header;
-        _eventHandler = eventHandler;
-    }
-
-    public void handleEvent( final Object event )
-    {
-        if( null != _header )
-        {
-            System.out.println( _header + ": " + event );
-        }
-        _eventHandler.handleEvent( event );
-    }
-}
</pre></div>
<hr /><a name="file89" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/test/org/codehaus/spice/netevent<br /></span>
<div class="fileheader" id="removed"><big><b>NetRuntime.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N NetRuntime.java
--- NetRuntime.java	17 May 2004 06:21:39 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,115 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent;
-
-import java.io.IOException;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.event.EventSource;
-import org.codehaus.spice.event.impl.BlockingEventSource;
-import org.codehaus.spice.event.impl.DefaultEventQueue;
-import org.codehaus.spice.event.impl.EventPump;
-import org.codehaus.spice.event.impl.collections.BoundedFifoBuffer;
-import org.codehaus.spice.event.impl.collections.UnboundedFifoBuffer;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.buffers.DefaultBufferManager;
-import org.codehaus.spice.netevent.handlers.ChannelEventHandler;
-import org.codehaus.spice.netevent.source.SelectableChannelEventSource;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.3 $ $Date: 2004/05/17 06:21:39 $
- */
-class NetRuntime
-{
-    private final SelectableChannelEventSource _source;
-
-    /**
-     * Manager for all the data chunks used in system.
-     */
-    private final BufferManager _bufferManager;
-
-    /**
-     * EventSource use to register sockets and so forth.
-     */
-    private final EventSink _sessionSink;
-
-    private final EventPump[] _pumps;
-
-    private final TestEventHandler m_testEventHandler;
-
-    public NetRuntime( final TestEventHandler testEventHandler,
-                       final SelectableChannelEventSource source,
-                       final BufferManager bufferManager,
-                       final EventSink sessionSink,
-                       final EventPump[] pumps )
-    {
-        m_testEventHandler = testEventHandler;
-        _source = source;
-        _bufferManager = bufferManager;
-        _sessionSink = sessionSink;
-        _pumps = pumps;
-    }
-
-    public SelectableChannelEventSource getSource()
-    {
-        return _source;
-    }
-
-    public BufferManager getBufferManager()
-    {
-        return _bufferManager;
-    }
-
-    public EventSink getSessionSink()
-    {
-        return _sessionSink;
-    }
-
-    public EventPump[] getPumps()
-    {
-        return _pumps;
-    }
-
-    public TestEventHandler getTestEventHandler()
-    {
-        return m_testEventHandler;
-    }
-
-    static NetRuntime createRuntime( final String type,
-                                     final long transmitCount,
-                                     final long receiveCount,
-                                     final boolean closeOnReceive )
-        throws IOException
-    {
-        final DefaultEventQueue queue1 = new DefaultEventQueue( new BoundedFifoBuffer( 15 ) );
-        final DefaultEventQueue queue2 = new DefaultEventQueue( new UnboundedFifoBuffer( 15 ) );
-
-        final SelectableChannelEventSource source1 = new SelectableChannelEventSource( queue1 );
-        source1.setSelectTimeout( 200 );
-
-        final DefaultBufferManager bufferManager = new DefaultBufferManager();
-        final ChannelEventHandler ceh = new ChannelEventHandler( source1,
-                                                                 queue1,
-                                                                 queue2,
-                                                                 bufferManager );
-        final EventHandler handler1 = new EchoHandler( /*"CHAN " + type*/null, ceh );
-
-        final TestEventHandler testEventHandler = new TestEventHandler( "TEST " + type,
-                                                                        transmitCount,
-                                                                        receiveCount,
-                                                                        closeOnReceive );
-        final EventHandler handler2 = new EchoHandler( "TEST " + type, testEventHandler );
-
-        final EventPump pump1 = newPump( "CHAN " + type, source1, handler1 );
-        final EventPump pump2 = newPump( "TEST " + type, queue2, handler2 );
-
-        final EventPump[] pumps = new EventPump[]{pump1, pump2};
-        return new NetRuntime( testEventHandler, source1, bufferManager, queue2, pumps );
-    }
-
-    private static EventPump newPump( final String name,
-                                      final EventSource source,
-                                      final EventHandler handler )
-    {
-        return new EventPump( name, new BlockingEventSource( source, 50 ), handler );
-    }
-}
</pre></div>
<hr /><a name="file90" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/test/org/codehaus/spice/netevent<br /></span>
<div class="fileheader" id="removed"><big><b>TestEventHandler.java</b></big> <small id="info">removed after 1.5</small></div>
<pre class="diff"><small id="info">diff -N TestEventHandler.java
--- TestEventHandler.java	17 May 2004 06:21:39 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,152 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.Socket;
-import java.nio.channels.SocketChannel;
-import java.util.Random;
-import org.codehaus.spice.event.AbstractEventHandler;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.netevent.events.ChannelClosedEvent;
-import org.codehaus.spice.netevent.events.ConnectEvent;
-import org.codehaus.spice.netevent.events.InputDataPresentEvent;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-import org.codehaus.spice.netevent.transport.MultiBufferInputStream;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.5 $ $Date: 2004/05/17 06:21:39 $
- */
-class TestEventHandler
-    extends AbstractEventHandler
-{
-    private static final byte[] DATA = new byte[]{'B', 'E', 'E', 'R', ' '};
-
-    private static final Random RANDOM = new Random();
-
-    private final String _header;
-    private final long _transmitCount;
-    private final long _receiveCount;
-    private final boolean _closeOnReceive;
-    private int m_connectCount;
-    private int m_disconnectCount;
-
-    TestEventHandler( final String header,
-                      final long transmitCount,
-                      final long receiveCount,
-                      final boolean closeOnReceive )
-    {
-        _header = header;
-        _transmitCount = transmitCount;
-        _receiveCount = receiveCount;
-        _closeOnReceive = closeOnReceive;
-    }
-
-    int getConnectCount()
-    {
-        return m_connectCount;
-    }
-
-    int getDisconnectCount()
-    {
-        return m_disconnectCount;
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        if( event instanceof InputDataPresentEvent )
-        {
-            final InputDataPresentEvent e = (InputDataPresentEvent) event;
-            final ChannelTransport transport = e.getTransport();
-            final int available = transport.getInputStream().available();
-            if( available == _receiveCount &amp;&amp; _closeOnReceive )
-            {
-                transport.getOutputStream().close();
-            }
-        }
-        else if( event instanceof ChannelClosedEvent )
-        {
-            m_disconnectCount++;
-            final ChannelClosedEvent ce = (ChannelClosedEvent) event;
-            final ChannelTransport transport = ce.getTransport();
-            status( transport, "Channel Diconnected." );
-            receiveData( transport );
-        }
-        else if( event instanceof ConnectEvent )
-        {
-            m_connectCount++;
-            final ConnectEvent ce = (ConnectEvent) event;
-            final ChannelTransport transport = ce.getTransport();
-            setupUserData( transport );
-
-            status( transport, "Channel Connected." );
-            transmitData( transport );
-        }
-    }
-
-    private void status( final ChannelTransport transport, final String msg )
-    {
-        final int connected = m_connectCount - m_disconnectCount;
-        final String message = _header + " (" + transport.getUserData() + "): " +
-                               ( msg + " Current=" + connected + " Connected= " + m_connectCount + " Disconnected=" + m_disconnectCount );
-        System.out.println( message );
-    }
-
-    private void receiveData( final ChannelTransport transport )
-    {
-        final MultiBufferInputStream in = transport.getInputStream();
-        final int available = in.available();
-
-        final int count = Math.min( 15, available );
-        final StringBuffer sb = new StringBuffer();
-        try
-        {
-            for( int i = 0; i &lt; count; i++ )
-            {
-                sb.append( (char) in.read() );
-            }
-        }
-        catch( IOException e )
-        {
-            e.printStackTrace();
-        }
-
-        status( transport, "Received " + available + " Sample: " + sb );
-    }
-
-    private void transmitData( final ChannelTransport transport )
-    {
-        final OutputStream outputStream = transport.getOutputStream();
-        try
-        {
-            long transmitCount = _transmitCount;
-            if( -1 == transmitCount )
-            {
-                transmitCount = Math.abs( RANDOM.nextInt() % 16 * 1024 );
-            }
-            for( int i = 0; i &lt; transmitCount; i++ )
-            {
-                final byte ch = DATA[i % DATA.length];
-                outputStream.write( ch );
-            }
-            outputStream.flush();
-            status( transport, "Transmitting " + transmitCount );
-        }
-        catch( final IOException ioe )
-        {
-            ioe.printStackTrace();
-        }
-    }
-
-    private void setupUserData( final ChannelTransport transport )
-    {
-        final SocketChannel channel = (SocketChannel) transport.getChannel();
-        final Socket socket = channel.socket();
-        final String conn = socket.getLocalPort() + "&lt;-&gt;" + socket.getPort();
-        transport.setUserData( conn );
-    }
-
-}
</pre></div>
<hr /><a name="file91" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/test/org/codehaus/spice/netevent<br /></span>
<div class="fileheader" id="removed"><big><b>TestServer.java</b></big> <small id="info">removed after 1.14</small></div>
<pre class="diff"><small id="info">diff -N TestServer.java
--- TestServer.java	17 May 2004 06:21:39 -0000	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,101 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent;
-
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-import org.codehaus.spice.event.impl.EventPump;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.14 $ $Date: 2004/05/17 06:21:39 $
- */
-public class TestServer
-{
-    private static final int MAX_CONNECTIONS = 500;
-    private static final int SERVER_PORT = 1980;
-
-    private static boolean c_done;
-
-    public static void main( final String[] args )
-        throws Exception
-    {
-        final NetRuntime server = NetRuntime.createRuntime( "SV", 5, -1, false );
-        final NetRuntime client = NetRuntime.createRuntime( "CL", -1, 5, true );
-
-        startPumps( server.getPumps() );
-        startPumps( client.getPumps() );
-
-        final TestEventHandler ch = client.getTestEventHandler();
-
-        final ServerSocketChannel ss = ServerSocketChannel.open();
-        server.getSource().registerChannel( ss, SelectionKey.OP_ACCEPT, null );
-        ss.socket().bind( new InetSocketAddress( SERVER_PORT ) );
-
-        int count = 0;
-        while( !c_done )
-        {
-            Thread.sleep( 50 );
-            if( MAX_CONNECTIONS &gt; count )
-            {
-                count++;
-                final SocketChannel channel = SocketChannel.open();
-                System.out.println( "Creating Client Connection: " + count );
-                client.getSource().registerChannel( channel, SelectionKey.OP_CONNECT, null );
-                final InetSocketAddress address = new InetSocketAddress(
-                    InetAddress.getLocalHost(), SERVER_PORT );
-                channel.connect( address );
-            }
-
-            if( MAX_CONNECTIONS &lt;= ch.getConnectCount() &amp;&amp;
-                ch.getConnectCount() == ch.getDisconnectCount() )
-            {
-                c_done = true;
-            }
-        }
-        System.exit( 1 );
-    }
-
-    private static void startPumps( final EventPump[] pumps )
-    {
-        for( int i = 0; i &lt; pumps.length; i++ )
-        {
-            final EventPump pump = pumps[i];
-            startThread( pump );
-        }
-    }
-
-    private static void startThread( final EventPump pump )
-    {
-        final Runnable runnable = new Runnable()
-        {
-            public void run()
-            {
-                doPump( pump );
-            }
-        };
-        final Thread thread = new Thread( runnable );
-        thread.setName( pump.getName() );
-        thread.start();
-
-        thread.setPriority( Thread.NORM_PRIORITY - 1 );
-    }
-
-    private static void doPump( final EventPump pump )
-    {
-        try
-        {
-            System.out.println( "Entering Thread " + Thread.currentThread().getName() );
-            while( !c_done )
-            {
-                pump.refresh();
-            }
-            System.out.println( "Exiting Thread " + Thread.currentThread().getName() );
-        }
-        catch( final Throwable e )
-        {
-            e.printStackTrace();
-        }
-    }
-}
</pre></div>
<hr /><a name="file92" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/test/org/codehaus/spice/netevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>EventsTestCase.java</b></big> <small id="info">removed after 1.13</small></div>
<pre class="diff"><small id="info">diff -N EventsTestCase.java
--- EventsTestCase.java	17 May 2004 06:21:39 -0000	1.13
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,78 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.events;
-
-import java.io.IOException;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-import junit.framework.TestCase;
-import org.codehaus.spice.event.impl.NullEventSink;
-import org.codehaus.spice.event.impl.collections.UnboundedFifoBuffer;
-import org.codehaus.spice.netevent.buffers.DefaultBufferManager;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.13 $ $Date: 2004/05/17 06:21:39 $
- */
-public class EventsTestCase
-    extends TestCase
-{
-    private ChannelTransport newTransport( final SocketChannel channel )
-    {
-        return new ChannelTransport( channel,
-                                     new UnboundedFifoBuffer( 1 ),
-                                     new DefaultBufferManager(),
-                                     new NullEventSink() );
-    }
-
-    public void testNull_channel_PassedIntoCtor()
-        throws Exception
-    {
-        try
-        {
-            new AcceptPossibleEvent( null, new Object() );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "channel", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing channel into Ctor" );
-    }
-
-    public void testGetServerSocketChannelOnConnectEvent()
-        throws Exception
-    {
-        final ServerSocketChannel channel = ServerSocketChannel.open();
-        final AcceptPossibleEvent event = new AcceptPossibleEvent( channel, new Object() );
-
-        assertEquals( "event.getChannel()", channel, event.getChannel() );
-    }
-
-    public void testNull_ioe_PassedIntoCtor_of_IOError()
-        throws Exception
-    {
-        final SocketChannel channel = SocketChannel.open();
-        final ChannelTransport transport = newTransport( channel );
-        try
-        {
-            new ReadErrorEvent( transport, null );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "ioe", npe.getMessage() );
-            return;
-        }
-        fail( "Expected a NPE when passing ioe into Ctor_of_IOError" );
-    }
-
-    public void testGetIoeOnWriteErrorEvent()
-        throws Exception
-    {
-        final SocketChannel channel = SocketChannel.open();
-        final ChannelTransport transport = newTransport( channel );
-        final IOException ioe = new IOException( "X" );
-        final WriteErrorEvent event = new WriteErrorEvent( transport, ioe );
-
-        assertEquals( "event.getIoe()", ioe, event.getIoe() );
-    }
-}
</pre></div>
<hr /><a name="file93" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/test/org/codehaus/spice/netevent/transport<br /></span>
<div class="fileheader" id="removed"><big><b>CallOnceConstraint.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N CallOnceConstraint.java
--- CallOnceConstraint.java	17 May 2004 06:21:39 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.transport;
-
-import org.jmock.Constraint;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/05/17 06:21:39 $
- */
-public class CallOnceConstraint
-    implements Constraint
-{
-    private final Constraint _constraint;
-    private boolean _invoked;
-
-    public CallOnceConstraint( final Constraint constraint )
-    {
-        _constraint = constraint;
-    }
-
-    public boolean eval( final Object object )
-    {
-        if( _constraint.eval( object ) &amp;&amp; !_invoked )
-        {
-            _invoked = true;
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-}
</pre></div>
<hr /><a name="file94" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/test/org/codehaus/spice/netevent/transport<br /></span>
<div class="fileheader" id="removed"><big><b>ChannelTransportTestCase.java</b></big> <small id="info">removed after 1.5</small></div>
<pre class="diff"><small id="info">diff -N ChannelTransportTestCase.java
--- ChannelTransportTestCase.java	17 May 2004 06:21:39 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,148 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.netevent.transport;
-
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-import junit.framework.TestCase;
-import org.codehaus.spice.event.impl.NullEventSink;
-import org.codehaus.spice.event.impl.collections.Buffer;
-import org.codehaus.spice.event.impl.collections.UnboundedFifoBuffer;
-import org.codehaus.spice.netevent.buffers.DefaultBufferManager;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.5 $ $Date: 2004/05/17 06:21:39 $
- */
-public class ChannelTransportTestCase
-    extends TestCase
-{
-    private SocketChannel m_channel;
-
-    protected void setUp()
-        throws Exception
-    {
-        m_channel = SocketChannel.open();
-    }
-
-    protected void tearDown()
-        throws Exception
-    {
-        m_channel.close();
-    }
-
-    public void testCreate()
-        throws Exception
-    {
-        final UnboundedFifoBuffer tx = new UnboundedFifoBuffer( 1 );
-        final ChannelTransport transport = newTransport( tx );
-        assertEquals( "channel", m_channel, transport.getChannel() );
-        assertEquals( "key", null, transport.getKey() );
-        assertEquals( "getTransmitBuffer", tx, transport.getTransmitBuffer() );
-    }
-
-    private ChannelTransport newTransport( final UnboundedFifoBuffer tx )
-    {
-        return new ChannelTransport( m_channel,
-                                     tx,
-                                     new DefaultBufferManager(),
-                                     new NullEventSink() );
-    }
-
-    public void testNullChannelPassedToCtor()
-        throws Exception
-    {
-        final UnboundedFifoBuffer tx = new UnboundedFifoBuffer( 1 );
-        try
-        {
-            new ChannelTransport( null, tx, new DefaultBufferManager(), new NullEventSink() );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "channel", npe.getMessage() );
-            return;
-        }
-        fail( "Expected to fail due to null Channel passed into Ctor" );
-    }
-
-    public void testNullTransmitBufferPassedToCtor()
-        throws Exception
-    {
-        try
-        {
-            newTransport( null );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "transmitBuffer", npe.getMessage() );
-            return;
-        }
-        fail( "Expected to fail due to null transmitBuffer passed into Ctor" );
-    }
-
-    public void testCloseTransportWithOpenChannel()
-        throws Exception
-    {
-        final ServerSocketChannel ssc = ServerSocketChannel.open();
-
-        final InetSocketAddress socketAddress = new InetSocketAddress( InetAddress.getLocalHost(),
-                                                                       19972 );
-        try
-        {
-            ssc.socket().bind( socketAddress );
-            m_channel.configureBlocking( false );
-            m_channel.connect( socketAddress );
-            final ChannelTransport transport = newTransport( new UnboundedFifoBuffer( 1 ) );
-            assertEquals( "channel.isOpen()", true, m_channel.isOpen() );
-            transport.close();
-            assertEquals( "key", null, transport.getKey() );
-            assertEquals( "channel.isOpen()", false, m_channel.isOpen() );
-        }
-        finally
-        {
-            ssc.close();
-        }
-    }
-
-    public void testCloseTransportWithNonOpenChannel()
-        throws Exception
-    {
-        final ChannelTransport transport = newTransport( new UnboundedFifoBuffer( 1 ) );
-        m_channel.close();
-        assertEquals( "channel.isOpen()", false, m_channel.isOpen() );
-        transport.close();
-        assertEquals( "key", null, transport.getKey() );
-        assertEquals( "channel.isOpen()", false, m_channel.isOpen() );
-    }
-
-    public void testGetSelectOpsOnWriteable()
-        throws Exception
-    {
-        final ChannelTransport transport = newTransport( new UnboundedFifoBuffer( 1 ) );
-        final Buffer writeBuffer = transport.getTransmitBuffer();
-        writeBuffer.add( new Object() );
-        assertEquals( "SelectOps",
-                      SelectionKey.OP_WRITE | SelectionKey.OP_READ | SelectionKey.OP_CONNECT,
-                      transport.getSelectOps() );
-    }
-
-    public void testGetSelectOpsOnReadable()
-        throws Exception
-    {
-        final ChannelTransport transport = new ChannelTransport( m_channel,
-                                                                 new UnboundedFifoBuffer( 1 ),
-                                                                 new DefaultBufferManager(),
-                                                                 new NullEventSink() );
-        assertEquals( "SelectOps",
-                      SelectionKey.OP_READ | SelectionKey.OP_CONNECT,
-                      transport.getSelectOps() );
-    }
-}
</pre></div>
<hr /><a name="file95" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/test/org/codehaus/spice/netevent/transport<br /></span>
<div class="fileheader" id="removed"><big><b>MultiBufferInputStreamTestCase.java</b></big> <small id="info">removed after 1.4</small></div>
<pre class="diff"><small id="info">diff -N MultiBufferInputStreamTestCase.java
--- MultiBufferInputStreamTestCase.java	17 May 2004 06:21:39 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,302 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.transport;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-import java.nio.channels.SocketChannel;
-import junit.framework.TestCase;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.event.impl.collections.UnboundedFifoBuffer;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.jmock.C;
-import org.jmock.Mock;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.4 $ $Date: 2004/05/17 06:21:39 $
- */
-public class MultiBufferInputStreamTestCase
-    extends TestCase
-{
-    public void testStreamWithNoBuffers()
-        throws Exception
-    {
-        final Mock mockBufferManager = new Mock( BufferManager.class );
-        final BufferManager bm = (BufferManager) mockBufferManager.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        final EventSink sink = (EventSink) mockSink.proxy();
-
-        final ChannelTransport transport = new ChannelTransport( SocketChannel.open(),
-                                                                 new UnboundedFifoBuffer( 1 ),
-                                                                 bm,
-                                                                 sink );
-
-        final MultiBufferInputStream stream = new MultiBufferInputStream( bm, transport, sink );
-
-        assertEquals( "stream.available()", 0, stream.available() );
-        assertEquals( "stream.markSupported()", true, stream.markSupported() );
-        stream.mark( 2 );
-        stream.reset();
-        assertEquals( "stream.available()", 0, stream.available() );
-        stream.setClosePending();
-        assertEquals( "stream.available()", 0, stream.available() );
-        assertEquals( "stream.read()", -1, stream.read() );
-
-        mockBufferManager.verify();
-        mockSink.verify();
-    }
-
-    public void testStreamWithSingleBuffers()
-        throws Exception
-    {
-        final ByteBuffer buffer = ByteBuffer.allocate( 30 );
-        buffer.put( (byte) 'a' );
-        buffer.put( (byte) 'b' );
-        buffer.put( (byte) 'c' );
-        buffer.flip();
-
-        final Mock mockBufferManager = new Mock( BufferManager.class );
-        mockBufferManager.expect( "releaseBuffer", C.args( C.eq( buffer ) ) );
-        final BufferManager bm = (BufferManager) mockBufferManager.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        final EventSink sink = (EventSink) mockSink.proxy();
-
-        final ChannelTransport transport = new ChannelTransport( SocketChannel.open(),
-                                                                 new UnboundedFifoBuffer( 1 ),
-                                                                 bm,
-                                                                 sink );
-
-        final MultiBufferInputStream stream = new MultiBufferInputStream( bm, transport, sink );
-
-        stream.addBuffer( buffer );
-
-        assertEquals( "stream.available()", 3, stream.available() );
-        assertEquals( "stream.markSupported()", true, stream.markSupported() );
-        stream.mark( 2 );
-        assertEquals( "stream.read(1)", 'a', stream.read() );
-        assertEquals( "stream.read(2)", 'b', stream.read() );
-        assertEquals( "stream.available()", 1, stream.available() );
-        stream.reset();
-        assertEquals( "stream.available()", 3, stream.available() );
-        stream.setClosePending();
-        assertEquals( "&gt; stream.available()", 3, stream.available() );
-        assertEquals( "&gt; stream.read(1)", 'a', stream.read() );
-        assertEquals( "&gt; stream.read(2)", 'b', stream.read() );
-        assertEquals( "&gt; stream.read(3)", 'c', stream.read() );
-        assertEquals( "stream.read()", -1, stream.read() );
-
-        mockBufferManager.verify();
-    }
-
-    public void testStreamWithMultipleBuffers()
-        throws Exception
-    {
-        final ByteBuffer buffer1 = ByteBuffer.allocate( 30 );
-        buffer1.put( (byte) 'a' );
-        buffer1.put( (byte) 'b' );
-        buffer1.put( (byte) 'c' );
-        buffer1.flip();
-
-        final ByteBuffer buffer2 = ByteBuffer.allocate( 30 );
-        buffer2.put( (byte) 'd' );
-        buffer2.put( (byte) 'e' );
-        buffer2.put( (byte) 'f' );
-        buffer2.flip();
-
-        final Mock mockBufferManager = new Mock( BufferManager.class );
-        mockBufferManager.expect( "releaseBuffer", C.args( C.eq( buffer1 ) ) );
-        mockBufferManager.expect( "releaseBuffer", C.args( C.eq( buffer2 ) ) );
-        final BufferManager bm = (BufferManager) mockBufferManager.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        final EventSink sink = (EventSink) mockSink.proxy();
-
-        final ChannelTransport transport = new ChannelTransport( SocketChannel.open(),
-                                                                 new UnboundedFifoBuffer( 1 ),
-                                                                 bm,
-                                                                 sink );
-
-        final MultiBufferInputStream stream = new MultiBufferInputStream( bm, transport, sink );
-
-        stream.addBuffer( buffer1 );
-        stream.addBuffer( buffer2 );
-
-        assertEquals( "stream.available()", 6, stream.available() );
-        assertEquals( "stream.markSupported()", true, stream.markSupported() );
-        stream.mark( 2 );
-        assertEquals( "stream.read(1)", 'a', stream.read() );
-        assertEquals( "stream.read(2)", 'b', stream.read() );
-        assertEquals( "stream.available()", 4, stream.available() );
-        stream.reset();
-        assertEquals( "stream.available()", 6, stream.available() );
-
-        stream.mark( 5 );
-        assertEquals( "stream.read(1)", 'a', stream.read() );
-        assertEquals( "stream.read(2)", 'b', stream.read() );
-        assertEquals( "stream.read(3)", 'c', stream.read() );
-        assertEquals( "stream.read(4)", 'd', stream.read() );
-        assertEquals( "stream.available()", 2, stream.available() );
-        stream.reset();
-        assertEquals( "stream.available()", 6, stream.available() );
-
-        stream.setClosePending();
-        assertEquals( "&gt; stream.available()", 6, stream.available() );
-        assertEquals( "&gt; stream.read(1)", 'a', stream.read() );
-        assertEquals( "&gt; stream.read(2)", 'b', stream.read() );
-        assertEquals( "&gt; stream.read(3)", 'c', stream.read() );
-        assertEquals( "&gt; stream.read(3)", 'd', stream.read() );
-        assertEquals( "&gt; stream.read(3)", 'e', stream.read() );
-        assertEquals( "&gt; stream.read(3)", 'f', stream.read() );
-        assertEquals( "stream.read()", -1, stream.read() );
-
-        mockBufferManager.verify();
-    }
-
-    public void testOverreadingMark()
-        throws Exception
-    {
-        final ByteBuffer buffer = ByteBuffer.allocate( 30 );
-        buffer.put( (byte) 'a' );
-        buffer.put( (byte) 'b' );
-        buffer.put( (byte) 'c' );
-        buffer.flip();
-
-        final Mock mockBufferManager = new Mock( BufferManager.class );
-        mockBufferManager.expect( "releaseBuffer", C.args( C.eq( buffer ) ) );
-        final BufferManager bm = (BufferManager) mockBufferManager.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        final EventSink sink = (EventSink) mockSink.proxy();
-
-        final ChannelTransport transport = new ChannelTransport( SocketChannel.open(),
-                                                                 new UnboundedFifoBuffer( 1 ),
-                                                                 bm,
-                                                                 sink );
-
-        final MultiBufferInputStream stream = new MultiBufferInputStream( bm, transport, sink );
-
-        stream.addBuffer( buffer );
-
-        assertEquals( "stream.available()", 3, stream.available() );
-        assertEquals( "stream.markSupported()", true, stream.markSupported() );
-        stream.mark( 1 );
-        assertEquals( "stream.read(1)", 'a', stream.read() );
-        assertEquals( "stream.read(2)", 'b', stream.read() );
-        assertEquals( "stream.available()", 1, stream.available() );
-        try
-        {
-            stream.reset();
-            fail( "Expected to get an IOException as mark removed." );
-        }
-        catch( final IOException ioe )
-        {
-        }
-        assertEquals( "stream.available()", 1, stream.available() );
-        stream.setClosePending();
-        assertEquals( "&gt; stream.read(3)", 'c', stream.read() );
-        assertEquals( "stream.read()", -1, stream.read() );
-
-        mockBufferManager.verify();
-    }
-
-    public void testStreamWithSecondBufferAddedDuringRead()
-        throws Exception
-    {
-        final ByteBuffer buffer1 = ByteBuffer.allocate( 30 );
-        buffer1.put( (byte) 'a' );
-        buffer1.put( (byte) 'b' );
-        buffer1.put( (byte) 'c' );
-        buffer1.flip();
-
-        final ByteBuffer buffer2 = ByteBuffer.allocate( 30 );
-        buffer2.put( (byte) 'd' );
-        buffer2.put( (byte) 'e' );
-        buffer2.put( (byte) 'f' );
-        buffer2.flip();
-
-        final Mock mockBufferManager = new Mock( BufferManager.class );
-        mockBufferManager.expect( "releaseBuffer", C.args( C.eq( buffer1 ) ) );
-        mockBufferManager.expect( "releaseBuffer", C.args( C.eq( buffer2 ) ) );
-        final BufferManager bm = (BufferManager) mockBufferManager.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        final EventSink sink = (EventSink) mockSink.proxy();
-
-        final ChannelTransport transport = new ChannelTransport( SocketChannel.open(),
-                                                                 new UnboundedFifoBuffer( 1 ),
-                                                                 bm,
-                                                                 sink );
-
-        final MultiBufferInputStream stream = new MultiBufferInputStream( bm, transport, sink );
-
-        stream.addBuffer( buffer1 );
-
-        assertEquals( "stream.available()", 3, stream.available() );
-        assertEquals( "stream.markSupported()", true, stream.markSupported() );
-        stream.mark( 2 );
-        assertEquals( "stream.read(1)", 'a', stream.read() );
-        assertEquals( "stream.read(2)", 'b', stream.read() );
-        assertEquals( "stream.available()", 1, stream.available() );
-        stream.reset();
-        assertEquals( "stream.available()", 3, stream.available() );
-        assertEquals( "&gt; stream.available()", 3, stream.available() );
-
-        final ReaderThread thread = new ReaderThread( stream );
-        thread.start();
-        while( thread.getCount() &lt; 3 )
-        {
-            Thread.yield();
-        }
-
-        assertEquals( "thread.isAlive()", true, thread.isAlive() );
-
-        stream.addBuffer( buffer2 );
-        while( thread.getCount() &lt; 6 )
-        {
-            Thread.yield();
-        }
-
-        assertEquals( "thread.isAlive()", true, thread.isAlive() );
-
-        stream.setClosePending();
-        thread.join();
-
-        mockBufferManager.verify();
-    }
-
-    static class ReaderThread
-        extends Thread
-    {
-        private final InputStream _input;
-        private int _count;
-
-        public ReaderThread( final InputStream input )
-        {
-            _input = input;
-        }
-
-        public int getCount()
-        {
-            return _count;
-        }
-
-        public void run()
-        {
-            int ch = 0;
-            while( -1 != ch )
-            {
-                try
-                {
-                    ch = _input.read();
-                }
-                catch( IOException e )
-                {
-                    e.printStackTrace();
-                }
-                _count++;
-            }
-        }
-    }
-}
</pre></div>
<hr /><a name="file96" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/src/test/org/codehaus/spice/netevent/transport<br /></span>
<div class="fileheader" id="removed"><big><b>TransportOutputStreamTestCase.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N TransportOutputStreamTestCase.java
--- TransportOutputStreamTestCase.java	17 May 2004 06:21:39 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,166 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.netevent.transport;
-
-import java.nio.ByteBuffer;
-import java.nio.channels.SocketChannel;
-import junit.framework.TestCase;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.event.impl.collections.UnboundedFifoBuffer;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.events.OutputDataPresentEvent;
-import org.jmock.C;
-import org.jmock.Mock;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/05/17 06:21:39 $
- */
-public class TransportOutputStreamTestCase
-    extends TestCase
-{
-    public void testGetBufferWhenNoneExists()
-        throws Exception
-    {
-        final Mock mockBM = new Mock( BufferManager.class );
-        final int count = 3;
-        final ByteBuffer expected = ByteBuffer.allocate( count );
-        mockBM.expectAndReturn( "aquireBuffer", C.args( C.eq( count ) ), expected );
-        final BufferManager bm = (BufferManager) mockBM.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        final EventSink sink = (EventSink) mockSink.proxy();
-
-        final ChannelTransport transport = new ChannelTransport( SocketChannel.open(),
-                                                                 new UnboundedFifoBuffer( 1 ),
-                                                                 bm,
-                                                                 sink );
-        final TransportOutputStream stream = new TransportOutputStream( bm,
-                                                                        transport,
-                                                                        sink,
-                                                                        count );
-        final ByteBuffer actual = stream.getBuffer();
-        assertEquals( "actual", expected, actual );
-
-        mockBM.verify();
-        mockSink.verify();
-    }
-
-    public void testWriteBelowThreshold()
-        throws Exception
-    {
-        final Mock mockBM = new Mock( BufferManager.class );
-        final int count = 3;
-        final ByteBuffer expected = ByteBuffer.allocate( count );
-        mockBM.expectAndReturn( "aquireBuffer", C.args( C.eq( count ) ), expected );
-        final BufferManager bm = (BufferManager) mockBM.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        final EventSink sink = (EventSink) mockSink.proxy();
-
-        final ChannelTransport transport = new ChannelTransport( SocketChannel.open(),
-                                                                 new UnboundedFifoBuffer( 1 ),
-                                                                 bm,
-                                                                 sink );
-        final TransportOutputStream stream = new TransportOutputStream( bm,
-                                                                        transport,
-                                                                        sink,
-                                                                        count );
-        stream.write( 'a' );
-        stream.write( 'b' );
-
-        final ByteBuffer actual = stream.getBuffer();
-        assertEquals( "buffer", expected, actual );
-        assertEquals( "buffer[0]", 'a', actual.get( 0 ) );
-        assertEquals( "buffer[1]", 'b', actual.get( 1 ) );
-        assertEquals( "buffer.position", 2, actual.position() );
-        assertEquals( "buffer.remaining", 1, actual.remaining() );
-
-        mockBM.verify();
-        mockSink.verify();
-    }
-
-    public void testWriteBelowThresholdThenFlush()
-        throws Exception
-    {
-        final int count = 3;
-        final ByteBuffer expected = ByteBuffer.allocate( count );
-
-        final Mock mockBM = new Mock( BufferManager.class );
-        mockBM.expectAndReturn( "aquireBuffer", C.args( C.eq( count ) ), expected );
-        final BufferManager bm = (BufferManager) mockBM.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        mockSink.expectAndReturn( "addEvent",
-                                  C.args( C.isA( OutputDataPresentEvent.class ) ),
-                                  true );
-        final EventSink sink = (EventSink) mockSink.proxy();
-
-        final ChannelTransport transport = new ChannelTransport( SocketChannel.open(),
-                                                                 new UnboundedFifoBuffer( 1 ),
-                                                                 bm,
-                                                                 sink );
-        final TransportOutputStream stream = new TransportOutputStream( bm,
-                                                                        transport,
-                                                                        sink,
-                                                                        count );
-        stream.write( 'a' );
-        stream.write( 'b' );
-        stream.flush();
-
-        assertEquals( "buffer[0]", 'a', expected.get( 0 ) );
-        assertEquals( "buffer[1]", 'b', expected.get( 1 ) );
-        assertEquals( "buffer.position", 0, expected.position() );
-        assertEquals( "buffer.remaining", 2, expected.remaining() );
-
-        mockBM.verify();
-        mockSink.verify();
-    }
-
-    public void testWriteAboveThreshold()
-        throws Exception
-    {
-        final int count = 3;
-        final ByteBuffer buffer1 = ByteBuffer.allocate( count );
-        final ByteBuffer buffer2 = ByteBuffer.allocate( count );
-
-        final Mock mockBM = new Mock( BufferManager.class );
-        mockBM.matchAndReturn( "aquireBuffer",
-                               C.args( new CallOnceConstraint( C.eq( count ) ) ),
-                               buffer2 );
-        mockBM.matchAndReturn( "aquireBuffer",
-                               C.args( new CallOnceConstraint( C.eq( count ) ) ),
-                               buffer1 );
-        final BufferManager bm = (BufferManager) mockBM.proxy();
-
-        final Mock mockSink = new Mock( EventSink.class );
-        mockSink.expectAndReturn( "addEvent",
-                                  C.args( C.isA( OutputDataPresentEvent.class ) ),
-                                  true );
-        final EventSink sink = (EventSink) mockSink.proxy();
-
-        final ChannelTransport transport = new ChannelTransport( SocketChannel.open(),
-                                                                 new UnboundedFifoBuffer( 1 ),
-                                                                 bm,
-                                                                 sink );
-        final TransportOutputStream stream = new TransportOutputStream( bm,
-                                                                        transport,
-                                                                        sink,
-                                                                        count );
-        stream.write( 'a' );
-        stream.write( 'b' );
-        stream.write( 'c' );
-        stream.write( 'd' );
-
-        assertEquals( "buffer[0]", 'a', buffer1.get( 0 ) );
-        assertEquals( "buffer[1]", 'b', buffer1.get( 1 ) );
-        assertEquals( "buffer[2]", 'c', buffer1.get( 2 ) );
-        assertEquals( "buffer.position", 0, buffer1.position() );
-        assertEquals( "buffer.remaining", 3, buffer1.remaining() );
-
-        assertEquals( "buffer2[0]", 'd', buffer2.get( 0 ) );
-        assertEquals( "buffer2.position", 1, buffer2.position() );
-        assertEquals( "buffer2.remaining", 2, buffer2.remaining() );
-
-        mockBM.verify();
-        mockSink.verify();
-    }
-}
</pre></div>
<hr /><a name="file97" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/xdocs<br /></span>
<div class="fileheader" id="removed"><big><b>component.menu</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N component.menu
--- component.menu	17 May 2004 06:21:39 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
</small></pre><pre class="diff" id="removed">-
-&lt;menu name="Component"&gt;
-    &lt;item name="Home" href="/index.html"/&gt;
-&lt;/menu&gt;
</pre></div>
<hr /><a name="file98" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/netevent/xdocs<br /></span>
<div class="fileheader" id="removed"><big><b>index.xml</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N index.xml
--- index.xml	17 May 2004 06:21:39 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
</small></pre><pre class="diff" id="removed">-&lt;?xml version="1.0"?&gt;
-&lt;document&gt;
-
-    &lt;properties&gt;
-        &lt;title&gt;NetEvent&lt;/title&gt;
-    &lt;/properties&gt;
-
-    &lt;body&gt;
-        &lt;section name="Introduction"&gt;
-        &lt;/section&gt;
-    &lt;/body&gt;
-
-&lt;/document&gt;
</pre></div>
<hr /><a name="file99" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet<br /></span>
<div class="fileheader" id="removed"><big><b>.cvsignore</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N .cvsignore
--- .cvsignore	16 Dec 2003 01:56:37 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
</small></pre><pre class="diff" id="removed">-dist
-target
-build.properties
-*.log
-*.el
-*.ipr
-*.iws
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file100" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet<br /></span>
<div class="fileheader" id="removed"><big><b>TODO.txt</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N TODO.txt
--- TODO.txt	26 Mar 2004 02:23:02 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
</small></pre><pre class="diff" id="removed">-Add a queue per channel!!!!!!!!!!
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file101" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet<br /></span>
<div class="fileheader" id="removed"><big><b>maven.xml</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N maven.xml
--- maven.xml	2 Feb 2004 02:38:22 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
</small></pre><pre class="diff" id="removed">-&lt;?xml version="1.0"?&gt;
-&lt;project default="jar:install"
-    xmlns:j="jelly:core"
-    xmlns:ant="jelly:ant"&gt;
-
-    &lt;postGoal name="jar:jar"&gt;
-        &lt;j:set var="distName" value="${pom.artifactId}-${pom.currentVersion}"/&gt;
-        &lt;j:set var="distDir" value="target"/&gt;
-        &lt;j:set var="bundleVal" value="true"/&gt;
-
-        &lt;ant:mkdir dir="${distDir}"/&gt;
-        &lt;ant:jar jarfile="${distDir}/${pom.artifactId}-${pom.currentVersion}-all.jar"
-            basedir="target/classes"&gt;
-            &lt;ant:include name="**/*"/&gt;
-            &lt;j:forEach var="dep" items="${pom.dependencies}"&gt;
-                &lt;j:if test='${bundleVal.equals(dep.getProperty("bundle"))}'&gt;
-                    &lt;ant:zipfileset src="${pom.getDependencyPath(dep.id)}" includes="*/**" prefix=""/&gt;
-                &lt;/j:if&gt;
-            &lt;/j:forEach&gt;
-        &lt;/ant:jar&gt;
-    &lt;/postGoal&gt;
-
-&lt;/project&gt;
</pre></div>
<hr /><a name="file102" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet<br /></span>
<div class="fileheader" id="removed"><big><b>project.properties</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N project.properties
--- project.properties	25 Apr 2004 00:44:44 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,69 +0,0 @@
</small></pre><pre class="diff" id="removed">-maven.remote.group=spice
-maven.repo.remote=http://www.ibiblio.com/maven,http://dist.codehaus.org
-
-maven.checkstyle.properties = ${basedir}/../../tools/checkstyle/checkstyle.xml
-maven.checkstyle.license.exists=true
-
-maven.javadoc.links = \
-    http://avalon.apache.org/api/, \
-    http://dna.jcontainer.org/apidocs/, \
-    http://java.sun.com/j2se/1.3/docs/api/
-
-maven.license.licenseFile=${basedir}/../../LICENSE.txt
-maven.linkcheck.enable=true
-
-maven.junit.fork=true
-maven.junit.dir=${basedir}/target/test-classes
-
-maven.xdoc.poweredby.image=
-#maven.xdoc.jsl=target/site.jsl
-
-spice.color1.bright=#FFFFFF
-spice.color1.light=#FFFFCC
-spice.color1.main=#CCCC99
-spice.color1.shaded=#999966
-spice.color1.dark=#666633
-spice.color1.darkest=#333300
-
-maven.ui.body.background=${spice.color1.bright}
-maven.ui.body.foreground=${spice.color1.darkest}
-maven.ui.section.background=${spice.color1.shaded}
-maven.ui.section.foreground=${spice.color1.light}
-maven.ui.subsection.background=${spice.color1.main}
-maven.ui.subsection.foreground=${spice.color1.light}
-maven.ui.table.header.background=${spice.color1.shaded}
-maven.ui.table.header.foreground=${spice.color1.light}
-
-maven.ui.table.row.odd.background=${spice.color1.light}
-maven.ui.table.row.odd.foreground=${spice.color1.dark}
-maven.ui.table.row.even.background=${spice.color1.light}
-maven.ui.table.row.even.foreground=${spice.color1.dark}
-
-maven.ui.banner.background=${spice.color1.bright}
-maven.ui.banner.foreground=${spice.color1.darkest}
-maven.ui.banner.border.top=${spice.color1.bright}
-maven.ui.banner.border.bottom=${spice.color1.shaded}
-
-maven.ui.source.background=${spice.color1.bright}
-maven.ui.source.foreground=${spice.color1.darkest}
-maven.ui.source.border.top=${spice.color1.shaded}
-maven.ui.source.border.bottom=${spice.color1.shaded}
-maven.ui.source.border.right=${spice.color1.shaded}
-maven.ui.source.border.left=${spice.color1.shaded}
-
-maven.ui.navcol.background=${spice.color1.light}
-maven.ui.navcol.background.ns4=${spice.color1.light}
-maven.ui.navcol.foreground=${spice.color1.dark}
-maven.ui.navcol.foreground.ns4=${spice.color1.dark}
-maven.ui.navcol.border.top=${spice.color1.light}
-maven.ui.navcol.border.right=${spice.color1.main}
-maven.ui.navcol.border.bottom=${spice.color1.main}
-
-maven.ui.breadcrumbs.background=${spice.color1.main}
-maven.ui.breadcrumbs.foreground=${spice.color1.dark}
-maven.ui.breadcrumbs.border.top=${spice.color1.light}
-maven.ui.breadcrumbs.border.bottom=${spice.color1.shaded}
-
-maven.ui.href.link=${spice.color1.dark}
-maven.ui.href.link.active=${spice.color1.darkest}
-maven.ui.href.link.selfref=${spice.color1.dark}
</pre></div>
<hr /><a name="file103" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet<br /></span>
<div class="fileheader" id="removed"><big><b>project.xml</b></big> <small id="info">removed after 1.12</small></div>
<pre class="diff"><small id="info">diff -N project.xml
--- project.xml	17 May 2004 03:54:25 -0000	1.12
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,55 +0,0 @@
</small></pre><pre class="diff" id="removed">-&lt;?xml version="1.0"?&gt;
-&lt;project&gt;
-    &lt;extend&gt;${basedir}/../../project.xml&lt;/extend&gt;
-    &lt;name&gt;Spice Packet&lt;/name&gt;
-    &lt;id&gt;spice-packet&lt;/id&gt;
-    &lt;currentVersion&gt;1.1-dev&lt;/currentVersion&gt;
-
-    &lt;shortDescription&gt;Packet Based Network Layer&lt;/shortDescription&gt;
-
-    &lt;description&gt;
-        Packet Based Network Layer.
-    &lt;/description&gt;
-
-    &lt;dependencies&gt;
-        &lt;dependency&gt;
-            &lt;groupId&gt;spice&lt;/groupId&gt;
-            &lt;artifactId&gt;spice-event&lt;/artifactId&gt;
-            &lt;version&gt;1.1-dev&lt;/version&gt;
-            &lt;properties&gt;
-                &lt;bundle&gt;true&lt;/bundle&gt;
-            &lt;/properties&gt;
-        &lt;/dependency&gt;
-        &lt;dependency&gt;
-            &lt;groupId&gt;spice&lt;/groupId&gt;
-            &lt;artifactId&gt;spice-netevent&lt;/artifactId&gt;
-            &lt;version&gt;1.1-dev&lt;/version&gt;
-            &lt;properties&gt;
-                &lt;bundle&gt;true&lt;/bundle&gt;
-            &lt;/properties&gt;
-        &lt;/dependency&gt;
-        &lt;dependency&gt;
-            &lt;groupId&gt;spice&lt;/groupId&gt;
-            &lt;artifactId&gt;spice-timeevent&lt;/artifactId&gt;
-            &lt;version&gt;1.1-dev&lt;/version&gt;
-            &lt;properties&gt;
-                &lt;bundle&gt;true&lt;/bundle&gt;
-            &lt;/properties&gt;
-        &lt;/dependency&gt;
-        &lt;dependency&gt;
-            &lt;groupId&gt;jmock&lt;/groupId&gt;
-            &lt;artifactId&gt;jmock&lt;/artifactId&gt;
-            &lt;version&gt;20031129.200437&lt;/version&gt;
-        &lt;/dependency&gt;
-    &lt;/dependencies&gt;
-
-    &lt;developers&gt;
-        &lt;developer&gt;
-            &lt;name&gt;Peter Donald&lt;/name&gt;
-            &lt;id&gt;pdonald&lt;/id&gt;
-            &lt;roles&gt;
-                &lt;role&gt;Developer&lt;/role&gt;
-            &lt;/roles&gt;
-        &lt;/developer&gt;
-    &lt;/developers&gt;
-&lt;/project&gt;
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file104" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet<br /></span>
<div class="fileheader" id="removed"><big><b>Packet.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N Packet.java
--- Packet.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,94 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.packet;
-
-import java.nio.ByteBuffer;
-
-/**
- * The Packet class represents a chunk of data sent across network.
- *
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class Packet
-{
-    /**
-     * The sequence ID of packet.
-     */
-    private final short m_sequence;
-
-    /**
-     * The packet flags. Indicate things like whether the packet needs to be
-     * acked etc. Some encoder/decoders may specify the flags as always 0.
-     */
-    private final int m_flags;
-
-    /**
-     * The buffer containing data contained within packet.
-     */
-    private final ByteBuffer m_data;
-
-    /**
-     * Create packet.
-     *
-     * @param sequence the sequence
-     * @param flags    the flags
-     * @param data     the data
-     */
-    public Packet( final short sequence,
-                   final int flags,
-                   final ByteBuffer data )
-    {
-        if( null == data )
-        {
-            throw new NullPointerException( "data" );
-        }
-        m_sequence = sequence;
-        m_flags = flags;
-        m_data = data;
-    }
-
-    /**
-     * Return the packet sequence number.
-     *
-     * @return the packet sequence number.
-     */
-    public short getSequence()
-    {
-        return m_sequence;
-    }
-
-    /**
-     * Return the packet flags.
-     *
-     * @return the packet flags.
-     */
-    public int getFlags()
-    {
-        return m_flags;
-    }
-
-    /**
-     * Return the data containined within packet. Note that the position may not
-     * be set to start of packet.
-     *
-     * @return the data containined within packet.
-     */
-    public ByteBuffer getData()
-    {
-        return m_data;
-    }
-
-    /**
-     * @see Object#toString()
-     */
-    public String toString()
-    {
-        return "Packet[Sequence=" + getSequence() + ", Size=" + getData().limit() + "]";
-    }
-}
</pre></div>
<hr /><a name="file105" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>AbstractPacketEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N AbstractPacketEvent.java
--- AbstractPacketEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,48 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.packet.Packet;
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * An abstract event about a packet in a session.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public abstract class AbstractPacketEvent
-    extends AbstractSessionEvent
-{
-    /**
-     * The associated packet.
-     */
-    private final Packet _packet;
-
-    public AbstractPacketEvent( final Session session, final Packet packet )
-    {
-        super( session );
-        if( null == packet )
-        {
-            throw new NullPointerException( "packet" );
-        }
-        _packet = packet;
-
-    }
-
-    /**
-     * Return the packet.
-     *
-     * @return the packet.
-     */
-    public Packet getPacket()
-    {
-        return _packet;
-    }
-
-    /**
-     * @see AbstractSessionEvent#getEventDescription()
-     */
-    protected String getEventDescription()
-    {
-        return super.getEventDescription() + ", sequence=" + _packet.getSequence() + ", count=" + _packet.getData().limit();
-    }
-}
</pre></div>
<hr /><a name="file106" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>AbstractSessionEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N AbstractSessionEvent.java
--- AbstractSessionEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,51 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.event.AbstractEvent;
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * An event about a Session.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public abstract class AbstractSessionEvent
-    extends AbstractEvent
-{
-    /**
-     * The session.
-     */
-    private final Session _session;
-
-    /**
-     * Create event.
-     * 
-     * @param session the session
-     */
-    public AbstractSessionEvent( final Session session )
-    {
-        if( null == session )
-        {
-            throw new NullPointerException( "session" );
-        }
-        _session = session;
-    }
-
-    /**
-     * Return the session.
-     * 
-     * @return the session.
-     */
-    public Session getSession()
-    {
-        return _session;
-    }
-
-    /**
-     * @see AbstractEvent#getEventDescription()
-     */
-    protected String getEventDescription()
-    {
-        return String.valueOf( getSession() );
-    }
-}
</pre></div>
<hr /><a name="file107" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>ConnectRequestEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N ConnectRequestEvent.java
--- ConnectRequestEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * Event indicating disconnect requested for session.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class ConnectRequestEvent
-    extends AbstractSessionEvent
-{
-    /**
-     * Create event.
-     *
-     * @param session the session
-     */
-    public ConnectRequestEvent( final Session session )
-    {
-        super( session );
-    }
-}
</pre></div>
<hr /><a name="file108" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>DataPacketReadyEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N DataPacketReadyEvent.java
--- DataPacketReadyEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.packet.Packet;
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * Event indicating a packet is ready to be processed by next layer.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class DataPacketReadyEvent
-    extends AbstractPacketEvent
-{
-    /**
-     * Create event.
-     *
-     * @param session the session
-     * @param packet  the packet
-     */
-    public DataPacketReadyEvent( final Session session, final Packet packet )
-    {
-        super( session, packet );
-    }
-}
</pre></div>
<hr /><a name="file109" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>PacketWriteRequestEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N PacketWriteRequestEvent.java
--- PacketWriteRequestEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.packet.Packet;
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * Event request a packet be written.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class PacketWriteRequestEvent
-    extends AbstractPacketEvent
-{
-    /**
-     * Create event.
-     *
-     * @param session the session
-     * @param packet  the packet
-     */
-    public PacketWriteRequestEvent( final Session session,
-                                    final Packet packet )
-    {
-        super( session, packet );
-    }
-}
</pre></div>
<hr /><a name="file110" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>PingRequestEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N PingRequestEvent.java
--- PingRequestEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * Event indicating disconnect requested for session.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class PingRequestEvent
-    extends AbstractSessionEvent
-{
-    /**
-     * Create event.
-     *
-     * @param session the session
-     */
-    public PingRequestEvent( final Session session )
-    {
-        super( session );
-    }
-}
</pre></div>
<hr /><a name="file111" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>SessionActiveEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SessionActiveEvent.java
--- SessionActiveEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * Event indicating connect occured for session.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class SessionActiveEvent
-    extends AbstractSessionEvent
-{
-    /**
-     * Create event.
-     * 
-     * @param session the session
-     */
-    public SessionActiveEvent( final Session session )
-    {
-        super( session );
-    }
-}
</pre></div>
<hr /><a name="file112" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>SessionConnectEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SessionConnectEvent.java
--- SessionConnectEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * Event indicating connect occured for session.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class SessionConnectEvent
-    extends AbstractSessionEvent
-{
-    /**
-     * Create event.
-     * 
-     * @param session the session
-     */
-    public SessionConnectEvent( final Session session )
-    {
-        super( session );
-    }
-}
</pre></div>
<hr /><a name="file113" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>SessionDisconnectEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SessionDisconnectEvent.java
--- SessionDisconnectEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * Event indicating disconnect occured for session.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class SessionDisconnectEvent
-    extends AbstractSessionEvent
-{
-    /**
-     * Create event.
-     * 
-     * @param session the session
-     */
-    public SessionDisconnectEvent( final Session session )
-    {
-        super( session );
-    }
-}
</pre></div>
<hr /><a name="file114" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>SessionDisconnectRequestEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SessionDisconnectRequestEvent.java
--- SessionDisconnectRequestEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * Event indicating disconnect requested for session.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class SessionDisconnectRequestEvent
-    extends AbstractSessionEvent
-{
-    /**
-     * Create event.
-     * 
-     * @param session the session
-     */
-    public SessionDisconnectRequestEvent( final Session session )
-    {
-        super( session );
-    }
-}
</pre></div>
<hr /><a name="file115" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>SessionErrorEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SessionErrorEvent.java
--- SessionErrorEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,82 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * Event indicating connect occured for session.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class SessionErrorEvent
-    extends AbstractSessionEvent
-{
-    /**
-     * Message indicating that there stream header was invalid.
-     */
-    public static final byte ERROR_BAD_MAGIC = 1;
-
-    /**
-     * Message indicating bad SessionID.
-     */
-    public static final byte ERROR_BAD_SESSION = 2;
-
-    /**
-     * Message indicating bad SessionAuth.
-     */
-    public static final byte ERROR_BAD_AUTH = 3;
-
-    /**
-     * Message indicating Nack for unknown packet.
-     */
-    public static final byte ERROR_BAD_NACK = 4;
-
-    /**
-     * Message indicating unknown message code.
-     */
-    public static final byte ERROR_BAD_MESSAGE = 5;
-
-    /**
-     * Message indicating local session has been disconnected.
-     */
-    public static final byte ERROR_SESSION_DISCONNECTED = 8;
-
-    /**
-     * Message indicating local session has been disconnected.
-     */
-    public static final byte ERROR_SESSION_TIMEOUT = 9;
-
-    /**
-     * the code for error.
-     */
-    private final byte _errorCode;
-
-    /**
-     * Create event.
-     *
-     * @param session the session
-     */
-    public SessionErrorEvent( final Session session, final byte errorCode )
-    {
-        super( session );
-        _errorCode = errorCode;
-    }
-
-    /**
-     * Return the code for error.
-     *
-     * @return the code for error.
-     */
-    public byte getErrorCode()
-    {
-        return _errorCode;
-    }
-
-    /**
-     * @see AbstractSessionEvent#getEventDescription()
-     */
-    protected String getEventDescription()
-    {
-        return super.getEventDescription() + " errorCode=" + getErrorCode();
-    }
-}
</pre></div>
<hr /><a name="file116" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/events<br /></span>
<div class="fileheader" id="removed"><big><b>SessionInactiveEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SessionInactiveEvent.java
--- SessionInactiveEvent.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.events;
-
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * Event indicating connect occured for session.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class SessionInactiveEvent
-    extends AbstractSessionEvent
-{
-    /**
-     * Create event.
-     * 
-     * @param session the session
-     */
-    public SessionInactiveEvent( final Session session )
-    {
-        super( session );
-    }
-}
</pre></div>
<hr /><a name="file117" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>HexDump.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N HexDump.java
--- HexDump.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,105 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.handlers;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class HexDump
-{
-    private static final String EOL = System.getProperty( "line.separator" );
-
-    private static final char[] HEXCODES = new char[]{'0',
-                                                      '1',
-                                                      '2',
-                                                      '3',
-                                                      '4',
-                                                      '5',
-                                                      '6',
-                                                      '7',
-                                                      '8',
-                                                      '9',
-                                                      'A',
-                                                      'B',
-                                                      'C',
-                                                      'D',
-                                                      'E',
-                                                      'F'};
-
-    private static final int[] SHIFTS = new int[]{28, 24, 20, 16, 12, 8, 4, 0};
-
-    public static void hexDump( final byte[] data,
-                                final int offset,
-                                final OutputStream output ) throws IOException
-    {
-        if( null == output )
-        {
-            throw new NullPointerException( "output" );
-        }
-        if( offset &lt; 0 )
-        {
-            throw new IllegalArgumentException( "offset &lt; 0" );
-        }
-        if( offset &gt;= data.length )
-        {
-            throw new IllegalArgumentException( "offset &gt;= data.length" );
-        }
-        long viewOffset = offset;
-        final StringBuffer buffer = new StringBuffer( 74 );
-
-        for( int j = offset; j &lt; data.length; j += 16 )
-        {
-            final int readCount = Math.min( 16, data.length - j );
-
-            dumpLong( buffer, viewOffset );
-
-            buffer.append( ' ' );
-            for( int k = 0; k &lt; 16; k++ )
-            {
-                if( k &lt; readCount )
-                {
-                    dumpByte( buffer, data[ k + j ] );
-                }
-                else
-                {
-                    buffer.append( "  " );
-                }
-                buffer.append( ' ' );
-            }
-            for( int k = 0; k &lt; readCount; k++ )
-            {
-                if( ( data[ k + j ] &gt;= ' ' ) &amp;&amp; ( data[ k + j ] &lt; 127 ) )
-                {
-                    buffer.append( (char) data[ k + j ] );
-                }
-                else
-                {
-                    buffer.append( '.' );
-                }
-            }
-            buffer.append( EOL );
-            output.write( buffer.toString().getBytes() );
-            output.flush();
-            buffer.setLength( 0 );
-            viewOffset += readCount;
-        }
-    }
-
-    private static void dumpLong( final StringBuffer sb, final long value )
-    {
-        for( int j = 0; j &lt; 8; j++ )
-        {
-            sb.append( HEXCODES[ ( (int) ( value &gt;&gt; SHIFTS[ j ] ) ) &amp; 15 ] );
-        }
-    }
-
-    private static void dumpByte( final StringBuffer sb, final byte value )
-    {
-        for( int j = 0; j &lt; 2; j++ )
-        {
-            sb.append( HEXCODES[ ( value &gt;&gt; SHIFTS[ j + 6 ] ) &amp; 15 ] );
-        }
-    }
-}
</pre></div>
<hr /><a name="file118" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>MessageCodes.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N MessageCodes.java
--- MessageCodes.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,60 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.handlers;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public interface MessageCodes
-{
-    /**
-     * Message ID to indicate connection occured. SessionID (short) and
-     * SessionAuth (short) fields follow. Sent from the Server to the Client.
-     */
-    byte CONNECT = 0;
-
-    /**
-     * Message sent from client to server in response to CONNECT. Indicates that
-     * the Server can transmit data.
-     */
-    byte ESTABLISHED = 1;
-
-    /**
-     * Message indicating regular data being transmitted.
-     */
-    byte DATA = 2;
-
-    /**
-     * Message indicating that the initiatiator wants to shut down the session.
-     */
-    byte DISCONNECT_REQUEST = 3;
-
-    /**
-     * Message indicating that listener has successfully shutdown session. This
-     * is sent in response to a DISCONNECT_REQUEST sent from initiator. It is
-     * only sent after all acks and nacks have been sent though.
-     */
-    byte DISCONNECT = 4;
-
-    /**
-     * Message indicating that received packet. Sequence follows (as short).
-     */
-    byte ACK = 5;
-
-    /**
-     * Message indicating that failed to receiv packet. Sequence follows (as
-     * short).
-     */
-    byte NACK = 6;
-
-    /**
-     * Message indicating client or server is disconnecting. Reason follows (as
-     * byte) - One of ERROR_* constants.
-     */
-    byte ERROR = 7;
-
-    /**
-     * Message transmitted to keep connection alive. Sequence follows (as short)
-     * of last message transmitted.
-     */
-    byte PING = 8;
-}
</pre></div>
<hr /><a name="file119" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>PacketIOEventHandler.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N PacketIOEventHandler.java
--- PacketIOEventHandler.java	26 Mar 2004 02:23:02 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,1369 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.handlers;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.SocketChannel;
-import java.util.List;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.events.AbstractTransportEvent;
-import org.codehaus.spice.netevent.events.ChannelClosedEvent;
-import org.codehaus.spice.netevent.events.ConnectErrorEvent;
-import org.codehaus.spice.netevent.events.ConnectEvent;
-import org.codehaus.spice.netevent.events.InputDataPresentEvent;
-import org.codehaus.spice.netevent.handlers.AbstractDirectedHandler;
-import org.codehaus.spice.netevent.source.SelectableChannelEventSource;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-import org.codehaus.spice.netevent.transport.MultiBufferInputStream;
-import org.codehaus.spice.netevent.transport.TransportOutputStream;
-import org.codehaus.spice.packet.Packet;
-import org.codehaus.spice.packet.events.AbstractSessionEvent;
-import org.codehaus.spice.packet.events.ConnectRequestEvent;
-import org.codehaus.spice.packet.events.DataPacketReadyEvent;
-import org.codehaus.spice.packet.events.PacketWriteRequestEvent;
-import org.codehaus.spice.packet.events.PingRequestEvent;
-import org.codehaus.spice.packet.events.SessionActiveEvent;
-import org.codehaus.spice.packet.events.SessionConnectEvent;
-import org.codehaus.spice.packet.events.SessionDisconnectEvent;
-import org.codehaus.spice.packet.events.SessionDisconnectRequestEvent;
-import org.codehaus.spice.packet.events.SessionErrorEvent;
-import org.codehaus.spice.packet.events.SessionInactiveEvent;
-import org.codehaus.spice.packet.session.PacketQueue;
-import org.codehaus.spice.packet.session.Session;
-import org.codehaus.spice.packet.session.SessionManager;
-import org.codehaus.spice.timeevent.events.TimeEvent;
-import org.codehaus.spice.timeevent.source.SchedulingKey;
-import org.codehaus.spice.timeevent.source.TimeEventSource;
-import org.codehaus.spice.timeevent.triggers.PeriodicTimeTrigger;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/03/26 02:23:02 $
- */
-public class PacketIOEventHandler
-    extends AbstractDirectedHandler
-{
-    /**
-     * Flag that set to true when should debug messages.
-     */
-    private static final boolean DEBUG = System.getProperty( "packet.debug",
-                                                             "false" ).equals(
-                                                                 "true" );
-
-    /**
-     * The maximum amount of time that session can be idle without an attempt to
-     * send write.
-     */
-    private static final int MAX_IDLE_TIME = 20 * 1000; //50 * 1000;
-
-    /**
-     * The number of milliseconds before the session will timeout.
-     */
-    private static final int TIMEOUT_IN_MILLIS = 2 * 60 * 1000;
-
-    /**
-     * The event source to register channels into.
-     */
-    private final SelectableChannelEventSource _channelEventSource;
-
-    /**
-     * The time event source to use to add timeouts.
-     */
-    private final TimeEventSource _timeEventSource;
-
-    /**
-     * The associated BufferManager used to create ByteBuffers for incoming
-     * packets.
-     */
-    private final BufferManager _bufferManager;
-
-    /**
-     * The SessionManager via which sessions are located and created.
-     */
-    private final SessionManager _sessionManager;
-
-    /**
-     * The destination of all events destined for next layer.
-     */
-    private final EventSink _target;
-
-    /**
-     * Create handler with specified destination sink.
-     *
-     * @param sink the destination
-     */
-    public PacketIOEventHandler( final TimeEventSource timeEventSource,
-                                 final SelectableChannelEventSource ces,
-                                 final EventSink sink,
-                                 final EventSink target,
-                                 final BufferManager bufferManager,
-                                 final SessionManager sessionManager )
-    {
-        super( sink );
-        if( null == timeEventSource )
-        {
-            throw new NullPointerException( "timeEventSource" );
-        }
-        if( null == target )
-        {
-            throw new NullPointerException( "target" );
-        }
-        if( null == bufferManager )
-        {
-            throw new NullPointerException( "bufferManager" );
-        }
-        if( null == sessionManager )
-        {
-            throw new NullPointerException( "sessionManager" );
-        }
-        _channelEventSource = ces;
-        _timeEventSource = timeEventSource;
-        _target = target;
-        _bufferManager = bufferManager;
-        _sessionManager = sessionManager;
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        if( event instanceof TimeEvent )
-        {
-            final TimeEvent e = (TimeEvent) event;
-            handleTimeout( e );
-        }
-        else if( event instanceof ConnectErrorEvent )
-        {
-            final ConnectErrorEvent ce = (ConnectErrorEvent) event;
-            handleConnectFailed( ce );
-        }
-        else if( event instanceof ChannelClosedEvent )
-        {
-            final ChannelClosedEvent cc = (ChannelClosedEvent) event;
-            handleClose( cc );
-        }
-        else
-        {
-            final ChannelTransport transport;
-            if( event instanceof AbstractTransportEvent )
-            {
-                final AbstractTransportEvent e = (AbstractTransportEvent) event;
-                transport = e.getTransport();
-            }
-            else
-            {
-                final AbstractSessionEvent e = (AbstractSessionEvent) event;
-                transport = e.getSession().getTransport();
-            }
-            try
-            {
-                if( event instanceof InputDataPresentEvent )
-                {
-                    final InputDataPresentEvent ie = (InputDataPresentEvent) event;
-                    handleInput( ie );
-                }
-                else if( event instanceof ConnectRequestEvent )
-                {
-                    final ConnectRequestEvent cre = (ConnectRequestEvent) event;
-                    startConnect( cre.getSession() );
-                }
-                else if( event instanceof PingRequestEvent )
-                {
-                    final PingRequestEvent pre = (PingRequestEvent) event;
-                    sendPing( pre.getSession() );
-                }
-                else if( event instanceof ConnectEvent )
-                {
-                    final ConnectEvent ce = (ConnectEvent) event;
-                    handleConnect( ce );
-                }
-                else if( event instanceof SessionDisconnectRequestEvent )
-                {
-                    final SessionDisconnectRequestEvent e = (SessionDisconnectRequestEvent) event;
-                    handleSessionDisconnectRequest( e.getSession() );
-                }
-                else if( event instanceof PacketWriteRequestEvent )
-                {
-                    final PacketWriteRequestEvent e = (PacketWriteRequestEvent) event;
-                    handleOutput( e );
-                }
-            }
-            catch( final IOException ioe )
-            {
-                ioe.printStackTrace( System.out );
-                closeTransport( transport );
-            }
-        }
-    }
-
-    private void startConnect( final Session session ) throws IOException
-    {
-        //Make sure session is disconnected
-        session.setTransport( null );
-        final SocketChannel channel = SocketChannel.open();
-        _channelEventSource.registerChannel( channel,
-                                             SelectionKey.OP_CONNECT,
-                                             session );
-        channel.socket().setSoLinger( true, 2 );
-        channel.connect( session.getAddress() );
-        if( !session.isConnecting() )
-        {
-            session.setConnecting( true );
-        }
-    }
-
-    private void handleNack( final Session session, final short sequence )
-    {
-        if( isDebugEnabled() )
-        {
-            debug( session, "RECEIVED NACK " + sequence );
-        }
-        final Packet packet = session.getTransmitQueue().getPacket( sequence );
-        if( null == packet )
-        {
-            signalDisconnectTransport( session.getTransport(),
-                                       SessionErrorEvent.ERROR_BAD_NACK );
-        }
-        else
-        {
-            final PacketWriteRequestEvent response = new PacketWriteRequestEvent(
-                session, packet );
-            getSink().addEvent( response );
-        }
-    }
-
-    private boolean isDebugEnabled()
-    {
-        return DEBUG;
-    }
-
-    /**
-     * Handle timeout of conenction.
-     *
-     * @param e the event
-     */
-    private void handleTimeout( final TimeEvent e )
-    {
-        final SchedulingKey key = e.getKey();
-        final TimerEntry timer = (TimerEntry) key.getUserData();
-        final Session session = timer.getSession();
-        final int status = session.getStatus();
-        if( Session.STATUS_NOT_CONNECTED == status &amp;&amp; !session.isClient() )
-        {
-            session.setError();
-            final SessionErrorEvent error = new SessionErrorEvent( session,
-                                                                   SessionErrorEvent.ERROR_SESSION_TIMEOUT );
-            _target.addEvent( error );
-            disconnectSession( session );
-        }
-        else if( Session.STATUS_CONNECTED == status )
-        {
-            session.cancelTimeout();
-            closeTransport( session.getTransport() );
-        }
-        else if( Session.STATUS_ESTABLISHED == status )
-        {
-            final ChannelTransport transport = session.getTransport();
-            transport.reregister();
-            final long lastNetTime = Math.max( transport.getLastRxTime(),
-                                               transport.getLastTxTime() );
-            final long now = System.currentTimeMillis();
-            if( lastNetTime + MAX_IDLE_TIME &lt; now &amp;&amp;
-                session.getLastPingTime() &lt; lastNetTime )
-            {
-                session.ping();
-            }
-        }
-    }
-
-    /**
-     * Handle message to disconnect Session gracefully.
-     *
-     * @param session the session
-     */
-    private void handleSessionDisconnectRequest( final Session session )
-        throws IOException
-    {
-        if( isDebugEnabled() )
-        {
-            debug( session, "DISCONNECT REQUESTED BY USER" );
-        }
-        session.setDisconnectRequested();
-        final ChannelTransport transport = session.getTransport();
-        if( canOutput( transport ) )
-        {
-            sendSessionStatus( session );
-            sendPing( session );
-            sendDisconnectRequest( transport );
-        }
-    }
-
-    private void sendDisconnectRequest( final ChannelTransport transport )
-        throws IOException
-    {
-        final TransportOutputStream output = transport.getOutputStream();
-        output.write( MessageCodes.DISCONNECT_REQUEST );
-        output.flush();
-    }
-
-    private void disconnectSession( final Session session )
-    {
-        final int status = session.getStatus();
-        if( Session.STATUS_DISCONNECTED == status )
-        {
-            return;
-        }
-        if( Session.STATUS_ESTABLISHED == status )
-        {
-            _target.addEvent( new SessionInactiveEvent( session ) );
-        }
-        session.setStatus( Session.STATUS_DISCONNECTED );
-        _sessionManager.deleteSession( session );
-        _target.addEvent( new SessionDisconnectEvent( session ) );
-    }
-
-    private void makeActive( final Session session ) throws IOException
-    {
-        session.setStatus( Session.STATUS_ESTABLISHED );
-        sendSessionStatus( session );
-        sendPing( session );
-        if( session.isDisconnectRequested() )
-        {
-            sendDisconnectRequest( session.getTransport() );
-        }
-        final PeriodicTimeTrigger trigger =
-           new PeriodicTimeTrigger( MAX_IDLE_TIME, MAX_IDLE_TIME );
-        final TimerEntry timer = new TimerEntry( "PINGER", session );
-        final SchedulingKey key =
-           _timeEventSource.addTrigger( trigger, timer );
-        session.setTimeoutKey( key );
-        session.setConnecting( false );
-        _target.addEvent( new SessionActiveEvent( session ) );
-    }
-
-    private void sendSessionStatus( final Session session ) throws IOException
-    {
-        if( !canOutput( session.getTransport() ) )
-        {
-            return;
-        }
-
-        sendAck( session );
-
-        sendNacks( session );
-    }
-
-    private void sendPing( final Session session ) throws IOException
-    {
-        final ChannelTransport transport = session.getTransport();
-        if( canOutput( transport ) &amp;&amp; session.hasTransmittedData() )
-        {
-            final short sequence = session.getLastPacketTransmitted();
-            session.setLastPingTime( System.currentTimeMillis() );
-            ensureValidSession( transport );
-            if( canOutput( transport ) )
-            {
-                if( isDebugEnabled() )
-                {
-                    debug( session, "SEND PING " + sequence );
-                }
-                final TransportOutputStream output = transport.getOutputStream();
-                output.write( MessageCodes.PING );
-                TypeIOUtil.writeShort( output, sequence );
-                output.flush();
-            }
-        }
-    }
-
-    private void sendAck( final Session session ) throws IOException
-    {
-        final ChannelTransport transport = session.getTransport();
-        if( session.hasReceivedData() &amp;&amp; session.needsToSendAck() )
-        {
-            final short processed = session.getLastPacketProcessed();
-            session.acked();
-            if( isDebugEnabled() )
-            {
-                debug( session, "SEND ACK " + processed );
-            }
-            sendAck( transport, processed );
-            checkDisconnect( session, transport );
-        }
-    }
-
-    private void sendNacks( final Session session ) throws IOException
-    {
-        final ChannelTransport transport = session.getTransport();
-        final short processed = session.getLastPacketProcessed();
-        final PacketQueue queue = session.getReceiveQueue();
-        final short expected = session.getLastPacketExpected();
-        final short initial = (short) ( processed + 1 );
-        for( short i = initial; i &lt;= expected; i++ )
-        {
-            final Packet packet = queue.getPacket( i );
-            if( null == packet )
-            {
-                if( isDebugEnabled() )
-                {
-                    debug( session, "SEND NACK " + i );
-                }
-                sendNack( transport, i );
-            }
-        }
-    }
-
-    private boolean canOutput( final ChannelTransport transport )
-    {
-        return !( null == transport || transport.getOutputStream().isClosed() );
-    }
-
-    /**
-     * Handle connect failure event.
-     *
-     * @param ce the connect failure event
-     */
-    private void handleConnectFailed( final ConnectErrorEvent ce )
-    {
-        final ChannelTransport transport = ce.getTransport();
-       final Session session;
-       try
-       {
-          session = (Session) transport.getUserData();
-       if( null != session )
-        {
-            session.setTransport( null );
-            setupInactivityTimout( session );
-        }
-          }
-       catch( final ClassCastException e )
-       {
-          final Object object = transport.getUserData();
-          if( null != object )
-          {
-             System.out.println( "object.getClass() = " + object.getClass() );
-          }
-          e.printStackTrace();
-
-       }
-    }
-
-    private void setupInactivityTimout( final Session session )
-    {
-        session.cancelTimeout();
-        final PeriodicTimeTrigger trigger = new PeriodicTimeTrigger(
-            TIMEOUT_IN_MILLIS, -1 );
-        final TimerEntry timer = new TimerEntry( "INACTIVE TIMEOUT", session );
-        final SchedulingKey key = _timeEventSource.addTrigger( trigger,
-                                                               timer );
-        session.setTimeoutKey( key );
-    }
-
-    /**
-     * Handle close of transport event.
-     *
-     * @param cc the close event
-     */
-    private void handleClose( final ChannelClosedEvent cc )
-    {
-        final ChannelTransport transport = cc.getTransport();
-        final Session session = (Session) transport.getUserData();
-
-        if( null != session &amp;&amp; session.isPendingDisconnect() )
-        {
-            disconnectSession( session );
-        }
-
-        closeTransport( transport );
-
-        if( isDebugEnabled() )
-        {
-            debug( transport, "Transport Closed. Session=" + session );
-        }
-
-        if( null != session &amp;&amp;
-            Session.STATUS_DISCONNECTED != session.getStatus() )
-        {
-            setupInactivityTimout( session );
-            _target.addEvent( new SessionInactiveEvent( session ) );
-        }
-    }
-
-    /**
-     * Handle initial greeting event event.
-     *
-     * @param e the event
-     */
-    private void handleConnect( final ConnectEvent e ) throws IOException
-    {
-        final ChannelTransport transport = e.getTransport();
-        final Session session = (Session) transport.getUserData();
-        if( null != session &amp;&amp; session.isClient() )
-        {
-            final int status = session.getStatus();
-            if( Session.STATUS_DISCONNECTED == status || session.isError() )
-            {
-                signalDisconnectTransport( transport,
-                                           SessionErrorEvent.ERROR_SESSION_DISCONNECTED );
-                return;
-            }
-            session.setTransport( transport );
-            sendGreeting( transport,
-                          session.getSessionID(),
-                          session.getAuthID() );
-            setupInactivityTimout( session );
-        }
-    }
-
-    private void closeTransport( final ChannelTransport transport )
-    {
-        if( null == transport )
-        {
-            return;
-        }
-        transport.getOutputStream().close();
-        final Session session = (Session) transport.getUserData();
-        if( null != session )
-        {
-            session.setTransport( null );
-        }
-    }
-
-    /**
-     * Handle event relating to debug.
-     *
-     * @param e the debug event
-     */
-    private void handleOutput( final PacketWriteRequestEvent e )
-        throws IOException
-    {
-        final Session session = e.getSession();
-        final ChannelTransport transport = session.getTransport();
-        final Packet packet = e.getPacket();
-        if( !canOutput( transport ) )
-        {
-            if( isDebugEnabled() )
-            {
-                debug( session, "QUEUED " + packet.getSequence() );
-            }
-            return;
-        }
-        else
-        {
-            final PacketQueue transmitQueue = session.getTransmitQueue();
-            if( null != transmitQueue.getPacket( packet.getSequence() ) )
-            {
-                sendData( transport, packet );
-            }
-            else
-            {
-                if( isDebugEnabled() )
-                {
-                    debug( session, "DROPPING Packet Write Request " +
-                                    "as already acked: " + packet.getSequence() );
-                }
-            }
-        }
-    }
-
-    /**
-     * Handle input from transport.
-     *
-     * @param ie the event indicating data present
-     */
-    private void handleInput( final InputDataPresentEvent ie )
-        throws IOException
-    {
-        final ChannelTransport transport = ie.getTransport();
-        boolean dataPresent = true;
-        while( dataPresent )
-        {
-            if( null == transport.getUserData() )
-            {
-                dataPresent = receiveGreeting( transport );
-            }
-            else
-            {
-                dataPresent = handleConnectedInput( transport );
-            }
-        }
-    }
-
-    /**
-     * Handle input from a connected transport. A Transport is considered
-     * connected if it gets through initial magic number handshake and session
-     * establishment.
-     *
-     * @param transport the transport
-     * @throws IOException if error reading input
-     */
-    boolean handleConnectedInput( final ChannelTransport transport )
-        throws IOException
-    {
-        final InputStream input = transport.getInputStream();
-        final int available = input.available();
-        if( available &lt; TypeIOUtil.SIZEOF_BYTE )
-        {
-            return false;
-        }
-
-        input.mark( Protocol.MAX_MESSAGE_HEADER );
-
-        final Session session = (Session) transport.getUserData();
-        final int msg = input.read();
-        if( isDebugEnabled() )
-        {
-            debug( session, "msg = " + msg + " available=" + available );
-        }
-        if( !session.isClient() &amp;&amp; MessageCodes.ESTABLISHED == msg &amp;&amp;
-            Session.STATUS_CONNECTED == session.getStatus() )
-        {
-            return receiveEstablish( transport );
-        }
-        else if( session.isClient() &amp;&amp; MessageCodes.CONNECT == msg &amp;&amp;
-                 Session.STATUS_CONNECTED == session.getStatus() )
-        {
-            return receiveConnect( transport );
-        }
-        else if( MessageCodes.ERROR == msg )
-        {
-            return receiveError( transport );
-        }
-        else if( MessageCodes.DISCONNECT_REQUEST == msg )
-        {
-            return receiveDisconnectRequest( transport );
-        }
-        else if( MessageCodes.DISCONNECT == msg )
-        {
-            return receiveDisconnect( transport );
-        }
-        else if( MessageCodes.DATA == msg )
-        {
-            return receiveData( transport );
-        }
-        else if( MessageCodes.PING == msg )
-        {
-            return receivePing( transport );
-        }
-        else if( MessageCodes.ACK == msg )
-        {
-            return receiveAck( transport );
-        }
-        else if( MessageCodes.NACK == msg )
-        {
-            return receiveNack( transport );
-        }
-        else
-        {
-            debug( session, "UNKNOWN MESSAGE " + msg );
-            signalDisconnectTransport( transport,
-                                       SessionErrorEvent.ERROR_BAD_MESSAGE );
-            return false;
-        }
-    }
-
-    /**
-     * Send a the greeting at start of stream.
-     *
-     * @param transport the transport
-     */
-    private void sendGreeting( final ChannelTransport transport,
-                               final long sessionID,
-                               final short authID ) throws IOException
-    {
-        if( isDebugEnabled() )
-        {
-            debug( transport, "SEND GREETING" );
-        }
-        final OutputStream output = transport.getOutputStream();
-        final byte[] magic = Protocol.MAGIC;
-        for( int i = 0; i &lt; magic.length; i++ )
-        {
-            output.write( magic[ i ] );
-        }
-        TypeIOUtil.writeLong( output, sessionID );
-        TypeIOUtil.writeShort( output, authID );
-        output.flush();
-    }
-
-    /**
-     * Receive greeting that occurs at start of stream.
-     *
-     * @param transport the transport
-     * @throws IOException if an error occurs reading from transport
-     */
-    private boolean receiveGreeting( final ChannelTransport transport )
-        throws IOException
-    {
-        final MultiBufferInputStream input = transport.getInputStream();
-        final int available = input.available();
-        if( available &gt;= Protocol.SIZEOF_GREETING )
-        {
-            if( isDebugEnabled() )
-            {
-                debug( transport, "RECEIVE GREETING" );
-            }
-            if( !checkMagicNumber( input ) )
-            {
-                signalDisconnectTransport( transport,
-                                           SessionErrorEvent.ERROR_BAD_MAGIC );
-                return false;
-            }
-
-            final long sessionID = TypeIOUtil.readLong( input );
-            final short authID = TypeIOUtil.readShort( input );
-            if( -1 == sessionID )
-            {
-                final Session session = _sessionManager.newSession();
-                session.setSink( getSink() );
-                sendConnect( transport, session );
-                _target.addEvent( new SessionConnectEvent( session ) );
-                return true;
-            }
-            else
-            {
-                final Session session = _sessionManager.findSession( sessionID );
-                if( null == session )
-                {
-                    signalDisconnectTransport( transport,
-                                               SessionErrorEvent.ERROR_BAD_SESSION );
-                    return false;
-                }
-                else if( session.getAuthID() != authID )
-                {
-                    signalDisconnectTransport( transport,
-                                               SessionErrorEvent.ERROR_BAD_AUTH );
-                    return false;
-                }
-                else
-                {
-                    sendConnect( transport, session );
-                    return true;
-                }
-            }
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    /**
-     * Send a "connect" message on transport.
-     *
-     * @param transport the transport
-     * @param session   the associated session
-     * @throws IOException if error reading from stream
-     */
-    private void sendConnect( final ChannelTransport transport,
-                              final Session session ) throws IOException
-    {
-        session.setTransport( transport );
-        sendConnect( transport, session.getSessionID(), session.getAuthID() );
-    }
-
-    /**
-     * Check if streams starts with correct magic number.
-     *
-     * @param input the input stream.
-     * @return true if stream starts with magic number
-     * @throws IOException if error reading from stream
-     */
-    private boolean checkMagicNumber( final InputStream input )
-        throws IOException
-    {
-        final byte[] magic = Protocol.MAGIC;
-        for( int i = 0; i &lt; magic.length; i++ )
-        {
-            final byte b = magic[ i ];
-            final int in = input.read();
-            if( b != in )
-            {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Send a Connect message.
-     *
-     * @param transport the transport
-     */
-    private void sendConnect( final ChannelTransport transport,
-                              final long sessionID,
-                              final short authID ) throws IOException
-    {
-        if( isDebugEnabled() )
-        {
-            debug( transport, "SEND CONNECT" );
-        }
-        final OutputStream output = transport.getOutputStream();
-        output.write( MessageCodes.CONNECT );
-        TypeIOUtil.writeLong( output, sessionID );
-        TypeIOUtil.writeShort( output, authID );
-        output.flush();
-    }
-
-    /**
-     * Handle an establish message.
-     *
-     * @param transport the transport
-     */
-    private boolean receiveConnect( final ChannelTransport transport )
-        throws IOException
-    {
-        final Session session = (Session) transport.getUserData();
-        final InputStream input = transport.getInputStream();
-        final int available = input.available();
-        if( available &lt; TypeIOUtil.SIZEOF_LONG + TypeIOUtil.SIZEOF_SHORT )
-        {
-            input.reset();
-            return false;
-        }
-        else
-        {
-            if( isDebugEnabled() )
-            {
-                debug( session, "RECEIVE CONNECT" );
-            }
-            final long sessionID = TypeIOUtil.readLong( input );
-            final short authID = TypeIOUtil.readShort( input );
-            if( sessionID != session.getSessionID() )
-            {
-                // To make sure clients get connect event when
-                // sessionID is known.
-                session.setSink( getSink() );
-                _target.addEvent( new SessionConnectEvent( session ) );
-            }
-
-            session.setSessionID( sessionID );
-            session.setAuthID( authID );
-            sendEstablished( transport );
-            makeActive( session );
-            return true;
-        }
-    }
-
-    /**
-     * Send an establish message.
-     *
-     * @param transport the transport
-     */
-    private void sendEstablished( final ChannelTransport transport )
-        throws IOException
-    {
-        ensureSessionPresent( transport );
-        if( isDebugEnabled() )
-        {
-            debug( transport, "SEND ESTABLISH" );
-        }
-        final TransportOutputStream output = transport.getOutputStream();
-        output.write( MessageCodes.ESTABLISHED );
-        output.flush();
-    }
-
-    /**
-     * Receive an establish message.
-     *
-     * @param transport the transport
-     */
-    private boolean receiveEstablish( final ChannelTransport transport )
-        throws IOException
-    {
-        final Session session = (Session) transport.getUserData();
-        if( isDebugEnabled() )
-        {
-            debug( session, "RECEIVE ESTABLISH" );
-        }
-        makeActive( session );
-        return true;
-    }
-
-    /**
-     * Send an ack message.
-     *
-     * @param transport the transport
-     * @throws IOException if io error occurs
-     */
-    private void sendAck( final ChannelTransport transport,
-                          final short sequence ) throws IOException
-    {
-        ensureValidSession( transport );
-        if( canOutput( transport ) )
-        {
-            final TransportOutputStream output = transport.getOutputStream();
-            output.write( MessageCodes.ACK );
-            TypeIOUtil.writeShort( output, sequence );
-            output.flush();
-        }
-    }
-
-    /**
-     * Receive an ack message.
-     *
-     * @param transport the transport
-     * @throws IOException if io error occurs
-     */
-    private boolean receivePing( final ChannelTransport transport )
-        throws IOException
-    {
-        ensureValidSession( transport );
-        final Session session = (Session) transport.getUserData();
-        final InputStream input = transport.getInputStream();
-        final int available = input.available();
-        if( available &lt; TypeIOUtil.SIZEOF_SHORT )
-        {
-            input.reset();
-            return false;
-        }
-        else
-        {
-            final short sequence = TypeIOUtil.readShort( input );
-            if( isDebugEnabled() )
-            {
-                debug( session, "RECEIVE PING " + sequence );
-            }
-            session.setLastPacketExpected( sequence );
-            sendNacks( session );
-            checkDisconnect( session, transport );
-            return true;
-        }
-    }
-
-    /**
-     * Receive an ack message.
-     *
-     * @param transport the transport
-     * @throws IOException if io error occurs
-     */
-    private boolean receiveAck( final ChannelTransport transport )
-        throws IOException
-    {
-        ensureValidSession( transport );
-        final Session session = (Session) transport.getUserData();
-        final InputStream input = transport.getInputStream();
-        final int available = input.available();
-        if( available &lt; TypeIOUtil.SIZEOF_SHORT )
-        {
-            input.reset();
-            return false;
-        }
-        else
-        {
-            final short sequence = TypeIOUtil.readShort( input );
-            if( isDebugEnabled() )
-            {
-                debug( session, "RECEIVE ACK " + sequence );
-            }
-            final List acked = session.getTransmitQueue().ack( sequence );
-
-            final int count = acked.size();
-            for( int i = 0; i &lt; count; i++ )
-            {
-                final Packet packet = (Packet) acked.get( i );
-                _bufferManager.releaseBuffer( packet.getData() );
-            }
-
-            checkDisconnect( session, transport );
-            return true;
-        }
-    }
-
-    /**
-     * Send a nack message.
-     *
-     * @param transport the transport
-     * @throws IOException if io error occurs
-     */
-    private void sendNack( final ChannelTransport transport,
-                           final short sequence ) throws IOException
-    {
-        ensureValidSession( transport );
-        final TransportOutputStream output = transport.getOutputStream();
-        output.write( MessageCodes.NACK );
-        TypeIOUtil.writeShort( output, sequence );
-        output.flush();
-    }
-
-    /**
-     * Receive a nack message.
-     *
-     * @param transport the transport
</pre></pre>
<strong class="error">[truncated at 1000 lines; 373 more skipped]</strong>
</div>
<hr /><a name="file120" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>Protocol.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N Protocol.java
--- Protocol.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,79 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.packet.handlers;
-
-/**
- * Set of constants used in network protocol.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class Protocol
-{
-    /**
-     * Byte array containing magic number sent at start of stream.
-     */
-    public static final byte[] MAGIC = new byte[]{'m',
-                                                  'a',
-                                                  'g',
-                                                  'i',
-                                                  'c',
-                                                  '0',
-                                                  '1'};
-
-    /**
-     * The sizeof header that client sends to server.
-     */
-    public static final int SIZEOF_GREETING = MAGIC.length +
-                                              TypeIOUtil.SIZEOF_LONG /* session */ +
-                                              TypeIOUtil.SIZEOF_SHORT /* auth */;
-
-    /**
-     * The Max-message header is the "connect" message to client. The "data"
-     * message is the largest size but it does secondary checking before reading
-     * from payload.
-     */
-    public static final int MAX_MESSAGE_HEADER = TypeIOUtil.SIZEOF_BYTE +
-                                                 TypeIOUtil.SIZEOF_LONG +
-                                                 TypeIOUtil.SIZEOF_SHORT;
-
-    /**
-     * Max difference between successive sequence numbers to test for wrap
-     * around.
-     */
-    public static final short MAX_DIFF = Short.MAX_VALUE / 2;
-
-    /**
-     * Return true if seq1 is less than or equal seq2 accounting for
-     * wraparound.
-     *
-     * @param seq1 a sequence
-     * @param seq2 a sequence
-     * @return true if seq1 is less than or equal seq2
-     */
-    public static boolean isLessThanOrEqual( final short seq1,
-                                             final short seq2 )
-    {
-        return seq1 &lt;= seq2 || seq1 - MAX_DIFF &gt; seq2;
-    }
-
-    /**
-     * Return true if seq1 is next in sequence after seq2 accounting for
-     * wrapping.
-     *
-     * @param seq1 the first sequence
-     * @param seq2 the seconds sequence
-     * @return true if seq1 is next in sequence after seq2 accounting for
-     *         wrapping.
-     */
-    public static final boolean isNextInSequence( final short seq1,
-                                                  final short seq2 )
-    {
-        return (short) ( seq2 + 1 ) == seq1;
-    }
-}
</pre></div>
<hr /><a name="file121" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>TimerEntry.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N TimerEntry.java
--- TimerEntry.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.handlers;
-
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-class TimerEntry
-{
-    private final String _reason;
-    private final Session _session;
-
-    TimerEntry( final String reason, final Session session )
-    {
-        _reason = reason;
-        _session = session;
-    }
-
-    public String getReason()
-    {
-        return _reason;
-    }
-
-    public Session getSession()
-    {
-        return _session;
-    }
-
-    public String toString()
-    {
-        return "Timer[Reason=" + _reason + ", Session=" + _session + "]";
-    }
-}
</pre></div>
<hr /><a name="file122" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/handlers<br /></span>
<div class="fileheader" id="removed"><big><b>TypeIOUtil.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N TypeIOUtil.java
--- TypeIOUtil.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,92 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.handlers;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class TypeIOUtil
-{
-    public static final int SIZEOF_BYTE = 1;
-    public static final int SIZEOF_SHORT = 2;
-    public static final int SIZEOF_INTEGER = 4;
-    public static final int SIZEOF_LONG = 8;
-
-    public static short readShort( final InputStream input )
-        throws IOException
-    {
-        return (short) ( ( read( input ) &lt;&lt; 8 ) + read( input ) );
-    }
-
-    public static void writeShort( final OutputStream output,
-                                   final short value ) throws IOException
-    {
-        output.write( (byte) ( ( value &gt;&gt; 8 ) &amp; 0xff ) );
-        output.write( (byte) ( ( value &gt;&gt; 0 ) &amp; 0xff ) );
-    }
-
-    public static void writeInteger( final OutputStream output,
-                                     final int value ) throws IOException
-    {
-        output.write( (byte) ( ( value &gt;&gt; 24 ) &amp; 0xff ) );
-        output.write( (byte) ( ( value &gt;&gt; 16 ) &amp; 0xff ) );
-        output.write( (byte) ( ( value &gt;&gt; 8 ) &amp; 0xff ) );
-        output.write( (byte) ( ( value &gt;&gt; 0 ) &amp; 0xff ) );
-    }
-
-    public static void writeLong( final OutputStream output,
-                                  final long value ) throws IOException
-    {
-        output.write( (int) ( value &gt;&gt;&gt; 56 ) &amp; 0xFF );
-        output.write( (int) ( value &gt;&gt;&gt; 48 ) &amp; 0xFF );
-        output.write( (int) ( value &gt;&gt;&gt; 40 ) &amp; 0xFF );
-        output.write( (int) ( value &gt;&gt;&gt; 32 ) &amp; 0xFF );
-        output.write( (int) ( value &gt;&gt;&gt; 24 ) &amp; 0xFF );
-        output.write( (int) ( value &gt;&gt;&gt; 16 ) &amp; 0xFF );
-        output.write( (int) ( value &gt;&gt;&gt; 8 ) &amp; 0xFF );
-        output.write( (int) ( value &gt;&gt;&gt; 0 ) &amp; 0xFF );
-    }
-
-    public static long readLong( final InputStream input ) throws IOException
-    {
-        final long value1 = read( input );
-        final long value2 = read( input );
-        final long value3 = read( input );
-        final long value4 = read( input );
-        final long value5 = read( input );
-        final long value6 = read( input );
-        final long value7 = read( input );
-        final long value8 = read( input );
-
-        return ( ( value1 &lt;&lt; 56 ) + ( value2 &lt;&lt; 48 ) + ( value3 &lt;&lt; 40 ) + ( value4 &lt;&lt;
-                                                                            32 ) + ( value5 &lt;&lt;
-                                                                                     24 ) + ( value6 &lt;&lt;
-                                                                                              16 ) + ( value7 &lt;&lt;
-                                                                                                       8 ) + ( value8 &lt;&lt;
-                                                                                                               0 ) );
-    }
-
-    public static final int readInteger( final InputStream input )
-        throws IOException
-    {
-        final int ch1 = read( input );
-        final int ch2 = read( input );
-        final int ch3 = read( input );
-        final int ch4 = read( input );
-        return ( ( ch1 &lt;&lt; 24 ) + ( ch2 &lt;&lt; 16 ) + ( ch3 &lt;&lt; 8 ) + ( ch4 &lt;&lt; 0 ) );
-    }
-
-    private static int read( final InputStream input ) throws IOException
-    {
-        final int value = input.read();
-        if( -1 == value )
-        {
-            throw new EOFException( "Unexpected EOF reached" );
-        }
-        return value;
-    }
-}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file123" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/session<br /></span>
<div class="fileheader" id="removed"><big><b>DefaultSessionManager.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N DefaultSessionManager.java
--- DefaultSessionManager.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,92 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.packet.session;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-
-/**
- * A basic in memory SessionManager implementation.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class DefaultSessionManager
-    implements SessionManager
-{
-    /**
-     * generator for authentication IDs.
-     */
-    private final Random _generator = new Random();
-
-    /**
-     * Map of sessionIDs to sessions.
-     */
-    private final Map _sessions = new HashMap();
-
-    private final Set _roSessions = Collections.unmodifiableSet(
-        _sessions.entrySet() );
-
-    /**
-     * The last sessionID allocated. The next session ID will just be the next
-     * in sequence.
-     */
-    private long _lastSessionID = 1;
-
-    /**
-     * @see SessionManager#findSession(long)
-     */
-    public Session findSession( final long id )
-    {
-        return (Session) _sessions.get( new Long( id ) );
-    }
-
-    /**
-     * @see SessionManager#getSessionCount()
-     */
-    public int getSessionCount()
-    {
-        return _sessions.size();
-    }
-
-    /**
-     * @see SessionManager#newSession()
-     */
-    public synchronized Session newSession()
-    {
-        final Session session = new Session( _lastSessionID++,
-                                             (short) _generator.nextInt() );
-        _sessions.put( new Long( session.getSessionID() ), session );
-        return session;
-    }
-
-    public Collection getSessionIDs()
-    {
-        return _sessions.keySet();
-    }
-
-    /**
-     * @see SessionManager#deleteSession(Session)
-     */
-    public void deleteSession( final Session session )
-    {
-        _sessions.remove( new Long( session.getSessionID() ) );
-    }
-
-    /**
-     * @see SessionManager#getSessions()
-     */
-    public Collection getSessions()
-    {
-        return _roSessions;
-    }
-}
</pre></div>
<hr /><a name="file124" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/session<br /></span>
<div class="fileheader" id="removed"><big><b>PacketQueue.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N PacketQueue.java
--- PacketQueue.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,154 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.session;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import org.codehaus.spice.packet.Packet;
-import org.codehaus.spice.packet.handlers.Protocol;
-
-/**
- * A queue of packets for session.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public class PacketQueue
-{
-    /**
-     * List of attributes associated with session.
-     */
-    private final List _packets = new ArrayList();
-
-    /**
-     * Return the number of packets in queue.
-     *
-     * @return the number of packets in queue.
-     */
-    public synchronized int size()
-    {
-        return _packets.size();
-    }
-
-    /**
-     * Look at packet at head of queue.
-     *
-     * @return the packet
-     */
-    public synchronized Packet peek()
-    {
-        if( _packets.size() == 0 )
-        {
-            return null;
-        }
-        else
-        {
-            return (Packet) _packets.get( 0 );
-        }
-    }
-
-    /**
-     * Return packet at head of queue and remove from queue.
-     *
-     * @return the packet
-     */
-    public synchronized Packet pop()
-    {
-        if( _packets.size() == 0 )
-        {
-            return null;
-        }
-        else
-        {
-            return (Packet) _packets.remove( 0 );
-        }
-    }
-
-    /**
-     * Add packet to queue.
-     * 
-     * @param packet the packet
-     */
-    public synchronized void addPacket( final Packet packet )
-    {
-        if( null == packet )
-        {
-            throw new NullPointerException( "packet" );
-        }
-        if( !_packets.contains( packet ) )
-        {
-            _packets.add( packet );
-            Collections.sort( _packets, SequenceComparator.COMPARATOR );
-        }
-    }
-
-    /**
-     * Ack a packet with specified sequence. Involves removing every packet with
-     * sequence less than or equal to supplied sequence.
-     * 
-     * @param sequence the sequence
-     */
-    public synchronized List ack( final short sequence )
-    {
-        final ArrayList result = new ArrayList();
-        boolean found = false;
-
-        final Iterator iterator = _packets.iterator();
-        while( iterator.hasNext() &amp;&amp; !found )
-        {
-            final Packet packet = (Packet) iterator.next();
-            final short seq = packet.getSequence();
-
-            if( Protocol.isLessThanOrEqual( seq, sequence ) )
-            {
-                if( seq == sequence )
-                {
-                    found = true;
-                }
-                result.add( packet );
-                iterator.remove();
-            }
-        }
-
-        return result;
-    }
-
-    /**
-     * Return the packet with specified sequence.
-     * 
-     * @param sequence the sequence
-     * @return the packet with sequence or null if no such packet
-     */
-    public synchronized Packet getPacket( final short sequence )
-    {
-        final int size = _packets.size();
-        for( int i = 0; i &lt; size; i++ )
-        {
-            final Packet packet = (Packet) _packets.get( i );
-            final short seq = packet.getSequence();
-            if( seq == sequence )
-            {
-                return packet;
-            }
-        }
-        return null;
-    }
-
-    public synchronized List getSequences()
-    {
-        final ArrayList result = new ArrayList();
-        final int size = _packets.size();
-        for( int i = 0; i &lt; size; i++ )
-        {
-            final Packet packet = (Packet) _packets.get( i );
-            final short seq = packet.getSequence();
-            result.add( new Short( seq ) );
-        }
-        return result;
-    }
-
-    public String toString()
-    {
-        return "PacketQueue[" + _packets + "]";
-    }
-}
</pre></div>
<hr /><a name="file125" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/session<br /></span>
<div class="fileheader" id="removed"><big><b>SequenceComparator.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SequenceComparator.java
--- SequenceComparator.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet.session;
-
-import java.util.Comparator;
-import org.codehaus.spice.packet.Packet;
-
-/**
- * Comparator for sorting packets by sequence number.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-class SequenceComparator
-    implements Comparator
-{
-    static final SequenceComparator COMPARATOR = new SequenceComparator();
-
-    /**
-     * @see Comparator#compare(Object, Object)
-     */
-    public int compare( final Object o1, final Object o2 )
-    {
-        final Packet p1 = (Packet) o1;
-        final Packet p2 = (Packet) o2;
-
-        return p1.getSequence() - p2.getSequence();
-    }
-}
</pre></div>
<hr /><a name="file126" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/session<br /></span>
<div class="fileheader" id="removed"><big><b>Session.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N Session.java
--- Session.java	26 Mar 2004 02:23:02 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,622 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.packet.session;
-
-import java.net.InetSocketAddress;
-import java.nio.ByteBuffer;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.transport.ChannelTransport;
-import org.codehaus.spice.packet.Packet;
-import org.codehaus.spice.packet.events.ConnectRequestEvent;
-import org.codehaus.spice.packet.events.PacketWriteRequestEvent;
-import org.codehaus.spice.packet.events.PingRequestEvent;
-import org.codehaus.spice.packet.events.SessionDisconnectRequestEvent;
-import org.codehaus.spice.timeevent.source.SchedulingKey;
-
-/**
- * The session object for Client.
- * 
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/03/26 02:23:02 $
- */
-public class Session
-{
-    /**
-     * Status indicating client is not yet connected. Should only be set when
-     * session is initially created.
-     */
-    public static final int STATUS_NOT_CONNECTED = 0;
-
-    /**
-     * Status indicating the Client is connected and there is one or more
-     * associated Transports that are active. The client has been sent a message
-     * indicating that they are connected.
-     */
-    public static final int STATUS_CONNECTED = 1;
-
-    /**
-     * Status indicating the Client has acknowledged that they are connected.
-     */
-    public static final int STATUS_ESTABLISHED = 2;
-
-    /**
-     * Status indicating client is no longer connected.
-     */
-    public static final int STATUS_DISCONNECTED = 3;
-
-    private final PacketQueue _txQueue = new PacketQueue();
-
-    private final PacketQueue _rxQueue = new PacketQueue();
-
-    /**
-     * A unique id for this particula session.
-     */
-    private long _sessionID;
-
-    /**
-     * Authentication ID.
-     */
-    private short _authID;
-
-    /**
-     * Time at which session status last changed.
-     */
-    private long _timeOfLastStatusChange;
-
-    /**
-     * Status of session. Must be one of the STATUS_* constants.
-     */
-    private int _status = STATUS_NOT_CONNECTED;
-
-    /**
-     * The associated transport.
-     */
-    private ChannelTransport _transport;
-
-    /**
-     * Flag indicating whether this is the serverside or clientside session.
-     */
-    private boolean _client;
-
-    /**
-     * Flag indicating whether the session has received any data.
-     */
-    private boolean _hasReceivedData;
-
-    /**
-     * Flag indicating whether the session has received any data.
-     */
-    private boolean _hasTransmittedData;
-
-    /**
-     * Flag indicating whether the session will be disconencted when last
-     * messages transmitted.
-     */
-    private boolean _disconnectRequested;
-
-    /**
-     * Flag indicating whether the session will be disconencted when last
-     * messages transmitted.
-     */
-    private boolean _pendingDisconnect;
-
-    /**
-     * The sequence of the last packet processed.
-     */
-    private short _lastPacketProcessed;
-
-    /**
-     * The sequence of the last packet received.
-     */
-    private short _lastPacketReceived;
-
-    /**
-     * The sequence of the last packet processed.
-     */
-    private short _lastPacketExpected;
-
-    /**
-     * The sequence of the last packet transmitted.
-     */
-    private short _lastPacketTransmitted;
-
-    /**
-     * The userdata associated with the session.
-     */
-    private Object _userData;
-
-    private SchedulingKey _timeoutKey;
-
-    /**
-     * The EventSink that this Session sends events to.
-     */
-    private EventSink _sink;
-
-    /**
-     * Flag set to true when need to send acke for last received
-     * packetProcessed.
-     */
-    private boolean _needsToSendAck;
-
-    private int _connections;
-
-    /**
-     * Flag set to true when connection is attempted to be established.
-     */
-    private boolean _connecting;
-
-    /**
-     * Flag set to true when session failed due to a persistent error.
-     */
-    private boolean _error;
-
-    /**
-     * The time when the last ping was sent.
-     */
-    private long _lastPingTime;
-
-    /**
-     * The address that socket connected to.
-     */
-    private final InetSocketAddress _address;
-    private long _lastTxTime;
-    private long _lastRxTime;
-
-    /**
-     * Create Serverside session with specified ID.
-     *
-     * @param sessionID the session ID
-     * @param authID    the authID
-     */
-    public Session( final long sessionID, final short authID )
-    {
-        this( sessionID, authID, false, null );
-    }
-
-    /**
-     * Create clientside session.
-     */
-    public Session( final InetSocketAddress address, final EventSink sink )
-    {
-        this( -1, (short) 0, true, address );
-        setSink( sink );
-    }
-
-    /**
-     * Create session with specified ID.
-     *
-     * @param sessionID the session ID
-     * @param authID    the authID
-     * @param client    the client flag
-     */
-    protected Session( final long sessionID,
-                       final short authID,
-                       final boolean client,
-                       final InetSocketAddress address )
-    {
-        _sessionID = sessionID;
-        _authID = authID;
-        _client = client;
-        _address = address;
-    }
-
-    public synchronized void close()
-    {
-        requestShutdown();
-
-        while( true )
-        {
-            if( STATUS_DISCONNECTED == _status )
-            {
-                return;
-            }
-            try
-            {
-                wait();
-            }
-            catch( InterruptedException e )
-            {
-            }
-        }
-    }
-
-    public void setLastPingTime( final long lastPingTime )
-    {
-        _lastPingTime = lastPingTime;
-    }
-
-    public long getLastCommTime()
-    {
-        if( null != _transport )
-        {
-            return Math.max( _transport.getLastRxTime(),
-                             _transport.getLastTxTime() );
-        }
-        else
-        {
-            return Math.max( _lastRxTime, _lastTxTime );
-        }
-    }
-
-    public long getLastPingTime()
-    {
-        return _lastPingTime;
-    }
-
-    public void startConnection()
-    {
-        addEvent( new ConnectRequestEvent( this ) );
-        setConnecting( true );
-    }
-
-    public synchronized void waitUntilConnected()
-    {
-        while( true )
-        {
-            if( STATUS_ESTABLISHED == _status &amp;&amp; !isConnecting() || isError() )
-            {
-                return;
-            }
-            try
-            {
-                wait();
-            }
-            catch( InterruptedException e )
-            {
-            }
-        }
-    }
-
-    public boolean isError()
-    {
-        return _error;
-    }
-
-    public void setError()
-    {
-        _error = true;
-    }
-
-    public void requestShutdown()
-    {
-        if( !isInShutdown() )
-        {
-            addEvent( new SessionDisconnectRequestEvent( this ) );
-        }
-    }
-
-    public void ping()
-    {
-        addEvent( new PingRequestEvent( this ) );
-    }
-
-    public InetSocketAddress getAddress()
-    {
-        return _address;
-    }
-
-    private void addEvent( final Object event )
-    {
-        if( null != _sink )
-        {
-            _sink.addEvent( event );
-        }
-    }
-
-    public void setSink( final EventSink sink )
-    {
-        _sink = sink;
-    }
-
-    public void setTimeoutKey( final SchedulingKey timeoutKey )
-    {
-        cancelTimeout();
-        _timeoutKey = timeoutKey;
-    }
-
-    public void cancelTimeout()
-    {
-        if( null != _timeoutKey )
-        {
-            _timeoutKey.cancel();
-            _timeoutKey = null;
-        }
-    }
-
-    public short getLastPacketExpected()
-    {
-        return _lastPacketExpected;
-    }
-
-    public void setLastPacketExpected( final short lastPacketExpected )
-    {
-        _lastPacketExpected = lastPacketExpected;
-    }
-
-    public boolean hasTransmittedData()
-    {
-        return _hasTransmittedData;
-    }
-
-    public boolean isDisconnectRequested()
-    {
-        return _disconnectRequested;
-    }
-
-    public void setDisconnectRequested()
-    {
-        _disconnectRequested = true;
-    }
-
-    public boolean isPendingDisconnect()
-    {
-        return _pendingDisconnect;
-    }
-
-    public void setPendingDisconnect()
-    {
-        _pendingDisconnect = true;
-    }
-
-    public SchedulingKey getTimeoutKey()
-    {
-        return _timeoutKey;
-    }
-
-    public short getLastPacketReceived()
-    {
-        return _lastPacketReceived;
-    }
-
-    public void setLastPacketReceived( final short lastPacketReceived )
-    {
-        _lastPacketReceived = lastPacketReceived;
-    }
-
-    public boolean hasReceivedData()
-    {
-        return _hasReceivedData;
-    }
-
-    /**
-     * Return the sequence of the last packet processed.
-     *
-     * @return the sequence of the last packet processed.
-     */
-    public short getLastPacketProcessed()
-    {
-        return _lastPacketProcessed;
-    }
-
-    /**
-     * Set the sequence of the last packet processed.
-     *
-     * @param lastPacketProcessed the sequence of the last packet processed.
-     */
-    public void setLastPacketProcessed( final short lastPacketProcessed )
-    {
-        if( lastPacketProcessed != _lastPacketProcessed )
-        {
-            _hasReceivedData = true;
-            _needsToSendAck = true;
-            _lastPacketProcessed = lastPacketProcessed;
-        }
-    }
-
-    /**
-     * Return true if session is clientside.
-     *
-     * @return true if session is clientside.
-     */
-    public boolean isClient()
-    {
-        return _client;
-    }
-
-    /**
-     * Return the session ID.
-     *
-     * @return the session ID.
-     */
-    public long getSessionID()
-    {
-        return _sessionID;
-    }
-
-    /**
-     * Set the sessionID.
-     *
-     * @param sessionID the sessionID
-     */
-    public void setSessionID( final long sessionID )
-    {
-        _sessionID = sessionID;
-    }
-
-    /**
-     * Return the authID.
-     *
-     * @return the authID.
-     */
-    public short getAuthID()
-    {
-        return _authID;
-    }
-
-    /**
-     * Set the AuthID.
-     *
-     * @param authID the AuthID.
-     */
-    public void setAuthID( final short authID )
-    {
-        _authID = authID;
-    }
-
-    /**
-     * Return the the status.
-     *
-     * @return the the status.
-     */
-    public int getStatus()
-    {
-        return _status;
-    }
-
-    /**
-     * Set the sessions status.
-     *
-     * @param status the status.
-     */
-    public synchronized void setStatus( final int status )
-    {
-        _status = status;
-        _timeOfLastStatusChange = System.currentTimeMillis();
-        cancelTimeout();
-        notifyAll();
-    }
-
-    /**
-     * Return the time at which the status of session last changed.
-     *
-     * @return the time at which the status of session last changed.
-     */
-    public long getTimeOfLastStatusChange()
-    {
-        return _timeOfLastStatusChange;
-    }
-
-    /**
-     * Get list of messages that have been transmitted on session but are
-     * waiting to be acked.
-     *
-     * @return the list of messages
-     */
-    public PacketQueue getTransmitQueue()
-    {
-        return _txQueue;
-    }
-
-    public PacketQueue getReceiveQueue()
-    {
-        return _rxQueue;
-    }
-
-    public short getLastPacketTransmitted()
-    {
-        return _lastPacketTransmitted;
-    }
-
-    public void acked()
-    {
-        _needsToSendAck = false;
-    }
-
-    public boolean needsToSendAck()
-    {
-        return _needsToSendAck;
-    }
-
-    public boolean sendPacket( final ByteBuffer buffer )
-    {
-        if( isInShutdown() )
-        {
-            return false;
-        }
-        else
-        {
-            final Packet packet = new Packet( ++_lastPacketTransmitted,
-                                              0,
-                                              buffer );
-            _hasTransmittedData = true;
-            final PacketWriteRequestEvent ev = new PacketWriteRequestEvent(
-                this, packet );
-            getTransmitQueue().addPacket( packet );
-            addEvent( ev );
-            return true;
-        }
-    }
-
-    public boolean isInShutdown()
-    {
-        return isPendingDisconnect() || isDisconnectRequested();
-    }
-
-    public ChannelTransport getTransport()
-    {
-        return _transport;
-    }
-
-    public synchronized void setTransport( final ChannelTransport transport )
-    {
-        if( null != _transport )
-        {
-            _transport.setUserData( null );
-            _transport.getInputStream().close();
-            _transport.getOutputStream().close();
-
-            _lastTxTime = _transport.getLastTxTime();
-            _lastRxTime = _transport.getLastRxTime();
-        }
-        _needsToSendAck = true;
-        _transport = transport;
-        if( null != _transport )
-        {
-            _connections++;
-            setStatus( Session.STATUS_CONNECTED );
-            _transport.setUserData( this );
-        }
-        else
-        {
-            if( isConnecting() )
-            {
-                setConnecting( false );
-            }
-            if( Session.STATUS_DISCONNECTED != _status )
-            {
-                setStatus( Session.STATUS_NOT_CONNECTED );
-            }
-        }
-    }
-
-    public int getConnections()
-    {
-        return _connections;
-    }
-
-    public Object getUserData()
-    {
-        return _userData;
-    }
-
-    public void setUserData( final Object userData )
-    {
-        _userData = userData;
-    }
-
-    public boolean isConnecting()
-    {
-        return _connecting;
-    }
-
-    public void setConnecting( final boolean connecting )
-    {
-        _connecting = connecting;
-        synchronized( this )
-        {
-            notifyAll();
-        }
-    }
-
-    public String toString()
-    {
-        final long sessionID = getSessionID();
-        final int transportID = ( _transport != null ) ? _transport.getId() : -1;
-        return "Session[SessionID=" + sessionID + ", TransportID=" + transportID + ", UserData=" + getUserData() + ", IsClient=" + isClient() + ", Status=" + getStatus() + "]";
-    }
-}
</pre></div>
<hr /><a name="file127" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/java/org/codehaus/spice/packet/session<br /></span>
<div class="fileheader" id="removed"><big><b>SessionManager.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SessionManager.java
--- SessionManager.java	22 Mar 2004 01:17:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,54 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.packet.session;
-
-import java.util.Collection;
-
-/**
- * Responsible for managing sessions for messaging framework.
- *
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:50 $
- */
-public interface SessionManager
-{
-    /**
-     * Find the session with the specified id.
-     *
-     * @param id the session ID
-     * @return the4 session or null if no such session
-     */
-    Session findSession( long id );
-
-    /**
-     * return the number of sessions.
-     *
-     * @return the number of sessions
-     */
-    int getSessionCount();
-
-    /**
-     * Create a new session.
-     *
-     * @return the new session
-     */
-    Session newSession();
-
-    /**
-     * Delete specified session. If session is not managed by this manager then
-     * no action is taken.
-     *
-     * @param session the session
-     */
-    void deleteSession( Session session );
-
-    /**
-     * @return a read only set of sessions managed
-     */
-    Collection getSessions();
-}
</pre></div>
<hr /><a name="file128" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/test/org/codehaus/spice/packet<br /></span>
<div class="fileheader" id="removed"><big><b>EchoHandler.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N EchoHandler.java
--- EchoHandler.java	17 May 2004 06:25:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet;
-
-import org.codehaus.spice.event.AbstractEventHandler;
-import org.codehaus.spice.event.EventHandler;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/05/17 06:25:47 $
- */
-class EchoHandler
-    extends AbstractEventHandler
-{
-    private final EventHandler _eventHandler;
-    private final String _header;
-
-    EchoHandler( final String header, final EventHandler eventHandler )
-    {
-        _header = header;
-        _eventHandler = eventHandler;
-    }
-
-    public void handleEvent( final Object event )
-    {
-        if( null != _header )
-        {
-            System.out.println( _header + ": " + event );
-        }
-        _eventHandler.handleEvent( event );
-    }
-}
</pre></div>
<hr /><a name="file129" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/test/org/codehaus/spice/packet<br /></span>
<div class="fileheader" id="removed"><big><b>NetRuntime.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N NetRuntime.java
--- NetRuntime.java	17 May 2004 06:25:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,125 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet;
-
-import java.io.IOException;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.event.EventSource;
-import org.codehaus.spice.event.impl.BlockingEventSource;
-import org.codehaus.spice.event.impl.DefaultEventQueue;
-import org.codehaus.spice.event.impl.EventPump;
-import org.codehaus.spice.event.impl.collections.BoundedFifoBuffer;
-import org.codehaus.spice.event.impl.collections.UnboundedFifoBuffer;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.buffers.DefaultBufferManager;
-import org.codehaus.spice.netevent.handlers.ChannelEventHandler;
-import org.codehaus.spice.netevent.source.SelectableChannelEventSource;
-import org.codehaus.spice.packet.handlers.PacketIOEventHandler;
-import org.codehaus.spice.packet.session.DefaultSessionManager;
-import org.codehaus.spice.packet.session.SessionManager;
-import org.codehaus.spice.timeevent.source.TimeEventSource;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/05/17 06:25:47 $
- */
-class NetRuntime
-{
-    private final SelectableChannelEventSource _source;
-
-    /**
-     * Manager for all the data chunks used in system.
-     */
-    private final BufferManager _bufferManager;
-
-    /**
-     * Session manager associated with runtime.
-     */
-    private final SessionManager _sessionManager;
-
-    /**
-     * EventSource use to register sockets and so forth.
-     */
-    private final EventSink _sessionSink;
-
-    private final EventPump[] _pumps;
-
-    NetRuntime( final SelectableChannelEventSource source,
-                final BufferManager bufferManager,
-                final SessionManager sessionManager,
-                final EventSink sessionSink,
-                final EventPump[] pumps )
-    {
-        _source = source;
-        _bufferManager = bufferManager;
-        _sessionManager = sessionManager;
-        _sessionSink = sessionSink;
-        _pumps = pumps;
-    }
-
-    SelectableChannelEventSource getSource()
-    {
-        return _source;
-    }
-
-    BufferManager getBufferManager()
-    {
-        return _bufferManager;
-    }
-
-    SessionManager getSessionManager()
-    {
-        return _sessionManager;
-    }
-
-    EventSink getSessionSink()
-    {
-        return _sessionSink;
-    }
-
-    EventPump[] getPumps()
-    {
-        return _pumps;
-    }
-
-    static NetRuntime createRuntime( final String type )
-        throws IOException
-    {
-        final DefaultEventQueue queue1 = new DefaultEventQueue( new BoundedFifoBuffer( 15 ) );
-        final DefaultEventQueue queue2 = new DefaultEventQueue( new UnboundedFifoBuffer( 15 ) );
-        final DefaultEventQueue queue3 = new DefaultEventQueue( new UnboundedFifoBuffer( 15 ) );
-        final DefaultEventQueue queue4 = new DefaultEventQueue( new UnboundedFifoBuffer( 15 ) );
-        final DefaultEventQueue queue5 = new DefaultEventQueue( new UnboundedFifoBuffer( 15 ) );
-
-        final SelectableChannelEventSource source1 = new SelectableChannelEventSource( queue1 );
-        source1.setSelectTimeout( 0 );
-        final TimeEventSource source2 = new TimeEventSource( queue4 );
-        final TimeEventSource source3 = new TimeEventSource( queue5 );
-
-        final DefaultBufferManager bufferManager = new DefaultBufferManager();
-        final EventHandler handler1 = new EchoHandler( "CHAN " + type, new ChannelEventHandler(
-            source1, queue1, queue2, bufferManager ) );
-
-        final DefaultSessionManager sessionManager = new DefaultSessionManager();
-        final EventHandler handler2 = new EchoHandler( "PACK " + type, new PacketIOEventHandler(
-            source2, source1, queue2, queue3, bufferManager, sessionManager ) );
-
-        final EventHandler handler3 = new EchoHandler( "TEST " + type, new TestEventHandler(
-            queue1, bufferManager, "TEST " + type ) );
-
-        final EventPump pump1 = newPump( "CHAN " + type, source1, handler1 );
-        final EventPump pump2 = newPump( "PACK " + type, queue2, handler2 );
-        final EventPump pump3 = newPump( "TEST " + type, queue3, handler3 );
-        final EventPump pump4 = newPump( "PACK TIME " + type, source2, handler2 );
-        final EventPump pump5 = newPump( "TEST TIME " + type, source3, handler3 );
-
-        final EventPump[] pumps = new EventPump[]{pump1, pump2, pump3, pump4, pump5};
-        return new NetRuntime( source1, bufferManager, sessionManager, queue2, pumps );
-    }
-
-    private static EventPump newPump( final String name,
-                                      final EventSource source,
-                                      final EventHandler handler )
-    {
-        return new EventPump( name, new BlockingEventSource( source ), handler );
-    }
-}
</pre></div>
<hr /><a name="file130" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/test/org/codehaus/spice/packet<br /></span>
<div class="fileheader" id="removed"><big><b>PacketTestCase.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N PacketTestCase.java
--- PacketTestCase.java	22 Mar 2004 01:17:51 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.packet;
-
-import java.nio.ByteBuffer;
-import junit.framework.TestCase;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:51 $
- */
-public class PacketTestCase
-    extends TestCase
-{
-    public void testPacket() throws Exception
-    {
-        final ByteBuffer data = ByteBuffer.allocate( 3 );
-        final Packet packet = new Packet( (short) 2, 3, data );
-        assertEquals( "sequence", 2, packet.getSequence() );
-        assertEquals( "flags", 3, packet.getFlags() );
-        assertEquals( "data", data, packet.getData() );
-    }
-
-    public void testNullDataPassedToCtor() throws Exception
-    {
-        try
-        {
-            new Packet( (short) 2, 2, null );
-        }
-        catch( final NullPointerException npe )
-        {
-            assertEquals( "npe.getMessage()", "data", npe.getMessage() );
-            return;
-        }
-        fail( "Expected to fail due to null Data passed into Ctor" );
-    }
-}
</pre></div>
<hr /><a name="file131" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/test/org/codehaus/spice/packet<br /></span>
<div class="fileheader" id="removed"><big><b>TestEventHandler.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N TestEventHandler.java
--- TestEventHandler.java	22 Mar 2004 01:17:51 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,207 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet;
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Random;
-import java.util.Set;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.event.EventSink;
-import org.codehaus.spice.netevent.buffers.BufferManager;
-import org.codehaus.spice.netevent.events.CloseChannelRequestEvent;
-import org.codehaus.spice.netevent.handlers.AbstractDirectedHandler;
-import org.codehaus.spice.packet.events.AbstractSessionEvent;
-import org.codehaus.spice.packet.events.DataPacketReadyEvent;
-import org.codehaus.spice.packet.events.SessionActiveEvent;
-import org.codehaus.spice.packet.events.SessionConnectEvent;
-import org.codehaus.spice.packet.events.SessionDisconnectEvent;
-import org.codehaus.spice.packet.events.SessionInactiveEvent;
-import org.codehaus.spice.packet.session.Session;
-import org.codehaus.spice.timeevent.events.TimeEvent;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:51 $
- */
-class TestEventHandler
-    extends AbstractDirectedHandler
-{
-    private static final byte[] DATA = new byte[]{'B', 'E', 'E', 'R'};
-
-    private static final Random RANDOM = new Random();
-
-    private final BufferManager _bufferManager;
-    private final String _header;
-    private final Set _serverSessions = new HashSet();
-    private final Set _clientSessions = new HashSet();
-
-    public TestEventHandler( final EventSink sink,
-                             final BufferManager bufferManager,
-                             final String header )
-    {
-        super( sink );
-        _bufferManager = bufferManager;
-        _header = header;
-    }
-
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        if( event instanceof TimeEvent )
-        {
-            final TimeEvent e = (TimeEvent) event;
-            final Session session = (Session) e.getKey().getUserData();
-            performLogic( session );
-            return;
-        }
-
-        final AbstractSessionEvent se = (AbstractSessionEvent) event;
-        final Session session = se.getSession();
-
-        if( event instanceof DataPacketReadyEvent )
-        {
-            final DataPacketReadyEvent e = (DataPacketReadyEvent) event;
-            final Packet packet = e.getPacket();
-            output( session, "Received packet " + packet.getSequence() );
-            performLogic( session );
-        }
-        else if( event instanceof SessionActiveEvent )
-        {
-            final String text = "Session Active.";
-            output( session, text );
-            performLogic( session );
-        }
-        else if( event instanceof SessionInactiveEvent )
-        {
-            final String text = "Session Inactive." + " status=" + session.getStatus() + " isConnecting=" + session.isConnecting() + " connections=" + session.getConnections();
-            output( session, text );
-        }
-        else if( event instanceof SessionConnectEvent )
-        {
-            if( !session.isClient() )
-            {
-                _serverSessions.add( session );
-            }
-            else
-            {
-                _clientSessions.add( session );
-            }
-            session.setUserData( new TestSessionData( session ) );
-
-            final String text = "Session Started.";
-            output( session, text );
-        }
-        else if( event instanceof SessionDisconnectEvent )
-        {
-            final Set sessions;
-            if( !session.isClient() )
-            {
-                sessions = _serverSessions;
-            }
-            else
-            {
-                sessions = _clientSessions;
-            }
-            sessions.remove( session );
-            final String text = "Session Completed. " + sessions.size() + " sessions remaining. " +
-                                "Sessions=" + toIDs( sessions );
-            output( session, text );
-        }
-    }
-
-    private Object toIDs( final Set sessions )
-    {
-        final ArrayList result = new ArrayList();
-
-        final Iterator iterator = sessions.iterator();
-        while( iterator.hasNext() )
-        {
-            final Session session = (Session) iterator.next();
-            result.add( new Long( session.getSessionID() ) );
-        }
-
-        Collections.sort( result );
-
-        return result;
-    }
-
-    private void performLogic( final Session session )
-    {
-        if( Session.STATUS_ESTABLISHED != session.getStatus() )
-        {
-            return;
-        }
-        final int lastPacketProcessed = session.getLastPacketProcessed();
-        final short lastPacketTransmitted = session.getLastPacketTransmitted();
-        final long dropOn = session.getSessionID() % TestServer.MESSAGE_COUNT;
-        if( lastPacketProcessed == TestServer.MESSAGE_COUNT &amp;&amp;
-            lastPacketTransmitted == TestServer.MESSAGE_COUNT )
-        {
-            if( !session.isInShutdown() )
-            {
-                output( session, "----------------- SHUTDOWN SESSION" );
-                session.requestShutdown();
-            }
-        }
-        else if( null != session.getTransport() &amp;&amp;
-                 lastPacketProcessed == dropOn &amp;&amp;
-                 1 == session.getConnections() &amp;&amp; session.isClient() )
-        {
-            output( session, "----------------- CLOSING CONNECTION" );
-            final CloseChannelRequestEvent cc = new CloseChannelRequestEvent(
-                session.getTransport() );
-            getSink().addEvent( cc );
-        }
-        else
-        {
-            transmitData( session );
-        }
-    }
-
-    private void transmitData( final Session session )
-    {
-        if( session.getLastPacketTransmitted() == TestServer.MESSAGE_COUNT )
-        {
-            return;
-        }
-        final int transmitCount = Math.abs(
-            RANDOM.nextInt() % 16 * TestServer.TX_SIZE_FACTOR );
-        final ByteBuffer buffer = _bufferManager.aquireBuffer( transmitCount );
-
-        for( int i = 0; i &lt; transmitCount; i++ )
-        {
-            final byte ch = DATA[ i % DATA.length ];
-            buffer.put( ch );
-        }
-        buffer.flip();
-
-        output( session, "----------------- SEND DATA" );
-        if( !session.sendPacket( buffer ) )
-        {
-            final String text = "----------------- FAILED TO SEND DATA. " +
-                                " pendingDisconnect=" +
-                                session.isPendingDisconnect() +
-                                " disconnectRequested=" + session.isDisconnectRequested();
-            output( session, text );
-            _bufferManager.releaseBuffer( buffer );
-        }
-    }
-
-    private String describeSession( final Session session )
-    {
-        return "Session[SessionID=" + session.getSessionID() + ", rx=" + session.getLastPacketProcessed() + ", tx=" + session.getLastPacketTransmitted() + ", rxSet=" + session.getReceiveQueue().getSequences() +
-               ", txSet=" + session.getTransmitQueue().getSequences() + "]";
-    }
-
-    private void output( final Session session, final String text )
-    {
-        final String desc = describeSession( session );
-        final String message = _header + " (" + session.getSessionID() + "): " + text +
-                               " " + desc;
-        System.out.println( message );
-    }
-}
</pre></div>
<hr /><a name="file132" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/test/org/codehaus/spice/packet<br /></span>
<div class="fileheader" id="removed"><big><b>TestServer.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N TestServer.java
--- TestServer.java	26 Mar 2004 02:23:01 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,152 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet;
-
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.ServerSocketChannel;
-import org.codehaus.spice.event.impl.EventPump;
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/03/26 02:23:01 $
- */
-public class TestServer
-{
-   private static boolean c_done;
-
-   private static final int SESSION_COUNT = 5; //153;
-   static final int TX_SIZE_FACTOR = 1024 * 2;
-   static final int MESSAGE_COUNT = 5;
-
-   public static void main( final String[] args )
-      throws Exception
-   {
-      final NetRuntime serverRuntime = NetRuntime.createRuntime( "SV" );
-      final NetRuntime clientRuntime = NetRuntime.createRuntime( "CL" );
-
-      final ServerSocketChannel channel = ServerSocketChannel.open();
-      serverRuntime.getSource().
-         registerChannel( channel, SelectionKey.OP_ACCEPT, null );
-      channel.socket().bind( new InetSocketAddress( 1980 ) );
-
-      startPumps( serverRuntime.getPumps() );
-      startPumps( clientRuntime.getPumps() );
-
-      final InetSocketAddress address =
-         new InetSocketAddress( InetAddress.getLocalHost(), 1980 );
-
-      final Session[] sessions = initSessions( address, clientRuntime );
-
-      boolean started = false;
-      while( !c_done )
-      {
-         for( int i = 0; i &lt; sessions.length; i++ )
-         {
-            final Session session = sessions[ i ];
-            final long change = session.getLastCommTime() + 1000;
-            if( Session.STATUS_NOT_CONNECTED == session.getStatus() &amp;&amp;
-                change &lt; System.currentTimeMillis() &amp;&amp;
-                !session.isConnecting() )
-            {
-               session.startConnection();
-
-               final String sessionDesc =
-                  "  [" +
-                  serverRuntime.getSessionManager().getSessionCount() + ":" +
-                  clientRuntime.getSessionManager().getSessionCount() + "]";
-
-               if( session.getConnections() &gt; 0 &amp;&amp;
-                   -1 != session.getSessionID() )
-               {
-                  final String message = "Re-establish SessionID=" +
-                                         session.getSessionID() +
-                                         sessionDesc;
-                  System.out.println( message );
-               }
-               else
-               {
-                  final String message =
-                     "Establish conenction to Server." + sessionDesc;
-                  System.out.println( message );
-               }
-            }
-         }
-
-         if( serverRuntime.getSessionManager().getSessionCount() &gt; 0 )
-         {
-            started = true;
-         }
-         if( started &amp;&amp;
-             0 == serverRuntime.getSessionManager().getSessionCount() &amp;&amp;
-             0 == clientRuntime.getSessionManager().getSessionCount() )
-         {
-            c_done = true;
-         }
-         try
-         {
-            Thread.sleep( 5 );
-         }
-         catch( InterruptedException e )
-         {
-            e.printStackTrace();
-         }
-      }
-   }
-
-   private static Session[] initSessions( final InetSocketAddress address,
-                                          final NetRuntime clientRuntime )
-   {
-      final Session[] sessions = new Session[ SESSION_COUNT ];
-      for( int i = 0; i &lt; sessions.length; i++ )
-      {
-         sessions[ i ] = new Session( address,
-                                      clientRuntime.getSessionSink() );
-      }
-      return sessions;
-   }
-
-   private static void startPumps( final EventPump[] pumps )
-   {
-      for( int i = 0; i &lt; pumps.length; i++ )
-      {
-         final EventPump pump = pumps[ i ];
-         startThread( pump );
-      }
-   }
-
-   private static void startThread( final EventPump pump )
-   {
-      final Runnable runnable = new Runnable()
-      {
-         public void run()
-         {
-            doPump( pump );
-         }
-      };
-      final Thread thread = new Thread( runnable );
-      thread.setName( pump.getName() );
-      thread.start();
-
-      thread.setPriority( Thread.NORM_PRIORITY - 1 );
-   }
-
-   private static void doPump( final EventPump pump )
-   {
-      try
-      {
-         System.out.println( "Entering Thread " +
-                             Thread.currentThread().getName() );
-         while( !c_done )
-         {
-            pump.refresh();
-         }
-         System.out.println( "Exiting Thread " +
-                             Thread.currentThread().getName() );
-      }
-      catch( final Throwable e )
-      {
-         e.printStackTrace();
-      }
-   }
-}
</pre></div>
<hr /><a name="file133" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/src/test/org/codehaus/spice/packet<br /></span>
<div class="fileheader" id="removed"><big><b>TestSessionData.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N TestSessionData.java
--- TestSessionData.java	22 Mar 2004 01:17:51 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.packet;
-
-import org.codehaus.spice.packet.session.Session;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/03/22 01:17:51 $
- */
-class TestSessionData
-{
-    private final Session _session;
-
-    public TestSessionData( final Session session )
-    {
-        _session = session;
-    }
-
-    public String toString()
-    {
-        return describeSession( _session );
-    }
-
-    private static String describeSession( final Session session )
-    {
-        return "Session[SessionID=" + session.getSessionID() + ", rx=" + session.getLastPacketProcessed() + ", tx=" + session.getLastPacketTransmitted() + ", rxSet=" + session.getReceiveQueue().getSequences() +
-               ", txSet=" + session.getTransmitQueue().getSequences() + "]";
-    }
-
-}
</pre></div>
<hr /><a name="file134" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/xdocs<br /></span>
<div class="fileheader" id="removed"><big><b>component.menu</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N component.menu
--- component.menu	25 Apr 2004 01:15:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
</small></pre><pre class="diff" id="removed">-
-    &lt;menu name="Component"&gt;
-      &lt;item name="Home"           href="/index.html"/&gt;
-    &lt;/menu&gt;
</pre></div>
<hr /><a name="file135" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/packet/xdocs<br /></span>
<div class="fileheader" id="removed"><big><b>index.xml</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N index.xml
--- index.xml	25 Apr 2004 01:15:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
</small></pre><pre class="diff" id="removed">-&lt;?xml version="1.0"?&gt;
-&lt;document&gt;
-
-  &lt;properties&gt;
-    	&lt;title&gt;Packet&lt;/title&gt;
-  &lt;/properties&gt;
-
-  &lt;body&gt;
-	  &lt;section name="Introduction"&gt;
- 	 &lt;/section&gt;
-  &lt;/body&gt;
-
-&lt;/document&gt;
</pre></div>
<hr /><a name="file136" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent<br /></span>
<div class="fileheader" id="removed"><big><b>.cvsignore</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N .cvsignore
--- .cvsignore	22 Jan 2004 04:16:50 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
</small></pre><pre class="diff" id="removed">-dist
-target
-build.properties
-*.log
-*.el
-*.ipr
-*.iws
</pre></div>
<hr /><a name="file137" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent<br /></span>
<div class="fileheader" id="removed"><big><b>project.properties</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N project.properties
--- project.properties	25 Apr 2004 00:44:44 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,69 +0,0 @@
</small></pre><pre class="diff" id="removed">-maven.remote.group=spice
-maven.repo.remote=http://www.ibiblio.com/maven,http://dist.codehaus.org
-
-maven.checkstyle.properties = ${basedir}/../../tools/checkstyle/checkstyle.xml
-maven.checkstyle.license.exists=true
-
-maven.javadoc.links = \
-    http://avalon.apache.org/api/, \
-    http://dna.jcontainer.org/apidocs/, \
-    http://java.sun.com/j2se/1.3/docs/api/
-
-maven.junit.fork=true
-maven.junit.dir=${basedir}/target/test-classes
-
-maven.license.licenseFile=${basedir}/../../LICENSE.txt
-maven.linkcheck.enable=true
-
-maven.xdoc.poweredby.image=
-#maven.xdoc.jsl=target/site.jsl
-
-spice.color1.bright=#FFFFFF
-spice.color1.light=#FFFFCC
-spice.color1.main=#CCCC99
-spice.color1.shaded=#999966
-spice.color1.dark=#666633
-spice.color1.darkest=#333300
-
-maven.ui.body.background=${spice.color1.bright}
-maven.ui.body.foreground=${spice.color1.darkest}
-maven.ui.section.background=${spice.color1.shaded}
-maven.ui.section.foreground=${spice.color1.light}
-maven.ui.subsection.background=${spice.color1.main}
-maven.ui.subsection.foreground=${spice.color1.light}
-maven.ui.table.header.background=${spice.color1.shaded}
-maven.ui.table.header.foreground=${spice.color1.light}
-
-maven.ui.table.row.odd.background=${spice.color1.light}
-maven.ui.table.row.odd.foreground=${spice.color1.dark}
-maven.ui.table.row.even.background=${spice.color1.light}
-maven.ui.table.row.even.foreground=${spice.color1.dark}
-
-maven.ui.banner.background=${spice.color1.bright}
-maven.ui.banner.foreground=${spice.color1.darkest}
-maven.ui.banner.border.top=${spice.color1.bright}
-maven.ui.banner.border.bottom=${spice.color1.shaded}
-
-maven.ui.source.background=${spice.color1.bright}
-maven.ui.source.foreground=${spice.color1.darkest}
-maven.ui.source.border.top=${spice.color1.shaded}
-maven.ui.source.border.bottom=${spice.color1.shaded}
-maven.ui.source.border.right=${spice.color1.shaded}
-maven.ui.source.border.left=${spice.color1.shaded}
-
-maven.ui.navcol.background=${spice.color1.light}
-maven.ui.navcol.background.ns4=${spice.color1.light}
-maven.ui.navcol.foreground=${spice.color1.dark}
-maven.ui.navcol.foreground.ns4=${spice.color1.dark}
-maven.ui.navcol.border.top=${spice.color1.light}
-maven.ui.navcol.border.right=${spice.color1.main}
-maven.ui.navcol.border.bottom=${spice.color1.main}
-
-maven.ui.breadcrumbs.background=${spice.color1.main}
-maven.ui.breadcrumbs.foreground=${spice.color1.dark}
-maven.ui.breadcrumbs.border.top=${spice.color1.light}
-maven.ui.breadcrumbs.border.bottom=${spice.color1.shaded}
-
-maven.ui.href.link=${spice.color1.dark}
-maven.ui.href.link.active=${spice.color1.darkest}
-maven.ui.href.link.selfref=${spice.color1.dark}
</pre></div>
<hr /><a name="file138" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent<br /></span>
<div class="fileheader" id="removed"><big><b>project.xml</b></big> <small id="info">removed after 1.5</small></div>
<pre class="diff"><small id="info">diff -N project.xml
--- project.xml	17 May 2004 03:54:47 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
</small></pre><pre class="diff" id="removed">-&lt;?xml version="1.0"?&gt;
-&lt;project&gt;
-    &lt;extend&gt;${basedir}/../../project.xml&lt;/extend&gt;
-    &lt;name&gt;Spice TimeEvent&lt;/name&gt;
-    &lt;id&gt;spice-timeevent&lt;/id&gt;
-    &lt;currentVersion&gt;1.1-dev&lt;/currentVersion&gt;
-    &lt;package&gt;org.codehaus.spice.timeevent&lt;/package&gt;
-    &lt;inceptionYear&gt;2003&lt;/inceptionYear&gt;
-
-    &lt;shortDescription&gt;Time Event Toolkit&lt;/shortDescription&gt;
-
-    &lt;dependencies&gt;
-        &lt;dependency&gt;
-            &lt;groupId&gt;spice&lt;/groupId&gt;
-            &lt;artifactId&gt;spice-event&lt;/artifactId&gt;
-            &lt;version&gt;1.1-dev&lt;/version&gt;
-        &lt;/dependency&gt;
-        &lt;dependency&gt;
-            &lt;groupId&gt;jmock&lt;/groupId&gt;
-            &lt;artifactId&gt;jmock&lt;/artifactId&gt;
-            &lt;version&gt;20031129.200437&lt;/version&gt;
-        &lt;/dependency&gt;
-    &lt;/dependencies&gt;
-
-    &lt;developers&gt;
-        &lt;developer&gt;
-            &lt;name&gt;Peter Donald&lt;/name&gt;
-            &lt;id&gt;pdonald&lt;/id&gt;
-            &lt;roles&gt;
-                &lt;role&gt;Developer&lt;/role&gt;
-            &lt;/roles&gt;
-        &lt;/developer&gt;
-    &lt;/developers&gt;
-
-&lt;/project&gt;
</pre></div>
<hr /><a name="file139" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent/src/java/org/codehaus/spice/timeevent/events<br /></span>
<div class="fileheader" id="removed"><big><b>TimeEvent.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N TimeEvent.java
--- TimeEvent.java	22 Jan 2004 03:32:52 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,54 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-package org.codehaus.spice.timeevent.events;
-
-import org.codehaus.spice.event.AbstractEvent;
-import org.codehaus.spice.timeevent.source.SchedulingKey;
-
-/**
- * An Event related to time trigger firing.
- * 
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/01/22 03:32:52 $
- */
-public class TimeEvent
-    extends AbstractEvent
-{
-    /**
-     * The SchedulingKey.
-     */
-    private final SchedulingKey _key;
-
-    /**
-     * Crete event.
-     *
-     * @param key the SchedulingKey
-     */
-    public TimeEvent( final SchedulingKey key )
-    {
-        _key = key;
-    }
-
-    /**
-     * Return the SchedulingKey.
-     *
-     * @return the SchedulingKey.
-     */
-    public SchedulingKey getKey()
-    {
-        return _key;
-    }
-
-    /**
-     * @see AbstractEvent#getEventDescription()
-     */
-    protected String getEventDescription()
-    {
-        return String.valueOf( getKey().getUserData() );
-    }
-}
</pre></div>
<hr /><a name="file140" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent/src/java/org/codehaus/spice/timeevent/source<br /></span>
<div class="fileheader" id="removed"><big><b>BinaryHeap.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N BinaryHeap.java
--- BinaryHeap.java	21 Mar 2004 23:32:36 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,221 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.timeevent.source;
-
-import java.util.Comparator;
-import java.util.NoSuchElementException;
-
-/**
- * The BinaryHeap class is an implementation of a priority queue.
- */
-public final class BinaryHeap
-{
-    /**
-     * Comparator used to instantiate a min heap - assumes contents implement the Comparable interface.
-     */
-    public static final Comparator MIN_COMPARATOR = new MinComparator();
-
-    /**
-     * Comparator used to instantiate a max heap - assumes contents implement the Comparable interface.
-     */
-    public static final Comparator MAX_COMPARATOR = new MaxComparator();
-
-    private int m_size;
-    private Object[] m_elements;
-    private Comparator m_comparator;
-
-    /**
-     * Instantiates a new binary heap with the given initial capacity and ordered using the given Comparator.
-     *
-     * @param capacity the size of the heap
-     * @param comparator to order the contents of the heap
-     */
-    public BinaryHeap( final int capacity, final Comparator comparator )
-    {
-        //+1 as 0 is noop
-        m_elements = new Object[ capacity + 1 ];
-        m_comparator = comparator;
-    }
-
-    /**
-     * Clear all elements from queue.
-     */
-    public void clear()
-    {
-        m_size = 0;
-    }
-
-    /**
-     * Test if queue is empty.
-     *
-     * @return true if queue is empty else false.
-     */
-    public boolean isEmpty()
-    {
-        return ( 0 == m_size );
-    }
-
-    /**
-     * Test if queue is full.
-     *
-     * @return true if queue is full else false.
-     */
-    public boolean isFull()
-    {
-        //+1 as element 0 is noop
-        return ( m_elements.length == m_size + 1 );
-    }
-
-    /**
-     * Returns the number of elements currently on the heap.
-     *
-     * @return the size of the heap.
-     */
-    public int size()
-    {
-        return m_size;
-    }
-
-    /**
-     * Insert an element into queue.
-     *
-     * @param element the element to be inserted
-     */
-    public void insert( final Object element )
-    {
-        if( isFull() )
-        {
-            grow();
-        }
-
-        percolateUpHeap( element );
-    }
-
-    /**
-     * Return element on top of heap but don't remove it.
-     *
-     * @return the element at top of heap
-     * @throws NoSuchElementException if isEmpty() == true
-     */
-    public Object peek() throws NoSuchElementException
-    {
-        if( isEmpty() )
-        {
-            throw new NoSuchElementException();
-        }
-        else
-        {
-            return m_elements[ 1 ];
-        }
-    }
-
-    /**
-     * Return element on top of heap and remove it.
-     *
-     * @return the element at top of heap
-     * @throws NoSuchElementException if isEmpty() == true
-     */
-    public Object pop() throws NoSuchElementException
-    {
-        final Object result = peek();
-        m_elements[ 1 ] = m_elements[ m_size-- ];
-
-        //set the unused element to 'null' so that the garbage collector
-        //can free the object if not used anywhere else.(remove reference)
-        m_elements[ m_size + 1 ] = null;
-
-        if( m_size != 0 )
-        {
-            percolateDownHeap( 1 );
-        }
-
-        return result;
-    }
-
-    /**
-     * Percolate element down heap from top.
-     *
-     * @param index the index of element
-     */
-    void percolateDownHeap( final int index )
-    {
-        final Object element = m_elements[ index ];
-
-        int hole = index;
-        int child = hole &lt;&lt; 1;
-
-        while( child &lt;= m_size )
-        {
-            //if we have a right child and that child can not be percolated
-            //up then move onto other child
-            if( child != m_size &amp;&amp;
-                m_comparator.compare( m_elements[ child + 1 ], m_elements[ child ] ) &lt; 0 )
-            {
-                child++;
-            }
-
-            //if we found resting place of bubble then terminate search
-            if( m_comparator.compare( m_elements[ child ], element ) &gt;= 0 )
-            {
-                break;
-            }
-
-            m_elements[ hole ] = m_elements[ child ];
-            hole = child;
-            child = hole &lt;&lt; 1;
-        }
-
-        m_elements[ hole ] = element;
-    }
-
-    /**
-     * Percolate element up heap from bottom.
-     *
-     * @param element the element
-     */
-    void percolateUpHeap( final Object element )
-    {
-        int hole = ++m_size;
-        int next = hole &gt;&gt; 1;
-
-        m_elements[ hole ] = element;
-
-        while( hole &gt; 1 &amp;&amp;
-               m_comparator.compare( element, m_elements[ next ] ) &lt; 0 )
-        {
-            m_elements[ hole ] = m_elements[ next ];
-            hole = next;
-            next = hole &gt;&gt; 1;
-        }
-
-        m_elements[ hole ] = element;
-    }
-
-    /**
-     * Grows the heap by a factor of 2.
-     */
-    void grow()
-    {
-        final Object[] elements =
-            new Object[ m_elements.length * 2 ];
-        System.arraycopy( m_elements, 0, elements, 0, m_elements.length );
-        m_elements = elements;
-    }
-
-    private static final class MinComparator
-        implements Comparator
-    {
-        public final int compare( final Object lhs, final Object rhs )
-        {
-            return ( (Comparable)lhs ).compareTo( rhs );
-        }
-    }
-
-    private static final class MaxComparator
-        implements Comparator
-    {
-        public final int compare( final Object lhs, final Object rhs )
-        {
-            return ( (Comparable)rhs ).compareTo( lhs );
-        }
-    }
-}
-
</pre></div>
<hr /><a name="file141" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent/src/java/org/codehaus/spice/timeevent/source<br /></span>
<div class="fileheader" id="removed"><big><b>SchedulingKey.java</b></big> <small id="info">removed after 1.4</small></div>
<pre class="diff"><small id="info">diff -N SchedulingKey.java
--- SchedulingKey.java	21 Mar 2004 23:32:36 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,125 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.timeevent.source;
-
-import org.codehaus.spice.timeevent.triggers.TimeTrigger;
-
-/**
- * The key that the trigger is registered under.
- *
- * @author Peter Donald
- * @version $Revision: 1.4 $ $Date: 2004/03/21 23:32:36 $
- */
-public class SchedulingKey
-    implements Comparable
-{
-    /**
-     * The trigger that determines when fireing occurs.
-     */
-    private final TimeTrigger m_trigger;
-
-    /**
-     * the associated userData.
-     */
-    private final Object m_userData;
-
-    /**
-     * Cached time at which trigger will next fire.
-     */
-    private long m_nextTime;
-
-    /**
-     * Flag indicating whether key is valid.
-     */
-    private boolean m_valid;
-
-    /**
-     * Create SchedulingKey.
-     *
-     * @param trigger the TimeTrigger
-     * @param userData the associated userData
-     */
-    public SchedulingKey( final TimeTrigger trigger,
-                          final Object userData )
-    {
-        if( null == trigger )
-        {
-            throw new NullPointerException( "trigger" );
-        }
-        m_trigger = trigger;
-        m_userData = userData;
-    }
-
-    /**
-     * Update expected next time after specified moment.
-     *
-     * @param moment the moment
-     */
-    public void updateNextTime( final long moment )
-    {
-        if( isValid() )
-        {
-            m_nextTime = m_trigger.getTimeAfter( moment );
-        }
-    }
-
-    /**
-     * Return the associated userData.
-     *
-     * @return the associated userData.
-     */
-    public Object getUserData()
-    {
-        return m_userData;
-    }
-
-    /**
-     * Return the next time that the trigger expects to fire.
-     *
-     * @return the next time that the trigger expects to fire.
-     */
-    public long getNextTime()
-    {
-        return m_nextTime;
-    }
-
-    /**
-     * Cancle the time trigger.
-     */
-    public synchronized void cancel()
-    {
-        if( isValid() )
-        {
-            m_valid = false;
-            m_nextTime = -1;
-        }
-    }
-
-    /**
-     * Return true if key is valid.
-     *
-     * @return true if key is valid.
-     */
-    public synchronized boolean isValid()
-    {
-        return m_valid;
-    }
-
-    /**
-     * @see Comparable#compareTo(Object)
-     */
-    public int compareTo( final Object object )
-    {
-        final SchedulingKey other = (SchedulingKey)object;
-        return (int)( m_nextTime - other.m_nextTime );
-    }
-
-    /**
-     * @see Object#toString()
-     */
-    public String toString()
-    {
-        return "SchedulingKey[" +
-               "ID=" + System.identityHashCode( this ) +
-               ", IsValid=" + m_valid + "]" +
-               ", UserData=" + m_userData + "]";
-    }
-}
</pre></div>
<hr /><a name="file142" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent/src/java/org/codehaus/spice/timeevent/source<br /></span>
<div class="fileheader" id="removed"><big><b>TimeEventSource.java</b></big> <small id="info">removed after 1.5</small></div>
<pre class="diff"><small id="info">diff -N TimeEventSource.java
--- TimeEventSource.java	26 Mar 2004 02:23:02 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,122 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.timeevent.source;
-
-import org.codehaus.spice.event.EventJoin;
-import org.codehaus.spice.event.impl.AbstractEventSource;
-import org.codehaus.spice.timeevent.events.TimeEvent;
-import org.codehaus.spice.timeevent.triggers.TimeTrigger;
-
-/**
- * An EventSource that generates events relating to the passage of time.
- *
- * @author Peter Donald
- * @version $Revision: 1.5 $ $Date: 2004/03/26 02:23:02 $
- */
-public class TimeEventSource
-    extends AbstractEventSource
-{
-    /**
-     * The PriorityQueue of SchedulingKey objects.
-     */
-    private final BinaryHeap m_queue = new BinaryHeap( 13, BinaryHeap.MIN_COMPARATOR );
-
-    /**
-     * Create EventSource.
-     *
-     * @param join the join
-     */
-    public TimeEventSource( final EventJoin join )
-    {
-        super( join );
-    }
-
-    /**
-     * Schedule a time trigger to generate events.
-     *
-     * @param trigger the trigger
-     * @param userData the associated user data
-     * @return the SchedulingKey
-     */
-    public SchedulingKey addTrigger( final TimeTrigger trigger,
-                                     final Object userData )
-    {
-        final SchedulingKey key =
-            new SchedulingKey( trigger, userData );
-        key.updateNextTime( System.currentTimeMillis() );
-        schedule( key );
-        return key;
-    }
-
-    /**
-     * Add the specified key into linked list in order.
-     *
-     * @param key the key
-     */
-    protected synchronized void schedule( final SchedulingKey key )
-    {
-        if( -1 != key.getNextTime() )
-        {
-            m_queue.insert( key );
-        }
-        notifyAll();
-    }
-
-    /**
-     * @see AbstractEventSource#refresh()
-     */
-    protected synchronized void refresh()
-    {
-        System.out.println("Refresh time .... in " + Thread.currentThread().getName() );
-        final long now = System.currentTimeMillis();
-        refreshAt( now );
-    }
-
-    /**
-     * Refresh source and generate events for specified time.
-     *
-     * @param now the time
-     */
-    synchronized void refreshAt( final long now )
-    {
-        if( m_queue.isEmpty() )
-        {
-           try
-           {
-              wait( 0 );
-           }
-           catch( final InterruptedException ie )
-           {
-           }
-           return;
-        }
-        else
-        {
-            SchedulingKey key = (SchedulingKey)m_queue.peek();
-            final long diff = key.getNextTime() - now;
-            if( diff &gt; 0 )
-            {
-                try
-                {
-                    Thread.sleep( diff );
-                }
-                catch( final InterruptedException ie )
-                {
-                    //Ignore
-                }
-            }
-            while( key.getNextTime() &lt;= now )
-            {
-                m_queue.pop();
-                key.updateNextTime( now );
-                getJoin().addEvent( new TimeEvent( key ) );
-                if( m_queue.isEmpty() )
-                {
-                    break;
-                }
-                else
-                {
-                    key = (SchedulingKey)m_queue.peek();
-                }
-            }
-        }
-    }
-}
</pre></div>
<hr /><a name="file143" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent/src/java/org/codehaus/spice/timeevent/triggers<br /></span>
<div class="fileheader" id="removed"><big><b>PeriodicTimeTrigger.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N PeriodicTimeTrigger.java
--- PeriodicTimeTrigger.java	22 Jan 2004 03:33:16 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,66 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.timeevent.triggers;
-
-/**
- * Class to schedule trigger firing at a specified time interval. The time
- * trigger may be delayed by specified offset. If the offset is -1 then no
- * offset will will
- */
-public class PeriodicTimeTrigger
-    implements TimeTrigger
-{
-    /**
-     * The offset in milliseconds.
-     */
-    private final long _offset;
-
-    /**
-     * The period at which to fire trigger.
-     */
-    private final long _period;
-
-    /**
-     * The initial trigger time.
-     */
-    private final long _triggerTime;
-
-    /**
-     * Create trigger.
-     *
-     * @param offset the offset. Must be &gt; 0.
-     * @param period the period at which to repeat. -1 indicates fire once.
-     */
-    public PeriodicTimeTrigger( final int offset, final int period )
-    {
-        if( offset &lt; 0 )
-        {
-            throw new IllegalArgumentException( "offset &lt; 0" );
-        }
-        _offset = offset;
-        _period = period;
-        _triggerTime = System.currentTimeMillis() + _offset;
-    }
-
-    /**
-     * @see TimeTrigger#getTimeAfter(long)
-     */
-    public long getTimeAfter( final long moment )
-    {
-        if( moment &lt;= _triggerTime )
-        {
-            return _triggerTime;
-        }
-        else
-        {
-            if( -1 == _period )
-            {
-                return -1;
-            }
-            else
-            {
-                final long over = moment - _triggerTime;
-                final long remainder = over % _period;
-                return moment + (_period - remainder);
-            }
-        }
-    }
-}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file144" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent/src/java/org/codehaus/spice/timeevent/triggers<br /></span>
<div class="fileheader" id="removed"><big><b>TimeTrigger.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N TimeTrigger.java
--- TimeTrigger.java	22 Jan 2004 03:33:16 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.timeevent.triggers;
-
-/**
- * Interface used by all time-based triggers.
- */
-public interface TimeTrigger
-{
-    /**
-     * Return the time after specified moment that trigger will fire. Returning
-     * -1 indicates that the trigger will no longer fire.
-     *
-     * @param moment the specified moment in time
-     * @return the time after moment that trigger will fire.
-     */
-    long getTimeAfter( long moment );
-}
</pre></div>
<hr /><a name="file145" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent/src/test/org/codehaus/spice/timeevent<br /></span>
<div class="fileheader" id="removed"><big><b>TestEventHandler.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N TestEventHandler.java
--- TestEventHandler.java	22 Jan 2004 04:16:49 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.timeevent;
-
-import org.codehaus.spice.event.AbstractEventHandler;
-import org.codehaus.spice.event.EventHandler;
-import org.codehaus.spice.timeevent.events.TimeEvent;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.1 $ $Date: 2004/01/22 04:16:49 $
- */
-class TestEventHandler
-    extends AbstractEventHandler
-{
-    /**
-     * @see EventHandler#handleEvent(Object)
-     */
-    public void handleEvent( final Object event )
-    {
-        final TimeEvent e = (TimeEvent)event;
-        System.out.println( e );
-    }
-}
</pre></div>
<hr /><a name="file146" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent/src/test/org/codehaus/spice/timeevent<br /></span>
<div class="fileheader" id="removed"><big><b>TestServer.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N TestServer.java
--- TestServer.java	23 Feb 2004 04:48:38 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,68 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.codehaus.spice.timeevent;
-
-import org.codehaus.spice.event.impl.DefaultEventQueue;
-import org.codehaus.spice.event.impl.EventPump;
-import org.codehaus.spice.event.impl.collections.UnboundedFifoBuffer;
-import org.codehaus.spice.timeevent.source.TimeEventSource;
-import org.codehaus.spice.timeevent.triggers.PeriodicTimeTrigger;
-
-/**
- * @author Peter Donald
- * @version $Revision: 1.2 $ $Date: 2004/02/23 04:48:38 $
- */
-public class TestServer
-{
-    private static boolean c_done;
-    private static TimeEventSource c_source;
-
-    public static void main( final String[] args )
-        throws Exception
-    {
-        final EventPump pump = createPumps();
-        final Runnable runnable = new Runnable()
-        {
-            public void run()
-            {
-                doPump( pump );
-            }
-        };
-        final Thread thread = new Thread( runnable );
-        thread.start();
-
-        c_source.addTrigger( new PeriodicTimeTrigger( 0, 30 ),
-                             "Meep!" );
-        while( !c_done )
-        {
-            Thread.sleep( 50 );
-        }
-        System.exit( 1 );
-    }
-
-    private static EventPump createPumps()
-    {
-        final DefaultEventQueue queue1 =
-            new DefaultEventQueue( new UnboundedFifoBuffer( 15 ) );
-
-        c_source = new TimeEventSource( queue1 );
-        final TestEventHandler handler = new TestEventHandler();
-
-        return new EventPump( c_source, handler );
-    }
-
-    private static void doPump( final EventPump pump )
-    {
-        for( int i = 0; i &lt; 1000; i++ )
-        {
-            pump.refresh();
-            try
-            {
-                Thread.sleep( 2 );
-            }
-            catch( InterruptedException e )
-            {
-                e.printStackTrace();
-            }
-        }
-        c_done = true;
-    }
-}
</pre></div>
<hr /><a name="file147" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent/xdocs<br /></span>
<div class="fileheader" id="removed"><big><b>component.menu</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N component.menu
--- component.menu	25 Apr 2004 01:15:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
</small></pre><pre class="diff" id="removed">-
-    &lt;menu name="Component"&gt;
-      &lt;item name="Home"           href="/index.html"/&gt;
-    &lt;/menu&gt;
</pre></div>
<hr /><a name="file148" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/timeevent/xdocs<br /></span>
<div class="fileheader" id="removed"><big><b>index.xml</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N index.xml
--- index.xml	25 Apr 2004 01:15:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
</small></pre><pre class="diff" id="removed">-&lt;?xml version="1.0"?&gt;
-&lt;document&gt;
-
-  &lt;properties&gt;
-    	&lt;title&gt;TimeEvent&lt;/title&gt;
-  &lt;/properties&gt;
-
-  &lt;body&gt;
-	  &lt;section name="Introduction"&gt;
- 	 &lt;/section&gt;
-  &lt;/body&gt;
-
-&lt;/document&gt;
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; email">CVSspam</a> 0.2.8</small></center>
</body></html>