[jboss-remoting-commits] JBoss Remoting SVN: r4439 - in remoting3/trunk: api/src/main/java/org/jboss/cx/remoting/spi and 6 other directories.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Wed Jul 30 11:30:53 EDT 2008


Author: david.lloyd at jboss.com
Date: 2008-07-30 11:30:52 -0400 (Wed, 30 Jul 2008)
New Revision: 4439

Modified:
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/RequestContext.java
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractAutoCloseable.java
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractCloseable.java
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/Handle.java
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/RequestHandler.java
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/RequestHandlerSource.java
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/RequestContextWrapper.java
   remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientImpl.java
   remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientSourceImpl.java
   remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java
   remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/LocalRequestHandlerSource.java
   remoting3/trunk/core/src/test/java/org/jboss/cx/remoting/core/EndpointTestCase.java
   remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/StreamingRot13RequestListener.java
   remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/StringRot13RequestListener.java
   remoting3/trunk/standalone/src/main/java/org/jboss/cx/remoting/Remoting.java
Log:
More exception fiddling

Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -1,6 +1,7 @@
 package org.jboss.cx.remoting;
 
 import java.util.concurrent.ConcurrentMap;
+import java.io.IOException;
 import org.jboss.cx.remoting.spi.remote.RequestHandler;
 import org.jboss.cx.remoting.spi.remote.RequestHandlerSource;
 import org.jboss.cx.remoting.spi.remote.Handle;
@@ -36,9 +37,9 @@
      * @param <O> the reply type
      * @param requestListener the request listener
      * @return a handle for the client
-     * @throws RemotingException if an error occurs
+     * @throws IOException if an error occurs
      */
-    <I, O> Handle<RequestHandler> createRequestHandler(RequestListener<I, O> requestListener) throws RemotingException;
+    <I, O> Handle<RequestHandler> createRequestHandler(RequestListener<I, O> requestListener) throws IOException;
 
     /**
      * Create a request handler source that can be used to acquire clients associated with a request listener on this endpoint.
@@ -51,9 +52,9 @@
      * @param <O> the reply type
      * @param requestListener the request listener
      * @return a handle for the client source
-     * @throws RemotingException if an error occurs
+     * @throws IOException if an error occurs
      */
-    <I, O> Handle<RequestHandlerSource> createRequestHandlerSource(RequestListener<I, O> requestListener) throws RemotingException;
+    <I, O> Handle<RequestHandlerSource> createRequestHandlerSource(RequestListener<I, O> requestListener) throws IOException;
 
     /**
      * Create a client that uses the given request handler to handle its requests.
@@ -62,9 +63,9 @@
      * @param <O> the reply type
      * @param handler the request handler
      * @return the client
-     * @throws RemotingException if an error occurs
+     * @throws IOException if an error occurs
      */
-    <I, O> Client<I, O> createClient(RequestHandler handler) throws RemotingException;
+    <I, O> Client<I, O> createClient(RequestHandler handler) throws IOException;
 
     /**
      * Create a client source that uses the given request handler source to generate clients.
@@ -73,7 +74,7 @@
      * @param <O> the reply type
      * @param handlerSource the request handler source
      * @return the client source
-     * @throws RemotingException if an error occurs
+     * @throws IOException if an error occurs
      */
-    <I, O> ClientSource<I, O> createClientSource(RequestHandlerSource handlerSource) throws RemotingException;
+    <I, O> ClientSource<I, O> createClientSource(RequestHandlerSource handlerSource) throws IOException;
 }

Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/RequestContext.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/RequestContext.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/RequestContext.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -1,6 +1,7 @@
 package org.jboss.cx.remoting;
 
 import java.util.concurrent.Executor;
+import java.io.IOException;
 
 /**
  * The context of a single request.
@@ -26,10 +27,10 @@
      * Send a reply back to the caller.
      *
      * @param reply the reply to send
-     * @throws RemotingException if the transmission failed
+     * @throws IOException if the transmission failed
      * @throws IllegalStateException if a reply was already sent
      */
