activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r357725 [2/4] - in /incubator/activemq/trunk/activeio: ./ src/java/org/activeio/ src/java/org/activeio/adapter/ src/java/org/activeio/command/ src/java/org/activeio/filter/ src/java/org/activeio/journal/ src/java/org/activeio/journal/active...
Date Mon, 19 Dec 2005 16:52:42 GMT
Modified: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteArrayPacket.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteArrayPacket.java?rev=357725&r1=357724&r2=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteArrayPacket.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteArrayPacket.java Mon Dec 19 08:50:54 2005
@@ -21,8 +21,6 @@
 import java.io.OutputStream;
 import java.lang.reflect.Constructor;
 
-import org.activeio.ByteSequence;
-import org.activeio.Packet;
 
 /**
  * Provides a Packet implementation that is directly backed by a <code>byte[]</code>.
@@ -135,7 +133,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#read()
+     * @see org.activeio.packet.Packet#read()
      */
     public int read() {
         if( !(remaining > 0) )
@@ -147,7 +145,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#read(byte[], int, int)
+     * @see org.activeio.packet.Packet#read(byte[], int, int)
      */
     public int read(byte[] data, int offset, int length) {
         if( !(remaining > 0) )
@@ -161,7 +159,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#write(int)
+     * @see org.activeio.packet.Packet#write(int)
      */
     public boolean write(int data) {
         if( !(remaining > 0) )
@@ -173,7 +171,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#write(byte[], int, int)
+     * @see org.activeio.packet.Packet#write(byte[], int, int)
      */
     public int write(byte[] data, int offset, int length) {
         if( !(remaining > 0) )
@@ -191,7 +189,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#sliceAsBytes()
+     * @see org.activeio.packet.Packet#sliceAsBytes()
      */
     public byte[] sliceAsBytes() {
         if( buffer.length == remaining ) {

Modified: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteBufferPacket.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteBufferPacket.java?rev=357725&r1=357724&r2=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteBufferPacket.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteBufferPacket.java Mon Dec 19 08:50:54 2005
@@ -22,8 +22,6 @@
 import java.lang.reflect.Constructor;
 import java.nio.ByteBuffer;
 
-import org.activeio.ByteSequence;
-import org.activeio.Packet;
 
 /**
  * Provides a Packet implementation that is backed by a {@see java.nio.ByteBuffer}
@@ -174,7 +172,7 @@
     
 
     /**
-     * @see org.activeio.Packet#read()
+     * @see org.activeio.packet.Packet#read()
      */
     public int read() {
         if( !buffer.hasRemaining() )
@@ -183,7 +181,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#read(byte[], int, int)
+     * @see org.activeio.packet.Packet#read(byte[], int, int)
      */
     public int read(byte[] data, int offset, int length) {
         if( !hasRemaining() )
@@ -195,7 +193,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#write(int)
+     * @see org.activeio.packet.Packet#write(int)
      */
     public boolean write(int data) {
         if( !buffer.hasRemaining() )
@@ -205,7 +203,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#write(byte[], int, int)
+     * @see org.activeio.packet.Packet#write(byte[], int, int)
      */
     public int write(byte[] data, int offset, int length) {
         if( !hasRemaining() )
@@ -217,7 +215,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#asByteSequence()
+     * @see org.activeio.packet.Packet#asByteSequence()
      */
     public ByteSequence asByteSequence() {
         if( buffer.hasArray() ) {
@@ -229,7 +227,7 @@
     }
     
     /**
-     * @see org.activeio.Packet#sliceAsBytes()
+     * @see org.activeio.packet.Packet#sliceAsBytes()
      */
     public byte[] sliceAsBytes() {
         // TODO Auto-generated method stub

Modified: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteBufferPacketPool.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteBufferPacketPool.java?rev=357725&r1=357724&r2=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteBufferPacketPool.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteBufferPacketPool.java Mon Dec 19 08:50:54 2005
@@ -17,7 +17,6 @@
  **/
 package org.activeio.packet;
 
-import org.activeio.Packet;
 
 import java.nio.ByteBuffer;
 

Modified: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/BytePacket.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/BytePacket.java?rev=357725&r1=357724&r2=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/packet/BytePacket.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/BytePacket.java Mon Dec 19 08:50:54 2005
@@ -21,8 +21,6 @@
 import java.io.OutputStream;
 import java.lang.reflect.Constructor;
 
-import org.activeio.ByteSequence;
-import org.activeio.Packet;
 
 /**
  * Provides a Packet implementation that is directly backed by a <code>byte</code>.
@@ -120,7 +118,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#read()
+     * @see org.activeio.packet.Packet#read()
      */
     public int read() {
         if( !hasRemaining() )
@@ -130,7 +128,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#read(byte[], int, int)
+     * @see org.activeio.packet.Packet#read(byte[], int, int)
      */
     public int read(byte[] data, int offset, int length) {
         if( !hasRemaining() )
@@ -145,7 +143,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#write(int)
+     * @see org.activeio.packet.Packet#write(int)
      */
     public boolean write(int data) {
         if( !hasRemaining() )
@@ -157,7 +155,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#write(byte[], int, int)
+     * @see org.activeio.packet.Packet#write(byte[], int, int)
      */
     public int write(byte[] data, int offset, int length) {
         if( !hasRemaining() )
@@ -176,7 +174,7 @@
     }
 
     /**
-     * @see org.activeio.Packet#sliceAsBytes()
+     * @see org.activeio.packet.Packet#sliceAsBytes()
      */
     public byte[] sliceAsBytes() {
         return null;

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteSequence.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/ByteSequence.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteSequence.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteSequence.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/ByteSequence.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/ByteSequence.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/ByteSequence.java Mon Dec 19 08:50:54 2005
@@ -17,7 +17,7 @@
  * 
  **/
 
-package org.activeio;
+package org.activeio.packet;
 
 public class ByteSequence {
     final byte[] data;

Modified: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/EOSPacket.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/EOSPacket.java?rev=357725&r1=357724&r2=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/packet/EOSPacket.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/EOSPacket.java Mon Dec 19 08:50:54 2005
@@ -20,8 +20,6 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.activeio.ByteSequence;
-import org.activeio.Packet;
 
 /**
  * Provides a Packet implementation that is used to represent the end of a stream.
@@ -93,28 +91,28 @@
     }
 
     /**
-     * @see org.activeio.Packet#read()
+     * @see org.activeio.packet.Packet#read()
      */
     public int read() {
         return -1;
     }
 
     /**
-     * @see org.activeio.Packet#read(byte[], int, int)
+     * @see org.activeio.packet.Packet#read(byte[], int, int)
      */
     public int read(byte[] data, int offset, int length) {
         return -1;
     }
 
     /**
-     * @see org.activeio.Packet#write(int)
+     * @see org.activeio.packet.Packet#write(int)
      */
     public boolean write(int data) {
         return false;
     }
 
     /**
-     * @see org.activeio.Packet#write(byte[], int, int)
+     * @see org.activeio.packet.Packet#write(byte[], int, int)
      */
     public int write(byte[] data, int offset, int length) {
         return -1;

Modified: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/EmptyPacket.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/EmptyPacket.java?rev=357725&r1=357724&r2=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/packet/EmptyPacket.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/EmptyPacket.java Mon Dec 19 08:50:54 2005
@@ -20,8 +20,6 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.activeio.ByteSequence;
-import org.activeio.Packet;
 
 /**
  * Provides a Packet implementation that is directly backed by a <code>byte[0]</code>.
@@ -95,28 +93,28 @@
     }
 
     /**
-     * @see org.activeio.Packet#read()
+     * @see org.activeio.packet.Packet#read()
      */
     public int read() {
         return -1;
     }
 
     /**
-     * @see org.activeio.Packet#read(byte[], int, int)
+     * @see org.activeio.packet.Packet#read(byte[], int, int)
      */
     public int read(byte[] data, int offset, int length) {
         return -1;
     }
 
     /**
-     * @see org.activeio.Packet#write(int)
+     * @see org.activeio.packet.Packet#write(int)
      */
     public boolean write(int data) {
         return false;
     }
 
     /**
-     * @see org.activeio.Packet#write(byte[], int, int)
+     * @see org.activeio.packet.Packet#write(byte[], int, int)
      */
     public int write(byte[] data, int offset, int length) {
         return -1;

Modified: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/FilterPacket.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/FilterPacket.java?rev=357725&r1=357724&r2=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/packet/FilterPacket.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/FilterPacket.java Mon Dec 19 08:50:54 2005
@@ -20,8 +20,6 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.activeio.ByteSequence;
-import org.activeio.Packet;
 
 /**
  * Provides a Packet implementation that filters operations to another packet.

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/Packet.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/Packet.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/Packet.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/Packet.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/Packet.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/Packet.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/Packet.java Mon Dec 19 08:50:54 2005
@@ -14,18 +14,20 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio;
+package org.activeio.packet;
 
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.OutputStream;
 
+import org.activeio.Adaptable;
+
 /**
  * Provides a ByteBuffer like interface to work with IO channel packets of data.
  * 
  * @version $Revision$
  */
-public interface Packet extends Disposable, Adaptable {
+public interface Packet extends Adaptable {
     
     public int position();
     public void position(int position);
@@ -40,6 +42,7 @@
     public Packet duplicate();
     public Object duplicate(ClassLoader cl) throws IOException;
     public int capacity();
+    public void dispose();
     
     public ByteSequence asByteSequence();
     public byte[] sliceAsBytes();

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/PacketData.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/PacketData.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/PacketData.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/PacketData.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/PacketData.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/PacketData.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/PacketData.java Mon Dec 19 08:50:54 2005
@@ -15,7 +15,7 @@
  * limitations under the License. 
  * 
  **/
-package org.activeio;
+package org.activeio.packet;
 
 import java.io.EOFException;
 import java.io.IOException;

Modified: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/PacketPool.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/PacketPool.java?rev=357725&r1=357724&r2=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/packet/PacketPool.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/PacketPool.java Mon Dec 19 08:50:54 2005
@@ -19,9 +19,6 @@
 
 import java.util.ArrayList;
 
-import org.activeio.Disposable;
-import org.activeio.Packet;
-
 import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
 
 /**
@@ -30,7 +27,7 @@
  * 
  * @version $Revision: 1.1 $
  */
-abstract public class PacketPool implements Disposable {
+abstract public class PacketPool {
     
     public static final int DEFAULT_POOL_SIZE = Integer.parseInt(System.getProperty("org.activeio.journal.active.DefaultPoolSize", ""+(5)));
     public static final int DEFAULT_PACKET_SIZE = Integer.parseInt(System.getProperty("org.activeio.journal.active.DefaultPacketSize", ""+(1024*1024*4)));

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannel.java Mon Dec 19 08:50:54 2005
@@ -15,8 +15,12 @@
  *  limitations under the License.
  */
 
-package org.activeio;
+package org.activeio.packet.async;
 
+import java.io.IOException;
+
+import org.activeio.Channel;
+import org.activeio.packet.Packet;
 
 
 /**
@@ -25,6 +29,34 @@
  * 
  * @version $Revision$
  */
-public interface AsyncChannel extends InputAsyncChannel, OutputChannel {
+public interface AsyncChannel extends Channel {
+    
+    /**
+     * Registers the {@see ChannelConsumer} that the protcol will use to deliver packets
+     * coming 'up' the channel.
+     *  
+     * @param packetListener
+     */
+    void setAsyncChannelListener(AsyncChannelListener channelListener);
+    
+    /**
+     * @return the registered Packet consumer
+     */
+    AsyncChannelListener getAsyncChannelListener();
+    
+    /**
+     * Sends a packet down the channel towards the media.
+     * 
+     * @param packet
+     * @throws IOException
+     */
+    void write(Packet packet) throws IOException;
+
+    /**
+     * Some channels may buffer data which may be sent down if flush() is called.
+     * 
+     * @throws IOException
+     */
+    void flush() throws IOException;    
 
 }

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelFactory.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannelFactory.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelFactory.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelFactory.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannelFactory.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannelFactory.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelFactory.java Mon Dec 19 08:50:54 2005
@@ -14,7 +14,7 @@
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
-package org.activeio;
+package org.activeio.packet.async;
 
 import java.io.IOException;
 import java.net.URI;

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelListener.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannelListener.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelListener.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelListener.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannelListener.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannelListener.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelListener.java Mon Dec 19 08:50:54 2005
@@ -14,9 +14,11 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio;
+package org.activeio.packet.async;
 
 import java.io.IOException;
+
+import org.activeio.packet.Packet;
 
 
 /**

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelServer.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannelServer.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelServer.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelServer.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannelServer.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/AsyncChannelServer.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/AsyncChannelServer.java Mon Dec 19 08:50:54 2005
@@ -14,7 +14,10 @@
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
-package org.activeio;
+package org.activeio.packet.async;
+
+import org.activeio.AcceptListener;
+import org.activeio.ChannelServer;
 
 
 /**

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/FilterAsyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/FilterAsyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/FilterAsyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/FilterAsyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/FilterAsyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/FilterAsyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/FilterAsyncChannel.java Mon Dec 19 08:50:54 2005
@@ -14,10 +14,12 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio;
+package org.activeio.packet.async;
 
 import java.io.IOException;
 
+import org.activeio.packet.Packet;
+
 
 /**
  * A AsyncChannelFilter can be used as a filter between a {@see org.activeio.AsyncChannel}
@@ -74,21 +76,21 @@
     }
 
     /**
-     * @see org.activeio.Service#stop(long)
+     * @see org.activeio.Service#stop()
      */
-    public void stop(long timeout) throws IOException {
-        next.stop(timeout);
+    public void stop() throws IOException {
+        next.stop();
     }
 
     /**
-     * @see org.activeio.AsyncChannelListener#onPacket(org.activeio.Packet)
+     * @see org.activeio.packet.async.AsyncChannelListener#onPacket(org.activeio.packet.Packet)
      */
     public void onPacket(Packet packet) {
         channelListener.onPacket(packet);
     }
 
     /**
-     * @see org.activeio.AsyncChannelListener#onPacketError(org.activeio.ChannelException)
+     * @see org.activeio.packet.async.AsyncChannelListener#onPacketError(org.activeio.ChannelException)
      */
     public void onPacketError(IOException error) {
         channelListener.onPacketError(error);

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/FilterAsyncChannelServer.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/FilterAsyncChannelServer.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/FilterAsyncChannelServer.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/FilterAsyncChannelServer.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/FilterAsyncChannelServer.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/FilterAsyncChannelServer.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/FilterAsyncChannelServer.java Mon Dec 19 08:50:54 2005
@@ -14,11 +14,14 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio;
+package org.activeio.packet.async;
 
 import java.io.IOException;
 import java.net.URI;
 
+import org.activeio.AcceptListener;
+import org.activeio.Channel;
+
 
 /**
  * A AsyncChannelFilter can be used as a filter between a {@see org.activeio.AsyncChannel}
@@ -66,10 +69,10 @@
     }
 
     /**
-     * @see org.activeio.Service#stop(long)
+     * @see org.activeio.Service#stop()
      */
-    public void stop(long timeout) throws IOException {
-        next.stop(timeout);
+    public void stop() throws IOException {
+        next.stop();
     }
 
     public void onAccept(Channel channel) {

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOAsyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/AIOAsyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOAsyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOAsyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/AIOAsyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/AIOAsyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOAsyncChannel.java Mon Dec 19 08:50:54 2005
@@ -16,7 +16,7 @@
  * 
  **/
 
-package org.activeio.net;
+package org.activeio.packet.async.aio;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
@@ -26,11 +26,12 @@
 import java.net.SocketException;
 import java.nio.ByteBuffer;
 
-import org.activeio.AsyncChannel;
-import org.activeio.AsyncChannelListener;
-import org.activeio.Packet;
 import org.activeio.packet.ByteBufferPacket;
 import org.activeio.packet.EOSPacket;
+import org.activeio.packet.Packet;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.AsyncChannelListener;
+import org.activeio.stream.sync.socket.SocketMetadata;
 
 import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
 import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
@@ -89,7 +90,7 @@
             channelListener.onPacketError(new SocketException("Socket closed."));
         }
         try {
-            stop(NO_WAIT_TIMEOUT);
+            stop();
         } catch (IOException e) {
         }
         try {
@@ -105,16 +106,10 @@
         }
     }
 
-    public void stop(long timeout) throws IOException {
+    public void stop() throws IOException {
         if( running.compareAndSet(true, false) ) {
             try {
-                if( timeout == NO_WAIT_TIMEOUT ) {
-                    doneCountDownLatch.await(0, TimeUnit.MILLISECONDS);
-                } else if( timeout == WAIT_FOREVER_TIMEOUT ) {
-                    doneCountDownLatch.await();
-                } else {
-                    doneCountDownLatch.await(timeout,  TimeUnit.MILLISECONDS);
-                }
+                doneCountDownLatch.await(5,  TimeUnit.SECONDS);
             } catch (InterruptedException e) {
                 throw new InterruptedIOException();
             }
@@ -259,7 +254,11 @@
     public void setTrafficClass(int tc) throws SocketException {
         socket.setTrafficClass(tc);
     }
+    public void setSoTimeout(int i) throws SocketException {
+        socket.setSoTimeout(i);
+    }
     public String toString() {
         return "AIO Connection: "+getLocalSocketAddress()+" -> "+getRemoteSocketAddress();
     }
+
  }

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOAsyncChannelFactory.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/AIOAsyncChannelFactory.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOAsyncChannelFactory.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOAsyncChannelFactory.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/AIOAsyncChannelFactory.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/AIOAsyncChannelFactory.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOAsyncChannelFactory.java Mon Dec 19 08:50:54 2005
@@ -15,7 +15,7 @@
  * limitations under the License. 
  * 
  **/
-package org.activeio.net;
+package org.activeio.packet.async.aio;
 
 import java.io.IOException;
 import java.net.InetAddress;
@@ -23,12 +23,13 @@
 import java.net.URI;
 import java.net.URISyntaxException;
 
-import org.activeio.AsyncChannel;
-import org.activeio.AsyncChannelFactory;
-import org.activeio.AsyncChannelServer;
 import org.activeio.adapter.SyncToAsyncChannelServer;
-import org.activeio.filter.WriteBufferedAsyncChannel;
 import org.activeio.packet.ByteBufferPacket;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.AsyncChannelFactory;
+import org.activeio.packet.async.AsyncChannelServer;
+import org.activeio.packet.async.filter.WriteBufferedAsyncChannel;
+import org.activeio.util.URISupport;
 
 import com.ibm.io.async.AsyncServerSocketChannel;
 import com.ibm.io.async.AsyncSocketChannel;

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOSyncChannelServer.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/AIOSyncChannelServer.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOSyncChannelServer.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOSyncChannelServer.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/AIOSyncChannelServer.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/AIOSyncChannelServer.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/aio/AIOSyncChannelServer.java Mon Dec 19 08:50:54 2005
@@ -16,18 +16,18 @@
  * 
  **/
 
-package org.activeio.net;
+package org.activeio.packet.async.aio;
 
 import java.io.IOException;
 import java.net.SocketException;
 import java.net.SocketTimeoutException;
 import java.net.URI;
 
-import org.activeio.AsyncChannel;
 import org.activeio.Channel;
-import org.activeio.SyncChannelServer;
-import org.activeio.filter.WriteBufferedAsyncChannel;
 import org.activeio.packet.ByteBufferPacket;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.filter.WriteBufferedAsyncChannel;
+import org.activeio.packet.sync.SyncChannelServer;
 
 import com.ibm.io.async.AsyncServerSocketChannel;
 
@@ -66,7 +66,7 @@
     synchronized public void start() throws IOException {
     }
 
-    synchronized public void stop(long timeout) {
+    synchronized public void stop() {
     }
 
     public Channel accept(long timeout) throws IOException {

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/AsyncWriteAsyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/filter/AsyncWriteAsyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/AsyncWriteAsyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/AsyncWriteAsyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/filter/AsyncWriteAsyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/filter/AsyncWriteAsyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/AsyncWriteAsyncChannel.java Mon Dec 19 08:50:54 2005
@@ -1,4 +1,4 @@
-package org.activeio.filter;
+package org.activeio.packet.async.filter;
 
 import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue;
 import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
@@ -8,10 +8,10 @@
 import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
 import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
 
-import org.activeio.AsyncChannel;
 import org.activeio.ChannelFactory;
-import org.activeio.FilterAsyncChannel;
-import org.activeio.Packet;
+import org.activeio.packet.Packet;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.FilterAsyncChannel;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
@@ -133,7 +133,7 @@
         flush(NO_WAIT_TIMEOUT);
     }
     
-    public void stop(long timeout) throws IOException {
+    public void stop() throws IOException {
         flush(WAIT_FOREVER_TIMEOUT);        
     }
     

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/CounterAsyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/filter/CounterAsyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/CounterAsyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/CounterAsyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/filter/CounterAsyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/filter/CounterAsyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/CounterAsyncChannel.java Mon Dec 19 08:50:54 2005
@@ -14,13 +14,13 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio.filter;
+package org.activeio.packet.async.filter;
 
 import java.io.IOException;
 
-import org.activeio.AsyncChannel;
-import org.activeio.FilterAsyncChannel;
-import org.activeio.Packet;
+import org.activeio.packet.Packet;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.FilterAsyncChannel;
 
 
 /**
@@ -48,7 +48,7 @@
     }
 
     /**
-     * @see org.activeio.FilterAsyncChannel#onPacket(org.activeio.Packet)
+     * @see org.activeio.packet.async.FilterAsyncChannel#onPacket(org.activeio.packet.Packet)
      */
     public void onPacket(Packet packet) {
         inBoundCounter += packet.remaining();
@@ -56,7 +56,7 @@
     }
 
     /**
-     * @see org.activeio.FilterAsyncChannel#write(org.activeio.Packet)
+     * @see org.activeio.packet.async.FilterAsyncChannel#write(org.activeio.packet.Packet)
      */
     public void write(Packet packet) throws IOException {
         outBoundCounter += packet.position();

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/PacketAggregatingAsyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/filter/PacketAggregatingAsyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/PacketAggregatingAsyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/PacketAggregatingAsyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/filter/PacketAggregatingAsyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/filter/PacketAggregatingAsyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/PacketAggregatingAsyncChannel.java Mon Dec 19 08:50:54 2005
@@ -14,13 +14,14 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio.filter;
+package org.activeio.packet.async.filter;
 
 import java.io.IOException;
 
-import org.activeio.AsyncChannel;
-import org.activeio.FilterAsyncChannel;
-import org.activeio.Packet;
+import org.activeio.packet.Packet;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.FilterAsyncChannel;
+import org.activeio.util.PacketAggregator;
 
 /**
  * This PacketAggregatingAsyncChannel can be used when the client is sending a

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/SynchornizedAsyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/filter/SynchornizedAsyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/SynchornizedAsyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/SynchornizedAsyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/filter/SynchornizedAsyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/filter/SynchornizedAsyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/SynchornizedAsyncChannel.java Mon Dec 19 08:50:54 2005
@@ -14,14 +14,14 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio.filter;
+package org.activeio.packet.async.filter;
 
 import edu.emory.mathcs.backport.java.util.concurrent.locks.Lock;
 import edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock;
 
-import org.activeio.AsyncChannel;
-import org.activeio.FilterAsyncChannel;
-import org.activeio.Packet;
+import org.activeio.packet.Packet;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.FilterAsyncChannel;
 
 import java.io.IOException;
 
@@ -66,10 +66,6 @@
         }
     }
 
-    synchronized public void dispose() {
-        super.dispose();
-    }
-
     synchronized public Object getAdapter(Class target) {
         return super.getAdapter(target);
     }
@@ -78,8 +74,8 @@
         super.start();
     }
 
-    synchronized public void stop(long timeout) throws IOException {
-        super.stop(timeout);
+    synchronized public void stop() throws IOException {
+        super.stop();
     }
     
     public Lock getWriteLock() {

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/WriteBufferedAsyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/filter/WriteBufferedAsyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/WriteBufferedAsyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/WriteBufferedAsyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/filter/WriteBufferedAsyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/filter/WriteBufferedAsyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/filter/WriteBufferedAsyncChannel.java Mon Dec 19 08:50:54 2005
@@ -14,14 +14,14 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio.filter;
+package org.activeio.packet.async.filter;
 
 import java.io.IOException;
 
-import org.activeio.AsyncChannel;
-import org.activeio.FilterAsyncChannel;
-import org.activeio.Packet;
 import org.activeio.packet.ByteArrayPacket;
+import org.activeio.packet.Packet;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.FilterAsyncChannel;
 
 /**
  */

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannel.java Mon Dec 19 08:50:54 2005
@@ -16,7 +16,7 @@
  * 
  **/
 
-package org.activeio.net;
+package org.activeio.packet.async.nio;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
@@ -25,14 +25,15 @@
 import java.nio.channels.SelectionKey;
 import java.nio.channels.SocketChannel;
 
-import org.activeio.AsyncChannel;
-import org.activeio.AsyncChannelListener;
-import org.activeio.ByteSequence;
-import org.activeio.Packet;
-import org.activeio.net.NIOAsyncChannelSelectorManager.SelectorManagerListener;
-import org.activeio.net.NIOAsyncChannelSelectorManager.SocketChannelAsyncChannelSelection;
 import org.activeio.packet.ByteBufferPacket;
+import org.activeio.packet.ByteSequence;
 import org.activeio.packet.EOSPacket;
+import org.activeio.packet.Packet;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.AsyncChannelListener;
+import org.activeio.packet.async.nio.NIOAsyncChannelSelectorManager.SelectorManagerListener;
+import org.activeio.packet.async.nio.NIOAsyncChannelSelectorManager.SocketChannelAsyncChannelSelection;
+import org.activeio.packet.sync.nio.NIOBaseChannel;
 
 /**
  * @version $Revision$
@@ -173,7 +174,7 @@
         selection.setInterestOps(SelectionKey.OP_READ);
     }
 
-    public void stop(long timeout) throws IOException {
+    public void stop() throws IOException {
         if( !running )
             return;
         running=false;

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelFactory.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannelFactory.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelFactory.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelFactory.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannelFactory.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannelFactory.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelFactory.java Mon Dec 19 08:50:54 2005
@@ -15,7 +15,7 @@
  * limitations under the License. 
  * 
  **/
-package org.activeio.net;
+package org.activeio.packet.async.nio;
 
 import java.io.IOException;
 import java.net.InetAddress;
@@ -25,12 +25,13 @@
 import java.nio.channels.ServerSocketChannel;
 import java.nio.channels.SocketChannel;
 
-import org.activeio.AsyncChannel;
-import org.activeio.AsyncChannelFactory;
-import org.activeio.AsyncChannelServer;
 import org.activeio.adapter.SyncToAsyncChannelServer;
-import org.activeio.filter.WriteBufferedAsyncChannel;
 import org.activeio.packet.ByteBufferPacket;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.AsyncChannelFactory;
+import org.activeio.packet.async.AsyncChannelServer;
+import org.activeio.packet.async.filter.WriteBufferedAsyncChannel;
+import org.activeio.util.URISupport;
 
 /**
  * A TcpAsyncChannelFactory creates {@see org.activeio.net.TcpAsyncChannel}

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelSelectorManager.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannelSelectorManager.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelSelectorManager.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelSelectorManager.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannelSelectorManager.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannelSelectorManager.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelSelectorManager.java Mon Dec 19 08:50:54 2005
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package org.activeio.net;
+package org.activeio.packet.async.nio;
 
 import edu.emory.mathcs.backport.java.util.concurrent.Executor;
 import edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor;

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelServer.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannelServer.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelServer.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelServer.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannelServer.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOAsyncChannelServer.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/nio/NIOAsyncChannelServer.java Mon Dec 19 08:50:54 2005
@@ -16,16 +16,18 @@
  * 
  **/
 
-package org.activeio.net;
+package org.activeio.packet.async.nio;
 
 import java.io.IOException;
 import java.net.URI;
 import java.nio.channels.ServerSocketChannel;
 
-import org.activeio.AsyncChannel;
 import org.activeio.Channel;
-import org.activeio.filter.WriteBufferedAsyncChannel;
 import org.activeio.packet.ByteBufferPacket;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.filter.WriteBufferedAsyncChannel;
+import org.activeio.packet.sync.socket.SocketSyncChannelServer;
+import org.activeio.stream.sync.socket.SocketStreamChannel;
 
 /**
  * A SynchChannelServer that creates

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelFactory.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/VMPipeAsyncChannelFactory.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelFactory.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelFactory.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/VMPipeAsyncChannelFactory.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/VMPipeAsyncChannelFactory.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelFactory.java Mon Dec 19 08:50:54 2005
@@ -15,7 +15,7 @@
  * limitations under the License. 
  * 
  **/
-package org.activeio.net;
+package org.activeio.packet.async.vmpipe;
 
 import java.io.IOException;
 import java.lang.reflect.InvocationHandler;
@@ -27,11 +27,11 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.activeio.AsyncChannel;
-import org.activeio.AsyncChannelFactory;
-import org.activeio.AsyncChannelListener;
-import org.activeio.AsyncChannelServer;
-import org.activeio.Packet;
+import org.activeio.packet.Packet;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.AsyncChannelFactory;
+import org.activeio.packet.async.AsyncChannelListener;
+import org.activeio.packet.async.AsyncChannelServer;
 
 /**
  * 
@@ -107,7 +107,7 @@
             packetClazz = cl.loadClass(Packet.class.getName());
             writeMethod = clazz.getMethod("write", new Class[] { packetClazz });
             startMethod = clazz.getMethod("start", new Class[] { });
-            stopMethod = clazz.getMethod("stop", new Class[] { long.class });
+            stopMethod = clazz.getMethod("stop", new Class[] {});
             disposeMethod = clazz.getMethod("dispose", new Class[] { });
 
             setListenerMethod = clazz.getMethod("setAsyncChannelListener", new Class[] { listenerClazz });
@@ -138,8 +138,8 @@
             callIOExceptionMethod(startMethod, new Object[] {});
         }
 
-        public void stop(long timeout) throws IOException {
-            callIOExceptionMethod(stopMethod, new Object[] {new Long(timeout)});
+        public void stop() throws IOException {
+            callIOExceptionMethod(stopMethod, new Object[] {});
         }
         
         private void callMethod(Method method, Object[] args) {

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelPipe.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/VMPipeAsyncChannelPipe.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelPipe.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelPipe.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/VMPipeAsyncChannelPipe.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/VMPipeAsyncChannelPipe.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelPipe.java Mon Dec 19 08:50:54 2005
@@ -15,15 +15,15 @@
  * limitations under the License. 
  * 
  **/
-package org.activeio.net;
+package org.activeio.packet.async.vmpipe;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
 
-import org.activeio.AsyncChannel;
-import org.activeio.AsyncChannelListener;
-import org.activeio.Packet;
 import org.activeio.packet.EOSPacket;
+import org.activeio.packet.Packet;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.AsyncChannelListener;
 
 import edu.emory.mathcs.backport.java.util.concurrent.Semaphore;
 import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
@@ -97,19 +97,11 @@
             runMutext.release();
         }
         
-        public void stop(long timeout) throws IOException {
+        public void stop() throws IOException {
             if(!running)
                 return;            
             try {
-                if( timeout == NO_WAIT_TIMEOUT ) {
-                    if( !runMutext.tryAcquire(0, TimeUnit.MILLISECONDS) )
-                        return;
-                } else if( timeout == WAIT_FOREVER_TIMEOUT ) {
-                    runMutext.acquire();
-                } else {
-                    if( !runMutext.tryAcquire(timeout, TimeUnit.MILLISECONDS) ) 
-                        return;
-                }
+                runMutext.tryAcquire(5, TimeUnit.SECONDS); 
                 running=false;
             } catch (InterruptedException e) {
                 throw new InterruptedIOException();

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelServer.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/VMPipeAsyncChannelServer.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelServer.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelServer.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/VMPipeAsyncChannelServer.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/VMPipeAsyncChannelServer.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/async/vmpipe/VMPipeAsyncChannelServer.java Mon Dec 19 08:50:54 2005
@@ -16,14 +16,14 @@
  * 
  **/
 
-package org.activeio.net;
+package org.activeio.packet.async.vmpipe;
 
 import java.io.IOException;
 import java.net.URI;
 
 import org.activeio.AcceptListener;
-import org.activeio.AsyncChannel;
-import org.activeio.AsyncChannelServer;
+import org.activeio.packet.async.AsyncChannel;
+import org.activeio.packet.async.AsyncChannelServer;
 
 /**
  * @version $Revision$
@@ -60,7 +60,7 @@
             throw new IOException("acceptListener has not been set.");
     }
 
-    public void stop(long timeout) {
+    public void stop() {
     }
 
     public Object getAdapter(Class target) {

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/FilterSyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/FilterSyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/FilterSyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/FilterSyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/FilterSyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/FilterSyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/FilterSyncChannel.java Mon Dec 19 08:50:54 2005
@@ -14,10 +14,12 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio;
+package org.activeio.packet.sync;
 
 import java.io.IOException;
 
+import org.activeio.packet.Packet;
+
 
 /**
  * A SynchChannelFilter can be used as a filter another {@see org.activeio.SynchChannel}
@@ -35,7 +37,7 @@
     }
 
     /**
-     * @see org.activeio.Channel#write(org.activeio.Packet)
+     * @see org.activeio.Channel#write(org.activeio.packet.Packet)
      */
     public void write(Packet packet) throws IOException {
         next.write(packet);
@@ -63,10 +65,10 @@
     }
 
     /**
-     * @see org.activeio.Service#stop(long)
+     * @see org.activeio.Service#stop()
      */
-    public void stop(long timeout) throws IOException {
-        next.stop(timeout);
+    public void stop() throws IOException {
+        next.stop();
     }
 
     /**
@@ -77,7 +79,7 @@
     }
 
     /**
-     * @see org.activeio.SyncChannel#read(long)
+     * @see org.activeio.packet.sync.SyncChannel#read(long)
      */
     public Packet read(long timeout) throws IOException {
         return next.read(timeout);

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/FilterSyncChannelServer.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/FilterSyncChannelServer.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/FilterSyncChannelServer.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/FilterSyncChannelServer.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/FilterSyncChannelServer.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/FilterSyncChannelServer.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/FilterSyncChannelServer.java Mon Dec 19 08:50:54 2005
@@ -14,11 +14,13 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio;
+package org.activeio.packet.sync;
 
 import java.io.IOException;
 import java.net.URI;
 
+import org.activeio.Channel;
+
 
 /**
  * A SynchChannelFilter can be used as a filter another {@see org.activeio.SynchChannel}
@@ -50,10 +52,10 @@
     }
 
     /**
-     * @see org.activeio.Service#stop(long)
+     * @see org.activeio.Service#stop()
      */
-    public void stop(long timeout) throws IOException {
-        next.stop(timeout);
+    public void stop() throws IOException {
+        next.stop();
     }
 
     /**
@@ -64,7 +66,7 @@
     }
 
     /**
-     * @see org.activeio.SyncChannelServer#accept(long)
+     * @see org.activeio.packet.sync.SyncChannelServer#accept(long)
      */
     public Channel accept(long timeout) throws IOException {
         return next.accept(timeout);

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/SyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/SyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/SyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannel.java Mon Dec 19 08:50:54 2005
@@ -15,13 +15,45 @@
  *  limitations under the License.
  */
 
-package org.activeio;
+package org.activeio.packet.sync;
+
+import java.io.IOException;
+
+import org.activeio.Channel;
+import org.activeio.packet.Packet;
+
 
 /**
- * SyncChannel objets allow threadd to synchronously block on the <code>receiveUpPacket</code>
+ * SyncChannel objects allow threaded to synchronously block on the <code>receiveUpPacket</code>
  * method to get 'up' {@see org.activeio.Packet} objects when they arrive.
  * 
  * @version $Revision$
  */
-public interface SyncChannel extends OutputChannel, InputSyncChannel {
+public interface SyncChannel extends Channel {
+    
+    /**
+     * Used to synchronously receive a packet of information going 'up' the channel.
+     * This method blocks until a packet is received or the operation experiences timeout.
+     * 
+     * @param timeout
+     * @return the packet received or null if the timeout occurred.
+     * @throws IOException
+     */
+    Packet read(long timeout) throws IOException;
+    
+    /**
+     * Sends a packet down the channel towards the media.
+     * 
+     * @param packet
+     * @throws IOException
+     */
+    void write(Packet packet) throws IOException;
+
+    /**
+     * Some channels may buffer data which may be sent down if flush() is called.
+     * 
+     * @throws IOException
+     */
+    void flush() throws IOException;    
+
 }

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannelFactory.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/SyncChannelFactory.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannelFactory.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannelFactory.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/SyncChannelFactory.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/SyncChannelFactory.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannelFactory.java Mon Dec 19 08:50:54 2005
@@ -14,7 +14,7 @@
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
-package org.activeio;
+package org.activeio.packet.sync;
 
 import java.io.IOException;
 import java.net.URI;

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannelServer.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/SyncChannelServer.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannelServer.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannelServer.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/SyncChannelServer.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/SyncChannelServer.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/SyncChannelServer.java Mon Dec 19 08:50:54 2005
@@ -14,9 +14,12 @@
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
-package org.activeio;
+package org.activeio.packet.sync;
 
 import java.io.IOException;
+
+import org.activeio.Channel;
+import org.activeio.ChannelServer;
 
 
 

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramContext.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/DatagramContext.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramContext.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramContext.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/DatagramContext.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/DatagramContext.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramContext.java Mon Dec 19 08:50:54 2005
@@ -4,7 +4,7 @@
  * TODO To change the template for this generated file go to
  * Window - Preferences - Java - Code Style - Code Templates
  */
-package org.activeio.net;
+package org.activeio.packet.sync.datagram;
 
 import java.net.DatagramPacket;
 import java.net.InetAddress;

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramSocketSyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/DatagramSocketSyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramSocketSyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramSocketSyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/DatagramSocketSyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/DatagramSocketSyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramSocketSyncChannel.java Mon Dec 19 08:50:54 2005
@@ -16,7 +16,7 @@
  * 
  **/
 
-package org.activeio.net;
+package org.activeio.packet.sync.datagram;
 
 import java.io.IOException;
 import java.net.DatagramPacket;
@@ -24,12 +24,12 @@
 import java.net.SocketException;
 import java.net.SocketTimeoutException;
 
-import org.activeio.ByteSequence;
-import org.activeio.Packet;
-import org.activeio.SyncChannel;
-import org.activeio.SyncChannelServer;
 import org.activeio.packet.ByteArrayPacket;
+import org.activeio.packet.ByteSequence;
 import org.activeio.packet.FilterPacket;
+import org.activeio.packet.Packet;
+import org.activeio.packet.sync.SyncChannel;
+import org.activeio.packet.sync.SyncChannelServer;
 
 /**
  * A {@see org.activeio.SynchChannel}implementation that uses
@@ -84,9 +84,9 @@
     }
 
     /**
-     * @see org.activeio.SyncChannel#read(long)
+     * @see org.activeio.packet.sync.SyncChannel#read(long)
      */
-    public org.activeio.Packet read(long timeout) throws IOException {
+    public org.activeio.packet.Packet read(long timeout) throws IOException {
         try {
 
             if (timeout == SyncChannelServer.WAIT_FOREVER_TIMEOUT)
@@ -117,9 +117,9 @@
     }
 
     /**
-     * @see org.activeio.Channel#write(org.activeio.Packet)
+     * @see org.activeio.Channel#write(org.activeio.packet.Packet)
      */
-    public void write(org.activeio.Packet packet) throws IOException {
+    public void write(org.activeio.packet.Packet packet) throws IOException {
         ByteSequence sequence = packet.asByteSequence();
 
         DatagramContext context = (DatagramContext) packet.getAdapter(DatagramContext.class);
@@ -149,7 +149,7 @@
     public void start() throws IOException {
     }
 
-    public void stop(long timeout) throws IOException {
+    public void stop() throws IOException {
     }
 
     

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramSocketSyncChannelFactory.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/DatagramSocketSyncChannelFactory.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramSocketSyncChannelFactory.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramSocketSyncChannelFactory.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/DatagramSocketSyncChannelFactory.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/DatagramSocketSyncChannelFactory.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/datagram/DatagramSocketSyncChannelFactory.java Mon Dec 19 08:50:54 2005
@@ -15,16 +15,16 @@
  * limitations under the License. 
  * 
  **/
-package org.activeio.net;
+package org.activeio.packet.sync.datagram;
 
 import java.io.IOException;
 import java.net.DatagramSocket;
 import java.net.InetAddress;
 import java.net.URI;
 
-import org.activeio.SyncChannel;
-import org.activeio.SyncChannelFactory;
-import org.activeio.SyncChannelServer;
+import org.activeio.packet.sync.SyncChannel;
+import org.activeio.packet.sync.SyncChannelFactory;
+import org.activeio.packet.sync.SyncChannelServer;
 
 /**
  * A TcpSynchChannelFactory creates {@see org.activeio.net.TcpSynchChannel}

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/PacketAggregatingSyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/filter/PacketAggregatingSyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/PacketAggregatingSyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/PacketAggregatingSyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/filter/PacketAggregatingSyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/filter/PacketAggregatingSyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/PacketAggregatingSyncChannel.java Mon Dec 19 08:50:54 2005
@@ -14,14 +14,15 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio.filter;
+package org.activeio.packet.sync.filter;
 
 import java.io.IOException;
 import java.util.LinkedList;
 
-import org.activeio.FilterSyncChannel;
-import org.activeio.Packet;
-import org.activeio.SyncChannel;
+import org.activeio.packet.Packet;
+import org.activeio.packet.sync.FilterSyncChannel;
+import org.activeio.packet.sync.SyncChannel;
+import org.activeio.util.PacketAggregator;
 
 /**
  * This PacketAggregatingSynchChannel can be used when the client is sending a

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/PushbackSyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/filter/PushbackSyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/PushbackSyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/PushbackSyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/filter/PushbackSyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/filter/PushbackSyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/PushbackSyncChannel.java Mon Dec 19 08:50:54 2005
@@ -15,13 +15,13 @@
  * limitations under the License. 
  * 
  **/
-package org.activeio.filter;
+package org.activeio.packet.sync.filter;
 
 import java.io.IOException;
 
-import org.activeio.FilterSyncChannel;
-import org.activeio.Packet;
-import org.activeio.SyncChannel;
+import org.activeio.packet.Packet;
+import org.activeio.packet.sync.FilterSyncChannel;
+import org.activeio.packet.sync.SyncChannel;
 
 /**
  *

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/SynchornizedSyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/filter/SynchornizedSyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/SynchornizedSyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/SynchornizedSyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/filter/SynchornizedSyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/filter/SynchornizedSyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/SynchornizedSyncChannel.java Mon Dec 19 08:50:54 2005
@@ -14,20 +14,20 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio.filter;
+package org.activeio.packet.sync.filter;
+
+import java.io.IOException;
+import java.io.InterruptedIOException;
+
+import org.activeio.packet.Packet;
+import org.activeio.packet.sync.FilterSyncChannel;
+import org.activeio.packet.sync.SyncChannel;
+import org.activeio.packet.sync.SyncChannelServer;
 
 import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
 import edu.emory.mathcs.backport.java.util.concurrent.locks.Lock;
 import edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock;
 
-import org.activeio.FilterSyncChannel;
-import org.activeio.Packet;
-import org.activeio.SyncChannel;
-import org.activeio.SyncChannelServer;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-
 /**
  * Used to synchronize concurrent access to a SynchChannel.  
  * 
@@ -96,10 +96,6 @@
         }
     }
 
-    synchronized public void dispose() {
-        super.dispose();
-    }
-
     synchronized public Object getAdapter(Class target) {
         return super.getAdapter(target);
     }
@@ -108,8 +104,8 @@
         super.start();
     }
 
-    synchronized public void stop(long timeout) throws IOException {
-        super.stop(timeout);
+    synchronized public void stop() throws IOException {
+        super.stop();
     }
     
     public Lock getReadLock() {

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/WriteBufferedSyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/filter/WriteBufferedSyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/WriteBufferedSyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/WriteBufferedSyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/filter/WriteBufferedSyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/filter/WriteBufferedSyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/filter/WriteBufferedSyncChannel.java Mon Dec 19 08:50:54 2005
@@ -14,14 +14,14 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.activeio.filter;
+package org.activeio.packet.sync.filter;
 
 import java.io.IOException;
 
-import org.activeio.FilterSyncChannel;
-import org.activeio.Packet;
-import org.activeio.SyncChannel;
 import org.activeio.packet.ByteArrayPacket;
+import org.activeio.packet.Packet;
+import org.activeio.packet.sync.FilterSyncChannel;
+import org.activeio.packet.sync.SyncChannel;
 
 /**
  */

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/jxta/JxtaSocketSyncChannelFactory.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/JxtaSocketSyncChannelFactory.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/jxta/JxtaSocketSyncChannelFactory.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/jxta/JxtaSocketSyncChannelFactory.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/JxtaSocketSyncChannelFactory.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/JxtaSocketSyncChannelFactory.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/jxta/JxtaSocketSyncChannelFactory.java Mon Dec 19 08:50:54 2005
@@ -15,7 +15,7 @@
  * limitations under the License. 
  * 
  **/
-package org.activeio.net;
+package org.activeio.packet.sync.jxta;
 
 import java.io.IOException;
 import java.net.InetAddress;
@@ -26,6 +26,7 @@
 import javax.net.ServerSocketFactory;
 import javax.net.SocketFactory;
 
+import org.activeio.packet.sync.socket.SocketSyncChannelFactory;
 import org.p2psockets.P2PServerSocket;
 import org.p2psockets.P2PSocket;
 

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/multicast/MulticastSocketSyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/MulticastSocketSyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/multicast/MulticastSocketSyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/multicast/MulticastSocketSyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/MulticastSocketSyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/MulticastSocketSyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/multicast/MulticastSocketSyncChannel.java Mon Dec 19 08:50:54 2005
@@ -14,12 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.activeio.net;
+package org.activeio.packet.sync.multicast;
 
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.MulticastSocket;
 
+import org.activeio.packet.sync.datagram.DatagramSocketSyncChannel;
+
 
 /**
  * @version $Revision$
@@ -38,7 +40,7 @@
         ((MulticastSocket) getSocket()).joinGroup(groupAddress);
     }
 
-    public void stop(long timeout) throws IOException {
+    public void stop() throws IOException {
         ((MulticastSocket) getSocket()).leaveGroup(groupAddress);
     }
 

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/multicast/MulticastSocketSyncChannelFactory.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/MulticastSocketSyncChannelFactory.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/multicast/MulticastSocketSyncChannelFactory.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/multicast/MulticastSocketSyncChannelFactory.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/MulticastSocketSyncChannelFactory.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/MulticastSocketSyncChannelFactory.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/multicast/MulticastSocketSyncChannelFactory.java Mon Dec 19 08:50:54 2005
@@ -14,15 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.activeio.net;
+package org.activeio.packet.sync.multicast;
 
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.MulticastSocket;
 import java.net.URI;
 
-import org.activeio.SyncChannel;
-import org.activeio.SyncChannelServer;
+import org.activeio.packet.sync.SyncChannel;
+import org.activeio.packet.sync.SyncChannelServer;
 
 
 /**

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOBaseChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOBaseChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOBaseChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOBaseChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOBaseChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOBaseChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOBaseChannel.java Mon Dec 19 08:50:54 2005
@@ -16,7 +16,7 @@
  * 
  **/
 
-package org.activeio.net;
+package org.activeio.packet.sync.nio;
 
 import java.io.IOException;
 import java.net.InetAddress;
@@ -26,15 +26,15 @@
 import java.nio.ByteBuffer;
 import java.nio.channels.SocketChannel;
 
-import org.activeio.Disposable;
 import org.activeio.packet.ByteBufferPacket;
+import org.activeio.stream.sync.socket.SocketMetadata;
 
 /**
  * Base class for the Async and Sync implementations of NIO channels.
  * 
  * @version $Revision$
  */
-public class NIOBaseChannel implements SocketMetadata, Disposable {
+public class NIOBaseChannel implements SocketMetadata {
 
 	protected final SocketChannel socketChannel;
     protected final Socket socket;
@@ -67,7 +67,7 @@
         }
     }
 
-    protected void setSoTimeout(int i) throws SocketException {
+    public void setSoTimeout(int i) throws SocketException {
         if( curentSoTimeout != i ) {
             socket.setSoTimeout(i);
             curentSoTimeout = i;

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannel.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOSyncChannel.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannel.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannel.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOSyncChannel.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOSyncChannel.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannel.java Mon Dec 19 08:50:54 2005
@@ -16,20 +16,20 @@
  * 
  **/
 
-package org.activeio.net;
+package org.activeio.packet.sync.nio;
 
 import java.io.IOException;
 import java.net.SocketTimeoutException;
 import java.nio.ByteBuffer;
 import java.nio.channels.SocketChannel;
 
-import org.activeio.ByteSequence;
-import org.activeio.Packet;
-import org.activeio.SyncChannel;
-import org.activeio.SyncChannelServer;
 import org.activeio.packet.ByteBufferPacket;
+import org.activeio.packet.ByteSequence;
 import org.activeio.packet.EOSPacket;
 import org.activeio.packet.EmptyPacket;
+import org.activeio.packet.Packet;
+import org.activeio.packet.sync.SyncChannel;
+import org.activeio.packet.sync.SyncChannelServer;
 
 /**
  * A {@see org.activeio.SynchChannel} implementation that uses a {@see java.nio.channels.SocketChannel}
@@ -99,7 +99,7 @@
 	public void start() throws IOException {
 	}
 
-	public void stop(long timeout) throws IOException {
+	public void stop() throws IOException {
 	}
     
 }

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannelFactory.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOSyncChannelFactory.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannelFactory.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannelFactory.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOSyncChannelFactory.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOSyncChannelFactory.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannelFactory.java Mon Dec 19 08:50:54 2005
@@ -15,7 +15,7 @@
  * limitations under the License. 
  * 
  **/
-package org.activeio.net;
+package org.activeio.packet.sync.nio;
 
 import java.io.IOException;
 import java.net.InetAddress;
@@ -25,11 +25,12 @@
 import java.nio.channels.ServerSocketChannel;
 import java.nio.channels.SocketChannel;
 
-import org.activeio.SyncChannel;
-import org.activeio.SyncChannelFactory;
-import org.activeio.SyncChannelServer;
-import org.activeio.filter.WriteBufferedSyncChannel;
 import org.activeio.packet.ByteBufferPacket;
+import org.activeio.packet.sync.SyncChannel;
+import org.activeio.packet.sync.SyncChannelFactory;
+import org.activeio.packet.sync.SyncChannelServer;
+import org.activeio.packet.sync.filter.WriteBufferedSyncChannel;
+import org.activeio.util.URISupport;
 
 /**
  * A TcpSynchChannelFactory creates {@see org.activeio.net.TcpSynchChannel}

Copied: incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannelServer.java (from r357173, incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOSyncChannelServer.java)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannelServer.java?p2=incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannelServer.java&p1=incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOSyncChannelServer.java&r1=357173&r2=357725&rev=357725&view=diff
==============================================================================
--- incubator/activemq/trunk/activeio/src/java/org/activeio/net/NIOSyncChannelServer.java (original)
+++ incubator/activemq/trunk/activeio/src/java/org/activeio/packet/sync/nio/NIOSyncChannelServer.java Mon Dec 19 08:50:54 2005
@@ -16,16 +16,18 @@
  * 
  **/
 
-package org.activeio.net;
+package org.activeio.packet.sync.nio;
 
 import java.io.IOException;
 import java.net.URI;
 import java.nio.channels.ServerSocketChannel;
 
 import org.activeio.Channel;
-import org.activeio.SyncChannel;
-import org.activeio.filter.WriteBufferedSyncChannel;
 import org.activeio.packet.ByteBufferPacket;
+import org.activeio.packet.sync.SyncChannel;
+import org.activeio.packet.sync.filter.WriteBufferedSyncChannel;
+import org.activeio.packet.sync.socket.SocketSyncChannelServer;
+import org.activeio.stream.sync.socket.SocketStreamChannel;
 
 /**
  * A SynchChannelServer that creates



Mime
View raw message