public int getConnectTimeout(SVNURL url) { String protocol = url.getProtocol(); if ("http".equals(protocol) || "https".equals(protocol)) { return 60 * 1000; } return 0; }
/** * Helper function to return a complex scheme - a conjunction of 'svn' and the underlying protocol. * * @return 'svn+'protocol */ protected String getProtocol() { final StringBuffer buffer = new StringBuffer(4 + remoteRepository.getProtocol().length()); buffer.append("svn+").append(remoteRepository.getProtocol()); return buffer.toString(); }
public int getConnectTimeout(SVNRepository repository) { String protocol = repository.getLocation().getProtocol(); if ("http".equals(protocol) || "https".equals(protocol)) { return 60*1000; } return 0; }
public HTTPConnection(SVNRepository repository, String charset, File spoolDirectory, boolean spoolAll) throws SVNException { myRepository = repository; myCharset = charset; myHost = repository.getLocation().setPath("", false); myIsSecured = "https".equalsIgnoreCase(myHost.getProtocol()); myIsSpoolAll = spoolAll; mySpoolDirectory = spoolDirectory; myNextRequestTimeout = Long.MAX_VALUE; }
public HTTPConnection(SVNRepository repository, String charset, File spoolDirectory, boolean spoolAll) throws SVNException { myRepository = repository; myCharset = charset; myHost = repository.getLocation().setPath("", false); myIsSecured = "https".equalsIgnoreCase(myHost.getProtocol()); myIsSpoolAll = spoolAll; mySpoolDirectory = spoolDirectory; myNextRequestTimeout = -1; }
public ISVNConnector createTunnelConnector(SVNURL url) { String subProtocolName = url.getProtocol().substring("svn+".length()); if (subProtocolName == null) { return null; } Map tunnels = getConfigFile().getProperties("tunnels"); final String tunnel = (String)tunnels.get(subProtocolName); if (tunnel == null) { return null; } return new SVNTunnelConnector(subProtocolName, tunnel); }
public ISVNConnector createTunnelConnector(SVNURL url) { String subProtocolName = url.getProtocol().substring("svn+".length()); if (subProtocolName == null) { return null; } Map tunnels = getConfigFile().getProperties("tunnels"); final String tunnel = (String)tunnels.get(subProtocolName); if (tunnel == null) { return null; } return new SVNTunnelConnector(subProtocolName, tunnel); }
private static String getFullRealmName(SVNURL location, String realm) { if (location == null || realm == null) { return realm; } return "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + "> " + realm; }
public HTTPConnection(SVNRepository repository) throws SVNException { myRepository = repository; myHost = repository.getLocation().setPath("", false); myIsSecured = "https".equalsIgnoreCase(myHost.getProtocol()); myIsKeepAlive = repository.getOptions().keepConnection(repository); }
@Nullable @Override public RepositoryInfo getRepository(@NotNull SVNURL url) throws SVNException { final Map.Entry<String, GitLabProject> entry = RepositoryListMapping.getMapped(mapping, url.getPath()); if (entry != null && entry.getValue().isReady()) { return new RepositoryInfo( SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort() == SVNURL.getDefaultPortNumber(url.getProtocol()) ? -1 : url.getPort(), entry.getKey(), true), entry.getValue().getRepository() ); } return null; }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
private HTTPSSLKeyManager createKeyManager() { if (!myIsSecured) { return null; } SVNURL location = myRepository.getLocation(); ISVNAuthenticationManager authManager = myRepository.getAuthenticationManager(); String sslRealm = "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + ">"; return new HTTPSSLKeyManager(authManager, sslRealm, location); }
/** * Returns a string representing a decoded url. * * @return a decoded url string */ public String toDecodedString() { return composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getPath()); }
private HTTPSSLKeyManager createKeyManager() { if (!myIsSecured) { return null; } SVNURL location = myRepository.getLocation(); ISVNAuthenticationManager authManager = myRepository.getAuthenticationManager(); String sslRealm = "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + ">"; return new HTTPSSLKeyManager(authManager, sslRealm, location); }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
/** * Returns a string representing a decoded url. * * @return a decoded url string */ public String toDecodedString() { return composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getPath()); }
private HTTPSSLKeyManager createKeyManager() { if (!myIsSecured) { return null; } SVNURL location = myRepository.getLocation(); ISVNAuthenticationManager authManager = myRepository.getAuthenticationManager(); String sslRealm = "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + ">"; return new HTTPSSLKeyManager(authManager, sslRealm, location); }
/** * Returns a string representing a decoded url. * * @return a decoded url string */ public String toDecodedString() { return composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getPath()); }
/** * Constructs a new <b>SVNURL</b> representation removing a tail path * segment from the path component of this representation. * * @return a new <b>SVNURL</b> representation */ public SVNURL removePathTail() throws SVNException { String newPath = SVNPathUtil.removeTail(myPath); String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), newPath); return parseURIDecoded(url); } /**