-    void sendReply(O reply) throws RemotingException, IllegalStateException;
+    void sendReply(O reply) throws IOException, IllegalStateException;
 
     /**
      * Send a failure message back to the caller.
@@ -37,18 +38,18 @@
      * @param msg a message describing the failure, if any (can be {@code null})
      * @param cause the failure cause, if any (can be {@code null})
      *
-     * @throws RemotingException if the transmission failed
+     * @throws IOException if the transmission failed
      * @throws IllegalStateException if a reply was already sent
      */
-    void sendFailure(String msg, Throwable cause) throws RemotingException, IllegalStateException;
+    void sendFailure(String msg, Throwable cause) throws IOException, IllegalStateException;
 
     /**
      * Send a cancellation message back to the client.
      *
-     * @throws RemotingException if the message could not be sent (the client could not be notified about the cancellation)
+     * @throws IOException if the message could not be sent (the client could not be notified about the cancellation)
      * @throws IllegalStateException if a reply was already sent
      */
-    void sendCancelled() throws RemotingException, IllegalStateException;
+    void sendCancelled() throws IOException, IllegalStateException;
 
     /**
      * Add a notifier to be called if a cancel request is received.  The notifier may be called from the current thread

Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractAutoCloseable.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractAutoCloseable.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractAutoCloseable.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -23,10 +23,9 @@
 package org.jboss.cx.remoting.spi;
 
 import java.util.concurrent.Executor;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.io.IOException;
 import org.jboss.cx.remoting.RemotingException;
-import org.jboss.cx.remoting.CloseHandler;
 import org.jboss.cx.remoting.spi.remote.Handle;
 import org.jboss.xnio.log.Logger;
 
@@ -54,9 +53,9 @@
     /**
      * Decrement the reference count by one.  If the count drops to zero, the resource is closed.
      *
-     * @throws RemotingException if the reference count dropped to zero and the close operation threw an exception
+     * @throws IOException if the reference count dropped to zero and the close operation threw an exception
      */
