mirror of https://github.com/apache/jclouds.git
Issue 297: made ssh optional in case we are in gae and we cannot invoke network sockets
This commit is contained in:
parent
714a459796
commit
20f1a75606
|
@ -18,6 +18,8 @@
|
|||
*/
|
||||
package org.jclouds.compute;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.jclouds.compute.internal.UtilsImpl;
|
||||
import org.jclouds.ssh.SshClient;
|
||||
|
||||
|
@ -29,7 +31,9 @@ import com.google.inject.ImplementedBy;
|
|||
*/
|
||||
@ImplementedBy(UtilsImpl.class)
|
||||
public interface Utils extends org.jclouds.rest.Utils {
|
||||
@Nullable
|
||||
SshClient.Factory getSshClientFactory();
|
||||
|
||||
@Nullable
|
||||
SshClient.Factory sshFactory();
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.jclouds.compute.internal;
|
|||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
|
@ -31,27 +30,27 @@ import org.jclouds.encryption.EncryptionService;
|
|||
import org.jclouds.logging.Logger.LoggerFactory;
|
||||
import org.jclouds.rest.HttpAsyncClient;
|
||||
import org.jclouds.rest.HttpClient;
|
||||
import org.jclouds.ssh.SshClient;
|
||||
import org.jclouds.ssh.SshClient.Factory;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Singleton
|
||||
public class UtilsImpl extends org.jclouds.rest.internal.UtilsImpl implements Utils {
|
||||
|
||||
private final Factory sshFactory;
|
||||
@Inject(optional = true)
|
||||
private Factory sshFactory;
|
||||
|
||||
@Inject
|
||||
UtilsImpl(HttpClient simpleClient, HttpAsyncClient simpleAsyncClient,
|
||||
EncryptionService encryption, DateService date,
|
||||
@Named(Constants.PROPERTY_USER_THREADS) ExecutorService userThreads,
|
||||
@Named(Constants.PROPERTY_IO_WORKER_THREADS) ExecutorService ioThreads,
|
||||
LoggerFactory loggerFactory, SshClient.Factory sshFactory) {
|
||||
LoggerFactory loggerFactory) {
|
||||
super(simpleClient, simpleAsyncClient, encryption, date, userThreads, ioThreads,
|
||||
loggerFactory);
|
||||
this.sshFactory = sshFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue