[jboss-remoting-commits] JBoss Remoting SVN: r5573 - in remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3: spi and 1 other directory.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Fri Oct 30 18:18:09 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-10-30 18:18:09 -0400 (Fri, 30 Oct 2009)
New Revision: 5573

Added:
   remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerContext.java
Removed:
   remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionContext.java
Modified:
   remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
   remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java
Log:
Rename ConnectionContext to ConnectionHandlerContext for consistency

Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java	2009-10-28 01:44:11 UTC (rev 5572)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java	2009-10-30 22:18:09 UTC (rev 5573)
@@ -46,7 +46,7 @@
 import org.jboss.remoting3.spi.RequestHandler;
 import org.jboss.remoting3.spi.RequestHandlerConnector;
 import org.jboss.remoting3.spi.ConnectionProviderRegistration;
-import org.jboss.remoting3.spi.ConnectionContext;
+import org.jboss.remoting3.spi.ConnectionHandlerContext;
 import org.jboss.xnio.log.Logger;
 import org.jboss.xnio.Cancellable;
 import org.jboss.xnio.FailedIoFuture;
@@ -564,7 +564,7 @@
         }
     }
 
-    private final class LocalConnectionContext implements ConnectionContext {
+    private final class LocalConnectionContext implements ConnectionHandlerContext {
         private final Connection connection;
 
         LocalConnectionContext(final Connection connection) {
@@ -667,13 +667,13 @@
 
     private final ConnectionHandler loopbackConnectionHandler = new LoopbackConnectionHandler();
     private final Connection loopbackConnection = new LoopbackConnection();
-    private final ConnectionContext localConnectionContext = new LocalConnectionContext(loopbackConnection);
+    private final ConnectionHandlerContext localConnectionContext = new LocalConnectionContext(loopbackConnection);
 
     private final class LocalConnectionProvider implements ConnectionProvider<Void> {
 
         public Cancellable connect(final URI uri, final OptionMap connectOptions, final Result<ConnectionHandlerFactory> result) throws IllegalArgumentException {
             result.setResult(new ConnectionHandlerFactory() {
-                public ConnectionHandler createInstance(final ConnectionContext context) {
+                public ConnectionHandler createInstance(final ConnectionHandlerContext context) {
                     return loopbackConnectionHandler;
                 }
             });
@@ -748,7 +748,7 @@
     private class LoopbackConnectionHandler implements ConnectionHandler {
 
         public Cancellable open(final String serviceType, final String groupName, final org.jboss.xnio.Result<RequestHandler> result) {
-            localConnectionContext.openService(serviceType, groupName, OptionMap.EMPTY, new ConnectionContext.ServiceResult() {
+            localConnectionContext.openService(serviceType, groupName, OptionMap.EMPTY, new ConnectionHandlerContext.ServiceResult() {
                 public void opened(final RequestHandler requestHandler, final OptionMap optionMap) {
                     result.setResult(requestHandler);
                 }

Deleted: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionContext.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionContext.java	2009-10-28 01:44:11 UTC (rev 5572)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionContext.java	2009-10-30 22:18:09 UTC (rev 5573)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, 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.remoting3.spi;
-
-import org.jboss.xnio.OptionMap;
-
-/**
- * The context for connections to service incoming requests to open a client service.
- *
- * @remoting.consume
- */
-public interface ConnectionContext {
-
-    /**
-     * Open a service.
-     *
-     * @remoting.nonblocking
-     *
-     * @param serviceType the service type
-     * @param groupName the service group name
-     * @param optionMap the open options
-     * @param serviceResult the result of the service open
-     */
-    void openService(String serviceType, String groupName, OptionMap optionMap, ServiceResult serviceResult);
-
-    /**
-     * Indicate that the remote side has terminated the connection, so the local side should be closed as well.
-     *
-     * @remoting.nonblocking
-     */
-    void remoteClosed();
-
-    /**
-     * The result acceptor for a service open request.
-     */
-    interface ServiceResult {
-
-        /**
-         * Called if the service was opened.
-         *
-         * @param requestHandler the opened request handler
-         * @param optionMap the service's option map
-         */
-        void opened(RequestHandler requestHandler, OptionMap optionMap);
-
-        /**
-         * Called if no matching service was found.
-         */
-        void notFound();
-    }
-}

Copied: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerContext.java (from rev 5572, remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionContext.java)
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerContext.java	                        (rev 0)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerContext.java	2009-10-30 22:18:09 UTC (rev 5573)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3.spi;
+
+import org.jboss.xnio.OptionMap;
+
+/**
+ * The context for connections to service incoming requests to open a client service.
+ *
+ * @remoting.consume
+ */
+public interface ConnectionHandlerContext {
+
+    /**
+     * Open a service.
+     *
+     * @remoting.nonblocking
+     *
+     * @param serviceType the service type
+     * @param groupName the service group name
+     * @param optionMap the open options
+     * @param serviceResult the result of the service open
+     */
+    void openService(String serviceType, String groupName, OptionMap optionMap, ServiceResult serviceResult);
+
+    /**
+     * Indicate that the remote side has terminated the connection, so the local side should be closed as well.
+     *
+     * @remoting.nonblocking
+     */
+    void remoteClosed();
+
+    /**
+     * The result acceptor for a service open request.
+     */
+    interface ServiceResult {
+
+        /**
+         * Called if the service was opened.
+         *
+         * @param requestHandler the opened request handler
+         * @param optionMap the service's option map
+         */
+        void opened(RequestHandler requestHandler, OptionMap optionMap);
+
+        /**
+         * Called if no matching service was found.
+         */
+        void notFound();
+    }
+}

Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java	2009-10-28 01:44:11 UTC (rev 5572)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java	2009-10-30 22:18:09 UTC (rev 5573)
@@ -36,5 +36,5 @@
      * @param connectionContext the local connection handler for incoming requests
      * @return the connection handler for outgoing requests
      */
-    ConnectionHandler createInstance(ConnectionContext connectionContext);
+    ConnectionHandler createInstance(ConnectionHandlerContext connectionContext);
 }



More information about the jboss-remoting-commits mailing list