[jboss-remoting-commits] JBoss Remoting SVN: r4618 - remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Wed Oct 22 22:04:40 EDT 2008


Author: david.lloyd at jboss.com
Date: 2008-10-22 22:04:40 -0400 (Wed, 22 Oct 2008)
New Revision: 4618

Removed:
   remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/AbstractConnection.java
   remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/ConfigValue.java
   remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/ConnectionListener.java
Modified:
   remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/IdentityIntMap.java
   remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MessageType.java
   remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexConfiguration.java
   remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexHandler.java
   remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexProtocol.java
   remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/SimpleWriteHandler.java
   remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/WriteHandler.java
Log:
javadoc & cleanup

Deleted: remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/AbstractConnection.java
===================================================================
--- remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/AbstractConnection.java	2008-10-23 01:44:56 UTC (rev 4617)
+++ remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/AbstractConnection.java	2008-10-23 02:04:40 UTC (rev 4618)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.remoting.protocol.multiplex;
-
-import org.jboss.remoting.spi.AbstractSimpleCloseable;
-import java.util.concurrent.Executor;
-
-/**
- *
- */
-public abstract class AbstractConnection extends AbstractSimpleCloseable {
-    /**
-     * Basic constructor.
-     *
-     * @param executor the executor used to execute the close notification handlers
-     */
-    protected AbstractConnection(final Executor executor) {
-        super(executor);
-    }
-
-    public String toString() {
-        return "connection <" + Integer.toString(hashCode()) + ">";
-    }
-}

Deleted: remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/ConfigValue.java
===================================================================
--- remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/ConfigValue.java	2008-10-23 01:44:56 UTC (rev 4617)
+++ remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/ConfigValue.java	2008-10-23 02:04:40 UTC (rev 4618)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.remoting.protocol.multiplex;
-
-/**
- *
- */
-public enum ConfigValue {
-
-    /**
-     * The protocol version to use.  Value type is {@code int}.
-     */
-    PROTOCOL_VERSION(0),
-    /**
-     * The name of the marshaller to use.  Value type is {@code String}.
-     */
-    MARSHALLER_NAME(1),
-    ;
-    private final int id;
-
-    private ConfigValue(final int id) {
-        this.id = id;
-    }
-
-    /**
-     * Get the integer ID for this config value.
-     *
-     * @return the integer ID
-     */
-    public int getId() {
-        return id;
-    }
-
-    /**
-     * Get the config value for an integer ID.
-     *
-     * @param id the integer ID
-     * @return the config value instance
-     */
-    public static ConfigValue getConfigValue(final int id) {
-        switch (id) {
-            case 0: return PROTOCOL_VERSION;
-            case 1: return MARSHALLER_NAME;
-            default: throw new IllegalArgumentException("Invalid config value ID");
-        }
-    }
-}

Deleted: remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/ConnectionListener.java
===================================================================
--- remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/ConnectionListener.java	2008-10-23 01:44:56 UTC (rev 4617)
+++ remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/ConnectionListener.java	2008-10-23 02:04:40 UTC (rev 4618)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.remoting.protocol.multiplex;
-
-import org.jboss.remoting.SimpleCloseable;
-
-/**
- *
- */
-public interface ConnectionListener {
-    void handleOpened(SimpleCloseable connection);
-}

Modified: remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/IdentityIntMap.java
===================================================================
--- remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/IdentityIntMap.java	2008-10-23 01:44:56 UTC (rev 4617)
+++ remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/IdentityIntMap.java	2008-10-23 02:04:40 UTC (rev 4618)
@@ -27,7 +27,7 @@
 /**
  *
  */
