From 95c35487f09eb5f4801cae3749bd087111fab4b8 Mon Sep 17 00:00:00 2001 From: Aled Sage Date: Thu, 5 Jul 2012 16:00:29 +0100 Subject: [PATCH] Issue 1004: changes default SocketOpen impl Sets it to InetSocketAddressConnect, instead of SocketOpenUnsupported. Removes overriding the impl from Jsch and Sshj's client modules. --- core/src/main/java/org/jclouds/predicates/SocketOpen.java | 2 +- .../java/org/jclouds/ssh/jsch/config/JschSshClientModule.java | 3 --- .../main/java/org/jclouds/sshj/config/SshjSshClientModule.java | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/core/src/main/java/org/jclouds/predicates/SocketOpen.java b/core/src/main/java/org/jclouds/predicates/SocketOpen.java index b3b380fdb4..3c6a30e21a 100644 --- a/core/src/main/java/org/jclouds/predicates/SocketOpen.java +++ b/core/src/main/java/org/jclouds/predicates/SocketOpen.java @@ -28,7 +28,7 @@ import com.google.inject.ImplementedBy; * * @author Adrian Cole */ -@ImplementedBy(SocketOpenUnsupported.class) +@ImplementedBy(InetSocketAddressConnect.class) public interface SocketOpen extends Predicate { } diff --git a/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/config/JschSshClientModule.java b/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/config/JschSshClientModule.java index a8f4cd7a9f..7c1650f924 100644 --- a/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/config/JschSshClientModule.java +++ b/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/config/JschSshClientModule.java @@ -24,8 +24,6 @@ import org.jclouds.Constants; import org.jclouds.domain.Credentials; import org.jclouds.domain.LoginCredentials; import org.jclouds.http.handlers.BackoffLimitedRetryHandler; -import org.jclouds.predicates.InetSocketAddressConnect; -import org.jclouds.predicates.SocketOpen; import org.jclouds.ssh.ConfiguresSshClient; import org.jclouds.ssh.SshClient; import org.jclouds.ssh.jsch.JschSshClient; @@ -45,7 +43,6 @@ public class JschSshClientModule extends AbstractModule { protected void configure() { bind(SshClient.Factory.class).to(Factory.class).in(Scopes.SINGLETON); - bind(SocketOpen.class).to(InetSocketAddressConnect.class).in(Scopes.SINGLETON); } private static class Factory implements SshClient.Factory { diff --git a/drivers/sshj/src/main/java/org/jclouds/sshj/config/SshjSshClientModule.java b/drivers/sshj/src/main/java/org/jclouds/sshj/config/SshjSshClientModule.java index b49b6b43a5..4083ec754a 100644 --- a/drivers/sshj/src/main/java/org/jclouds/sshj/config/SshjSshClientModule.java +++ b/drivers/sshj/src/main/java/org/jclouds/sshj/config/SshjSshClientModule.java @@ -24,8 +24,6 @@ import org.jclouds.Constants; import org.jclouds.domain.Credentials; import org.jclouds.domain.LoginCredentials; import org.jclouds.http.handlers.BackoffLimitedRetryHandler; -import org.jclouds.predicates.InetSocketAddressConnect; -import org.jclouds.predicates.SocketOpen; import org.jclouds.ssh.ConfiguresSshClient; import org.jclouds.ssh.SshClient; import org.jclouds.sshj.SshjSshClient; @@ -45,7 +43,6 @@ public class SshjSshClientModule extends AbstractModule { protected void configure() { bind(SshClient.Factory.class).to(Factory.class).in(Scopes.SINGLETON); - bind(SocketOpen.class).to(InetSocketAddressConnect.class).in(Scopes.SINGLETON); } private static class Factory implements SshClient.Factory {