Class HttpClientFileSystemBrowser
- java.lang.Object
- 
- org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
- 
- org.eclipse.ecf.provider.filetransfer.httpclient45.HttpClientFileSystemBrowser
 
 
- 
 public class HttpClientFileSystemBrowser extends AbstractFileSystemBrowser 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowserAbstractFileSystemBrowser.DirectoryJob, AbstractFileSystemBrowser.RemoteFileSystemRequest
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected static intDEFAULT_CONNECTION_TIMEOUTprotected org.apache.http.client.methods.HttpHeadheadMethodprotected org.apache.http.impl.client.CloseableHttpClienthttpClientprotected org.apache.http.client.protocol.HttpClientContexthttpContextThis is the context used to retain information about the request that theHttpClientgathers during the request.protected org.apache.http.client.methods.CloseableHttpResponsehttpResponseThis is the response returned byHttpClientwhen it executesheadMethod.protected Stringpasswordprotected Stringusername- 
Fields inherited from class org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowserconnectContext, directoryOrFile, fileID, job, listener, proxy, remoteFiles
 
- 
 - 
Constructor SummaryConstructors Constructor Description HttpClientFileSystemBrowser(org.apache.http.impl.client.CloseableHttpClient httpClient, IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcancel()protected voidcleanUp()protected voidclearProxy()This method will clear out the proxy information (so that if this is reused for a request without a proxy, it will work correctly).protected IRemoteFileSystemRequestcreateRemoteFileSystemRequest()protected org.apache.http.auth.CredentialsgetFileRequestCredentials()Retrieves the credentials for requesting the file.protected voidrunRequest()Run the actual request.protected voidsetupAuthentication(String urlString)protected voidsetupProxies()protected voidsetupProxy(Proxy proxy)- 
Methods inherited from class org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowsercreateRemoteFileEvent, getException, isCanceled, newUserCancelledException, selectProxyFromProxies, sendBrowseRequest, setCanceled, setException
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_CONNECTION_TIMEOUTprotected static final int DEFAULT_CONNECTION_TIMEOUT 
 - 
usernameprotected String username 
 - 
passwordprotected String password 
 - 
httpClientprotected org.apache.http.impl.client.CloseableHttpClient httpClient 
 - 
headMethodprotected volatile org.apache.http.client.methods.HttpHead headMethod 
 - 
httpResponseprotected volatile org.apache.http.client.methods.CloseableHttpResponse httpResponse This is the response returned byHttpClientwhen it executesheadMethod.- Since:
- 5.0
 
 - 
httpContextprotected volatile org.apache.http.client.protocol.HttpClientContext httpContext This is the context used to retain information about the request that theHttpClientgathers during the request.- Since:
- 5.0
 
 
- 
 - 
Constructor Detail- 
HttpClientFileSystemBrowserpublic HttpClientFileSystemBrowser(org.apache.http.impl.client.CloseableHttpClient httpClient, IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy)- Parameters:
- httpClient- http client
- directoryOrFileID- directory or file id
- listener- listener
- directoryOrFileURL- directory or file id
- connectContext- connect context
- proxy- proxy
- Since:
- 5.0
 
 
- 
 - 
Method Detail- 
createRemoteFileSystemRequestprotected IRemoteFileSystemRequest createRemoteFileSystemRequest() - Overrides:
- createRemoteFileSystemRequestin class- AbstractFileSystemBrowser
 
 - 
cancelprotected void cancel() - Overrides:
- cancelin class- AbstractFileSystemBrowser
 
 - 
setupProxiesprotected void setupProxies() - Overrides:
- setupProxiesin class- AbstractFileSystemBrowser
 
 - 
cleanUpprotected void cleanUp() - Overrides:
- cleanUpin class- AbstractFileSystemBrowser
 
 - 
runRequestprotected void runRequest() throws ExceptionDescription copied from class:AbstractFileSystemBrowserRun the actual request. This method is called within the job created to actually get the directory or file information.- Specified by:
- runRequestin class- AbstractFileSystemBrowser
- Throws:
- Exception- if some problem with making the request or receiving response to the request.
 
 - 
getFileRequestCredentialsprotected org.apache.http.auth.Credentials getFileRequestCredentials() throws UnsupportedCallbackException, IOExceptionRetrieves the credentials for requesting the file.- Returns:
- the Credentialsnecessary to retrieve the file
- Throws:
- UnsupportedCallbackException- if the callback fails
- IOException- if IO fails
- Since:
- 5.0
 
 - 
setupAuthenticationprotected void setupAuthentication(String urlString) throws UnsupportedCallbackException, IOException 
 - 
setupProxyprotected void setupProxy(Proxy proxy) - Specified by:
- setupProxyin class- AbstractFileSystemBrowser
 
 - 
clearProxyprotected void clearProxy() This method will clear out the proxy information (so that if this is reused for a request without a proxy, it will work correctly).- Since:
- 5.0
 
 
- 
 
-