Author: david.lloyd(a)jboss.com
Date: 2010-04-20 12:13:06 -0400 (Tue, 20 Apr 2010)
New Revision: 5850
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionProvider.java
Log:
Add notifier for detecting connect failure
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionProvider.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionProvider.java 2010-04-12
15:52:21 UTC (rev 5849)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionProvider.java 2010-04-20
16:13:06 UTC (rev 5850)
@@ -22,6 +22,7 @@
package org.jboss.remoting3.remote;
+import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.URI;
@@ -86,6 +87,11 @@
result.setException(e);
return IoUtils.nullCancellable();
}
+ futureChannel.addNotifier(new
IoFuture.HandlingNotifier<ConnectedStreamChannel,
Result<ConnectionHandlerFactory>>() {
+ public void handleFailed(final IOException exception, final
Result<ConnectionHandlerFactory> attachment) {
+ attachment.setException(exception);
+ }
+ }, result);
return futureChannel;
}
Show replies by date