aboutsummaryrefslogtreecommitdiffstats
path: root/sshlib/src/main/java/com/trilead/ssh2/ProxyData.java
diff options
context:
space:
mode:
Diffstat (limited to 'sshlib/src/main/java/com/trilead/ssh2/ProxyData.java')
-rw-r--r--sshlib/src/main/java/com/trilead/ssh2/ProxyData.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/sshlib/src/main/java/com/trilead/ssh2/ProxyData.java b/sshlib/src/main/java/com/trilead/ssh2/ProxyData.java
index 059a6e3..864d7a0 100644
--- a/sshlib/src/main/java/com/trilead/ssh2/ProxyData.java
+++ b/sshlib/src/main/java/com/trilead/ssh2/ProxyData.java
@@ -1,8 +1,11 @@
package com.trilead.ssh2;
+import java.io.IOException;
+import java.net.Socket;
+
/**
- * An abstract marker interface implemented by all proxy data implementations.
+ * An abstract interface implemented by all proxy data implementations.
*
* @see HTTPProxyData
*
@@ -10,6 +13,16 @@ package com.trilead.ssh2;
* @version $Id: ProxyData.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
*/
-public abstract interface ProxyData
+public interface ProxyData
{
+ /**
+ * Connects the socket to the given destination using the proxy method that this instance
+ * represents.
+ * @param hostname hostname of end host (not proxy)
+ * @param port port of end host (not proxy)
+ * @param connectTimeout number of seconds before giving up on connecting to end host
+ * @throws IOException if the connection could not be completed
+ * @return connected socket instance
+ */
+ Socket openConnection(String hostname, int port, int connectTimeout) throws IOException;
}