aboutsummaryrefslogtreecommitdiffstats
path: root/sshlib/src/main/java/com/trilead/ssh2/ProxyData.java
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2015-10-08 11:30:36 -0700
committerKenny Root <kenny@the-b.org>2015-10-08 11:30:36 -0700
commit39aef25501455b50fff7e0cb3ddf5399ab4bfc29 (patch)
tree78ef34471bddab8095174b427c5eb9618352e962 /sshlib/src/main/java/com/trilead/ssh2/ProxyData.java
parent5554072bac14a79a792fab0e890e888cc69ff98a (diff)
parentbd9f683112c37baef10fd5514ec2dfd571d0c0dc (diff)
downloadsshlib-39aef25501455b50fff7e0cb3ddf5399ab4bfc29.tar.gz
sshlib-39aef25501455b50fff7e0cb3ddf5399ab4bfc29.tar.bz2
sshlib-39aef25501455b50fff7e0cb3ddf5399ab4bfc29.zip
Merge pull request #5 from kruton/indirect-proxy
Allow indirect proxy classes to implement their own functions
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;
}