01: /*
02: * ====================================================================
03: * Copyright (c) 2004-2008 TMate Software Ltd. All rights reserved.
04: *
05: * This software is licensed as described in the file COPYING, which
06: * you should have received as part of this distribution. The terms
07: * are also available at http://svnkit.com/license.html
08: * If newer versions of this license are posted there, you may use a
09: * newer version instead, at your option.
10: * ====================================================================
11: */
12: package org.tmatesoft.svn.core.io;
13:
14: import org.tmatesoft.svn.core.SVNURL;
15: import org.tmatesoft.svn.core.internal.io.svn.ISVNConnector;
16:
17: /**
18: * The <b>ISVNTunnelProvider</b> is the interface for
19: * providers of tunnel command lines matching a specific
20: * <code>"svn+xxx"</code> tunnel scheme.
21: *
22: * <p>
23: * With Subversion you may put your own URL scheme into the
24: * <code>config</code> file under the <code>tunnels</code>
25: * section like this:
26: * <pre class="javacode">
27: * ssh = $SVN_SSH ...
28: * rsh = $SVN_RSH ...
29: * ...</pre>
30: * The idea of this tunnel provider interface is the same:
31: * given a subprotocol name (a string following <code>svn+</code>,
32: * like <code>ssh</code>) a provider returns a command string
33: * (like <code>$SVN_SSH ...</code>).
34: *
35: * <p>
36: * A tunnel provider is passed to an <b>SVNRepository</b> driver
37: * that is expected to work through a tunnel (see {@link SVNRepository#setTunnelProvider(ISVNTunnelProvider)
38: * SVNRepository.setTunnelProvider()}). Just as you instantiate an <b>SVNRepository</b> object
39: * set it to use your tunnel provider.
40: *
41: * <p>
42: * If you would like to use tunnel scheme definitions from the
43: * standard Subversion <code>config</code> file, you may use
44: * a default provider implementation which is a default options
45: * driver you get calling a <b>createDefaultOptions()</b> method
46: * of the {@link org.tmatesoft.svn.core.wc.SVNWCUtil} class.
47: *
48: * @version 1.1.1
49: * @author TMate Software Ltd.
50: */
51: public interface ISVNTunnelProvider {
52:
53: /**
54: * Returns a tunnel comand line matching the given subprotocol
55: * name.
56: *
57: * @param location
58: * @return a tunnel command line
59: */
60: public ISVNConnector createTunnelConnector(SVNURL location);
61: }
|