public static HttpClient createConnection(final String scheme, final String hostname, final int port, final String username, final String password, final FileSystemOptions fileSystemOptions) throws FileSystemException { return createConnection(HttpFileSystemConfigBuilder.getInstance(), scheme, hostname, port, username, password, fileSystemOptions); }
public static HttpClient createConnection(final String scheme, final String hostname, final int port, final String username, final String password, final FileSystemOptions fileSystemOptions) throws FileSystemException { return createConnection(HttpFileSystemConfigBuilder.getInstance(), scheme, hostname, port, username, password, fileSystemOptions); }
public static HttpClient createConnection(final String scheme, final String hostname, final int port, final String username, final String password, final FileSystemOptions fileSystemOptions) throws FileSystemException { return createConnection(HttpFileSystemConfigBuilder.getInstance(), scheme, hostname, port, username, password, fileSystemOptions); }
/** * Creates a {@link FileSystem}. */ @Override protected FileSystem doCreateFileSystem(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { // Create the file system final GenericFileName rootName = (GenericFileName) name; UserAuthenticationData authData = null; HttpClient httpClient; try { authData = UserAuthenticatorUtils.authenticate(fileSystemOptions, AUTHENTICATOR_TYPES); final String fileScheme = rootName.getScheme(); final char lastChar = fileScheme.charAt(fileScheme.length() - 1); final String internalScheme = (lastChar == 's' || lastChar == 'S') ? "https" : "http"; httpClient = HttpClientFactory.createConnection(internalScheme, rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName()))), UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword()))), fileSystemOptions); } finally { UserAuthenticatorUtils.cleanup(authData); } return new HttpFileSystem(rootName, httpClient, fileSystemOptions); }
/** * Creates a {@link FileSystem}. */ @Override protected FileSystem doCreateFileSystem(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { // Create the file system final GenericFileName rootName = (GenericFileName) name; UserAuthenticationData authData = null; HttpClient httpClient; try { authData = UserAuthenticatorUtils.authenticate(fileSystemOptions, AUTHENTICATOR_TYPES); httpClient = HttpClientFactory.createConnection(rootName.getScheme(), rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName()))), UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword()))), fileSystemOptions); } finally { UserAuthenticatorUtils.cleanup(authData); } return new HttpFileSystem(rootName, httpClient, fileSystemOptions); }
/** * Creates a {@link FileSystem}. */ @Override protected FileSystem doCreateFileSystem(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { // Create the file system final GenericFileName rootName = (GenericFileName) name; UserAuthenticationData authData = null; HttpClient httpClient; try { authData = UserAuthenticatorUtils.authenticate(fileSystemOptions, AUTHENTICATOR_TYPES); httpClient = HttpClientFactory.createConnection(rootName.getScheme(), rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName()))), UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword()))), fileSystemOptions); } finally { UserAuthenticatorUtils.cleanup(authData); } return new HttpFileSystem(rootName, httpClient, fileSystemOptions); }
authData = UserAuthenticatorUtils.authenticate(fsOpts, AUTHENTICATOR_TYPES); httpClient = HttpClientFactory.createConnection(WebdavFileSystemConfigBuilder.getInstance(), "http", rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData,
authData = UserAuthenticatorUtils.authenticate(fsOpts, AUTHENTICATOR_TYPES); httpClient = HttpClientFactory.createConnection(WebdavFileSystemConfigBuilder.getInstance(), "http", rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData,
authData = UserAuthenticatorUtils.authenticate(fsOpts, AUTHENTICATOR_TYPES); httpClient = HttpClientFactory.createConnection(WebdavFileSystemConfigBuilder.getInstance(), "http", rootName.getHostName(), rootName.getPort(), UserAuthenticatorUtils.toString(UserAuthenticatorUtils.getData(authData,