-    protected void dec() throws RemotingException {
+    protected void dec() throws IOException {
         final int v = refcount.decrementAndGet();
         if (v == 0) {
             // we dropped the refcount to zero
@@ -80,13 +79,13 @@
      *
      * @throws RemotingException if the resource is closed
      */
-    protected void inc() throws RemotingException {
+    protected void inc() throws IOException {
         final int v = refcount.getAndIncrement();
         log.trace("Raising reference count of %s to %d", this, Integer.valueOf(v + 1));
         if (v < 0) {
             // was already closed
             refcount.decrementAndGet();
-            throw new RemotingException("Resource is closed");
+            throw new IOException("Resource is closed");
         }
     }
 
@@ -97,17 +96,17 @@
      * @return the handle
      * @throws RemotingException if the resource is closed
      */
-    public Handle<T> getHandle() throws RemotingException {
+    public Handle<T> getHandle() throws IOException {
         return new HandleImpl();
     }
 
     private final class HandleImpl extends AbstractCloseable<Handle<T>> implements Handle<T> {
-        private HandleImpl() throws RemotingException {
+        private HandleImpl() throws IOException {
             super(AbstractAutoCloseable.this.executor);
             inc();
         }
 
-        protected void closeAction() throws RemotingException {
+        protected void closeAction() throws IOException {
             dec();
         }
 

Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractCloseable.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractCloseable.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractCloseable.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -35,6 +35,7 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.io.IOException;
 
 /**
  * A basic implementation of a closeable resource.  Use as a convenient base class for your closeable resources.
@@ -94,12 +95,12 @@
      *
      * @throws RemotingException if the close failed
      */
-    protected void closeAction() throws RemotingException {}
+    protected void closeAction() throws IOException {}
 
     /**
      * {@inheritDoc}
      */
-    public final void close() throws RemotingException {
+    public final void close() throws IOException {
         if (! closed.getAndSet(true)) {
             log.trace("Closed %s", this);
             synchronized (closeLock) {

Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/Handle.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/Handle.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/Handle.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -23,8 +23,8 @@
 package org.jboss.cx.remoting.spi.remote;
 
 import org.jboss.cx.remoting.Closeable;
-import org.jboss.cx.remoting.RemotingException;
 import org.jboss.cx.remoting.CloseHandler;
+import java.io.IOException;
 
 /**
  * A handle to a local resource.
@@ -41,9 +41,9 @@
     /**
      * Close this reference.
      *
-     * @throws RemotingException if the close failed
+     * @throws IOException if the close failed
      */
-    void close() throws RemotingException;
+    void close() throws IOException;
 
     /**
      * Add a handler that is invoked when this handle is closed.

Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/RequestHandler.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/RequestHandler.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/RequestHandler.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -25,6 +25,7 @@
 import org.jboss.cx.remoting.Closeable;
 import org.jboss.cx.remoting.RemotingException;
 import org.jboss.cx.remoting.CloseHandler;
+import java.io.IOException;
 
 /**
  * A request handler, which can be passed to remote endpoints.  Remote systems can then use the handler
@@ -59,9 +60,9 @@
      * warning of the leak.
      *
      * @return the handle
-     * @throws RemotingException if a handle could not be acquired
+     * @throws IOException if a handle could not be acquired
      */
-    Handle<RequestHandler> getHandle() throws RemotingException;
+    Handle<RequestHandler> getHandle() throws IOException;
 
     /**
      * Close this request handler.  The outcome of any outstanding requests is not defined, though implementations
@@ -69,7 +70,7 @@
      *
      * @throws RemotingException if the client endpoint could not be closed
      */
-    void close() throws RemotingException;
+    void close() throws IOException;
 
     /**
      * Add a handler that is called when the request handler is closed.

Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/RequestHandlerSource.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/RequestHandlerSource.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/RequestHandlerSource.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -25,6 +25,7 @@
 import org.jboss.cx.remoting.Closeable;
 import org.jboss.cx.remoting.RemotingException;
 import org.jboss.cx.remoting.CloseHandler;
+import java.io.IOException;
 
 /**
  * A request handler source, which can be passed to remote endpoints.  Remote systems can then use the handler source
@@ -40,7 +41,7 @@
      * @return a request handler
      * @throws RemotingException if a client could not be opened
      */
-    Handle<RequestHandler> createRequestHandler() throws RemotingException;
+    Handle<RequestHandler> createRequestHandler() throws IOException;
 
     /**
      * Get a handle to this request handler source.  The request handler source will not auto-close as long as there is at least
@@ -51,12 +52,12 @@
      * @return the handle
      * @throws RemotingException if a handle could not be acquired
      */
-    Handle<RequestHandlerSource> getHandle() throws RemotingException;
+    Handle<RequestHandlerSource> getHandle() throws IOException;
 
     /**
      * Close this request handler source immediately.
      */
-    void close() throws RemotingException;
+    void close() throws IOException;
 
     /**
      * Add a handler that is called when the request handler source is closed.

Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -1,8 +1,8 @@
 package org.jboss.cx.remoting.spi.wrapper;
 
 import java.util.concurrent.ConcurrentMap;
+import java.io.IOException;
 import org.jboss.cx.remoting.Endpoint;
-import org.jboss.cx.remoting.RemotingException;
 import org.jboss.cx.remoting.RequestListener;
 import org.jboss.cx.remoting.Client;
 import org.jboss.cx.remoting.ClientSource;
@@ -42,28 +42,28 @@
     /**
      * {@inheritDoc}  This implementation calls the same method on the delegate object.
      */
-    public <I, O> Handle<RequestHandler> createRequestHandler(final RequestListener<I, O> requestListener) throws RemotingException {
+    public <I, O> Handle<RequestHandler> createRequestHandler(final RequestListener<I, O> requestListener) throws IOException {
         return delegate.createRequestHandler(requestListener);
     }
 
     /**
      * {@inheritDoc}  This implementation calls the same method on the delegate object.
      */
-    public <I, O> Handle<RequestHandlerSource> createRequestHandlerSource(final RequestListener<I, O> requestListener) throws RemotingException {
+    public <I, O> Handle<RequestHandlerSource> createRequestHandlerSource(final RequestListener<I, O> requestListener) throws IOException {
         return delegate.createRequestHandlerSource(requestListener);
     }
 
     /**
      * {@inheritDoc}  This implementation calls the same method on the delegate object.
      */
-    public <I, O> Client<I, O> createClient(final RequestHandler handler) throws RemotingException {
+    public <I, O> Client<I, O> createClient(final RequestHandler handler) throws IOException {
         return delegate.createClient(handler);
     }
 
     /**
      * {@inheritDoc}  This implementation calls the same method on the delegate object.
      */
-    public <I, O> ClientSource<I, O> createClientSource(final RequestHandlerSource handlerSource) throws RemotingException {
+    public <I, O> ClientSource<I, O> createClientSource(final RequestHandlerSource handlerSource) throws IOException {
         return delegate.createClientSource(handlerSource);
     }
 }

Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/RequestContextWrapper.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/RequestContextWrapper.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/RequestContextWrapper.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -4,6 +4,7 @@
 import org.jboss.cx.remoting.RequestCancelHandler;
 import org.jboss.cx.remoting.RequestContext;
 import org.jboss.cx.remoting.ClientContext;
+import java.io.IOException;
 
 /**
  * A simple delegating wrapper for request context instances.
@@ -39,21 +40,21 @@
     /**
      * {@inheritDoc}  This implementation calls the same method on the delegate object.
      */
-    public void sendReply(O reply) throws RemotingException, IllegalStateException {
+    public void sendReply(O reply) throws IOException, IllegalStateException {
         delegate.sendReply(reply);
     }
 
     /**
      * {@inheritDoc}  This implementation calls the same method on the delegate object.
      */
-    public void sendFailure(String msg, Throwable cause) throws RemotingException, IllegalStateException {
+    public void sendFailure(String msg, Throwable cause) throws IOException, IllegalStateException {
         delegate.sendFailure(msg, cause);
     }
 
     /**
      * {@inheritDoc}  This implementation calls the same method on the delegate object.
      */
-    public void sendCancelled() throws RemotingException, IllegalStateException {
+    public void sendCancelled() throws IOException, IllegalStateException {
         delegate.sendCancelled();
     }
 

Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientImpl.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientImpl.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientImpl.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -45,7 +45,7 @@
         this.handle = handle;
     }
 
-    protected void closeAction() throws RemotingException {
+    protected void closeAction() throws IOException {
         handle.close();
     }
 

Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientSourceImpl.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientSourceImpl.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientSourceImpl.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -31,6 +31,7 @@
 import org.jboss.cx.remoting.spi.remote.Handle;
 import org.jboss.cx.remoting.spi.AbstractCloseable;
 import org.jboss.xnio.IoUtils;
+import java.io.IOException;
 
 /**
  *
@@ -46,11 +47,11 @@
         this.endpoint = endpoint;
     }
 
-    protected void closeAction() throws RemotingException {
+    protected void closeAction() throws IOException {
         handle.close();
     }
 
-    public Client<I, O> createClient() throws RemotingException {
+    public Client<I, O> createClient() throws IOException {
         if (! isOpen()) {
             throw new RemotingException("Client source is not open");
         }

Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -7,9 +7,9 @@
 import java.util.concurrent.TimeUnit;
 import java.util.Set;
 import java.io.Closeable;
+import java.io.IOException;
 import org.jboss.cx.remoting.Endpoint;
 import org.jboss.cx.remoting.RequestListener;
-import org.jboss.cx.remoting.RemotingException;
 import org.jboss.cx.remoting.CloseHandler;
 import org.jboss.cx.remoting.Client;
 import org.jboss.cx.remoting.ClientSource;
@@ -121,23 +121,23 @@
         return endpointMap;
     }
 
-    public <I, O> Handle<RequestHandler> createRequestHandler(final RequestListener<I, O> requestListener) throws RemotingException {
+    public <I, O> Handle<RequestHandler> createRequestHandler(final RequestListener<I, O> requestListener) throws IOException {
         final LocalRequestHandler<I, O> localRequestHandler = new LocalRequestHandler<I, O>(executor, requestListener);
         localRequestHandler.addCloseHandler(remover);
         localRequestHandler.open();
         return localRequestHandler.getHandle();
     }
 
-    public <I, O> Handle<RequestHandlerSource> createRequestHandlerSource(final RequestListener<I, O> requestListener) throws RemotingException {
+    public <I, O> Handle<RequestHandlerSource> createRequestHandlerSource(final RequestListener<I, O> requestListener) throws IOException {
         final LocalRequestHandlerSource<I, O> localRequestHandlerSource = new LocalRequestHandlerSource<I, O>(executor, requestListener);
         localRequestHandlerSource.addCloseHandler(remover);
         localRequestHandlerSource.open();
         return localRequestHandlerSource.getHandle();
     }
 
-    public <I, O> Client<I, O> createClient(final RequestHandler endpoint) throws RemotingException {
+    public <I, O> Client<I, O> createClient(final RequestHandler requestHandler) throws IOException {
         boolean ok = false;
-        final Handle<RequestHandler> handle = endpoint.getHandle();
+        final Handle<RequestHandler> handle = requestHandler.getHandle();
         try {
             final ClientImpl<I, O> client = new ClientImpl<I, O>(handle, executor);
             client.addCloseHandler(new CloseHandler<Client<I, O>>() {
@@ -154,7 +154,7 @@
         }
     }
 
-    public <I, O> ClientSource<I, O> createClientSource(final RequestHandlerSource requestHandlerSource) throws RemotingException {
+    public <I, O> ClientSource<I, O> createClientSource(final RequestHandlerSource requestHandlerSource) throws IOException {
         boolean ok = false;
         final Handle<RequestHandlerSource> handle = requestHandlerSource.getHandle();
         try {

Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/LocalRequestHandlerSource.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/LocalRequestHandlerSource.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/LocalRequestHandlerSource.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -31,6 +31,7 @@
 import org.jboss.cx.remoting.CloseHandler;
 import org.jboss.xnio.log.Logger;
 import java.util.concurrent.Executor;
+import java.io.IOException;
 
 /**
  *
@@ -50,7 +51,7 @@
         serviceContext = new ServiceContextImpl(executor);
     }
 
-    public Handle<RequestHandler> createRequestHandler() throws RemotingException {
+    public Handle<RequestHandler> createRequestHandler() throws IOException {
         if (isOpen()) {
             final LocalRequestHandler<I, O> localRequestHandler = new LocalRequestHandler<I, O>(executor, this, requestListener);
             localRequestHandler.open();

Modified: remoting3/trunk/core/src/test/java/org/jboss/cx/remoting/core/EndpointTestCase.java
===================================================================
--- remoting3/trunk/core/src/test/java/org/jboss/cx/remoting/core/EndpointTestCase.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/core/src/test/java/org/jboss/cx/remoting/core/EndpointTestCase.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -27,12 +27,12 @@
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.io.IOException;
 import org.jboss.cx.remoting.AbstractRequestListener;
 import org.jboss.cx.remoting.RequestContext;
 import org.jboss.cx.remoting.RemoteExecutionException;
 import org.jboss.cx.remoting.CloseHandler;
 import org.jboss.cx.remoting.Client;
-import org.jboss.cx.remoting.RemotingException;
 import org.jboss.cx.remoting.test.support.LoggingHelper;
 import org.jboss.cx.remoting.spi.remote.RequestHandler;
 import org.jboss.cx.remoting.spi.remote.Handle;
@@ -84,10 +84,10 @@
                         assertEquals(request, requestObj);
                         try {
                             context.sendReply(replyObj);
-                        } catch (RemotingException e) {
+                        } catch (IOException e) {
                             try {
                                 context.sendFailure(e.getMessage(), e);
-                            } catch (RemotingException e1) {
+                            } catch (IOException e1) {
                                 fail("double fault");
                             }
                         }
@@ -143,10 +143,10 @@
                         assertEquals(request, requestObj);
                         try {
                             context.sendReply(replyObj);
-                        } catch (RemotingException e) {
+                        } catch (IOException e) {
                             try {
                                 context.sendFailure(e.getMessage(), e);
-                            } catch (RemotingException e1) {
+                            } catch (IOException e1) {
                                 fail("double fault");
                             }
                         }

Modified: remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/StreamingRot13RequestListener.java
===================================================================
--- remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/StreamingRot13RequestListener.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/StreamingRot13RequestListener.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -4,7 +4,6 @@
 import java.io.Reader;
 import org.jboss.cx.remoting.AbstractRequestListener;
 import org.jboss.cx.remoting.RemoteExecutionException;
-import org.jboss.cx.remoting.RemotingException;
 import org.jboss.cx.remoting.RequestContext;
 
 /**
@@ -40,7 +39,7 @@
                     request.close();
                 }
             });
-        } catch (RemotingException e) {
+        } catch (IOException e) {
             throw new RemoteExecutionException("Failed to send reply", e);
         }
     }

Modified: remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/StringRot13RequestListener.java
===================================================================
--- remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/StringRot13RequestListener.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/StringRot13RequestListener.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -2,8 +2,8 @@
 
 import org.jboss.cx.remoting.AbstractRequestListener;
 import org.jboss.cx.remoting.RemoteExecutionException;
-import org.jboss.cx.remoting.RemotingException;
 import org.jboss.cx.remoting.RequestContext;
+import java.io.IOException;
 
 /**
  *
@@ -17,7 +17,7 @@
                 b.append(rot13(request.charAt(i)));
             }
             readerRequestContext.sendReply(b.toString());
-        } catch (RemotingException e) {
+        } catch (IOException e) {
             throw new RemoteExecutionException("Failed to send reply", e);
         }
     }

Modified: remoting3/trunk/standalone/src/main/java/org/jboss/cx/remoting/Remoting.java
===================================================================
--- remoting3/trunk/standalone/src/main/java/org/jboss/cx/remoting/Remoting.java	2008-07-29 19:54:18 UTC (rev 4438)
+++ remoting3/trunk/standalone/src/main/java/org/jboss/cx/remoting/Remoting.java	2008-07-30 15:30:52 UTC (rev 4439)
@@ -32,7 +32,7 @@
         }
     }
 
-    public static <I, O> Client<I, O> createLocalClient(Endpoint endpoint, RequestListener<I, O> requestListener) throws RemotingException {
+    public static <I, O> Client<I, O> createLocalClient(Endpoint endpoint, RequestListener<I, O> requestListener) throws IOException {
         final Handle<RequestHandler> handle = endpoint.createRequestHandler(requestListener);
         try {
             return endpoint.createClient(handle.getResource());
@@ -41,7 +41,7 @@
         }
     }
 
-    public static <I, O> ClientSource<I, O> createLocalClientSource(Endpoint endpoint, RequestListener<I, O> requestListener) throws RemotingException {
+    public static <I, O> ClientSource<I, O> createLocalClientSource(Endpoint endpoint, RequestListener<I, O> requestListener) throws IOException {
         final Handle<RequestHandlerSource> handle = endpoint.createRequestHandlerSource(requestListener);
         try {
             return endpoint.createClientSource(handle.getResource());




More information about the jboss-remoting-commits mailing list