-public final class IdentityIntMap<T> {
+final class IdentityIntMap<T> {
 
     private int[] values;
     private Object[] keys;

Modified: remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MessageType.java
===================================================================
--- remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MessageType.java	2008-10-23 01:44:56 UTC (rev 4617)
+++ remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MessageType.java	2008-10-23 02:04:40 UTC (rev 4618)
@@ -25,7 +25,7 @@
 /**
  * The type of a protocol message.
  */
-public enum MessageType {
+enum MessageType {
 
     // One-way request, no return value may be sent
     // Two-way request, return value is expected

Modified: remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexConfiguration.java
===================================================================
--- remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexConfiguration.java	2008-10-23 01:44:56 UTC (rev 4617)
+++ remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexConfiguration.java	2008-10-23 02:04:40 UTC (rev 4618)
@@ -29,7 +29,7 @@
 import org.jboss.marshalling.Configuration;
 
 /**
- *
+ * A configuration object for the multiplex protocol.
  */
 public final class MultiplexConfiguration {
     private MarshallerFactory marshallerFactory;
@@ -38,33 +38,70 @@
     private Executor executor;
     private BufferAllocator<ByteBuffer> allocator;
 
+    /**
+     * Construct a new instance.
+     */
     public MultiplexConfiguration() {
     }
 
+    /**
+     * Get the marshaller factory to use for messages transmitted and received by this multiplex connection.
+     *
+     * @return the marshaller factory
+     */
     public MarshallerFactory getMarshallerFactory() {
         return marshallerFactory;
     }
 
+    /**
+     * Set the marshaller factory to use for messages transmitted and received by this multiplex connection.
+     *
+     * @param marshallerFactory the marshaller factory
+     */
     public void setMarshallerFactory(final MarshallerFactory marshallerFactory) {
         this.marshallerFactory = marshallerFactory;
     }
 
+    /**
+     * Get the marshaller configuration to pass into the marshaller factory.
+     *
+     * @return the configuration
+     */
     public Configuration getMarshallingConfiguration() {
         return marshallingConfiguration;
     }
 
+    /**
+     * Set the marshaller configuration to pass into the marshaller factory.
+     *
+     * @param marshallingConfiguration the configuration
+     */
     public void setMarshallingConfiguration(final Configuration marshallingConfiguration) {
         this.marshallingConfiguration = marshallingConfiguration;
     }
 
+    /**
+     * Get the link metric to assign to this multiplex connection.
+     *
+     * @return the link metric
+     */
     public int getLinkMetric() {
         return linkMetric;
     }
 
+    /**
+     * Set the link metric to assign to this multiplex connection.
+     *
+     * @param linkMetric the link metric
+     */
     public void setLinkMetric(final int linkMetric) {
         this.linkMetric = linkMetric;
     }
 
+    /**
+     * Get the executor to use to execute
+     * @return
+     */
     public Executor getExecutor() {
         return executor;
     }

Modified: remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexHandler.java
===================================================================
--- remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexHandler.java	2008-10-23 01:44:56 UTC (rev 4617)
+++ remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexHandler.java	2008-10-23 02:04:40 UTC (rev 4618)
@@ -63,10 +63,8 @@
 
 /**
  * Protocol handler for the basic message-oriented Remoting protocol.
- *
- * @param <A> stream channel address type (Void if streams are not supported)
  */
-public final class MultiplexHandler implements IoHandler<AllocatedMessageChannel> {
+final class MultiplexHandler implements IoHandler<AllocatedMessageChannel> {
 
     private static final Logger log = Logger.getLogger(MultiplexHandler.class);
 

Modified: remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexProtocol.java
===================================================================
--- remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexProtocol.java	2008-10-23 01:44:56 UTC (rev 4617)
+++ remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/MultiplexProtocol.java	2008-10-23 02:04:40 UTC (rev 4618)
@@ -27,6 +27,7 @@
 import org.jboss.remoting.Endpoint;
 import org.jboss.remoting.spi.RequestHandlerSource;
 import org.jboss.remoting.spi.Handle;
+import org.jboss.remoting.spi.AbstractSimpleCloseable;
 import org.jboss.xnio.IoHandlerFactory;
 import org.jboss.xnio.ChannelSource;
 import org.jboss.xnio.IoFuture;
@@ -34,6 +35,7 @@
 import org.jboss.xnio.IoHandler;
 import org.jboss.xnio.channels.AllocatedMessageChannel;
 import java.io.IOException;
+import java.util.concurrent.Executor;
 
 /**
  *
@@ -75,4 +77,15 @@
             }
         };
     }
+
+    private abstract static class AbstractConnection extends AbstractSimpleCloseable {
+
+        protected AbstractConnection(final Executor executor) {
+            super(executor);
+        }
+
+        public String toString() {
+            return "connection <" + Integer.toString(hashCode()) + ">";
+        }
+    }
 }

Modified: remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/SimpleWriteHandler.java
===================================================================
--- remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/SimpleWriteHandler.java	2008-10-23 01:44:56 UTC (rev 4617)
+++ remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/SimpleWriteHandler.java	2008-10-23 02:04:40 UTC (rev 4618)
@@ -32,7 +32,7 @@
 /**
  *
  */
-public final class SimpleWriteHandler implements WriteHandler {
+final class SimpleWriteHandler implements WriteHandler {
     private static final Logger log = Logger.getLogger(SimpleWriteHandler.class);
 
     private final BufferAllocator<ByteBuffer> allocator;

Modified: remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/WriteHandler.java
===================================================================
--- remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/WriteHandler.java	2008-10-23 01:44:56 UTC (rev 4617)
+++ remoting3/trunk/protocol/multiplex/src/main/java/org/jboss/remoting/protocol/multiplex/WriteHandler.java	2008-10-23 02:04:40 UTC (rev 4618)
@@ -27,6 +27,6 @@
 /**
  *
  */
-public interface WriteHandler {
+interface WriteHandler {
     boolean handleWrite(WritableMessageChannel channel);
 }




More information about the jboss-remoting-commits mailing list