Class HttpClientFileSystemBrowser
java.lang.Object
org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientFileSystemBrowser
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
AbstractFileSystemBrowser.DirectoryJob, AbstractFileSystemBrowser.RemoteFileSystemRequest -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected org.apache.http.client.methods.HttpHeadprotected org.apache.http.impl.client.DefaultHttpClientprotected org.apache.http.protocol.HttpContextThis is the context used to retain information about the request that theHttpClientgathers during the request.protected org.apache.http.HttpResponseThis is the response returned byHttpClientwhen it executesheadMethod.protected Stringprotected StringFields inherited from class org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
connectContext, directoryOrFile, fileID, job, listener, proxy, remoteFiles -
Constructor Summary
ConstructorsConstructorDescriptionHttpClientFileSystemBrowser(org.apache.http.impl.client.DefaultHttpClient httpClient, IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcancel()protected voidcleanUp()protected voidThis method will clear out the proxy information (so that if this is reused for a request without a proxy, it will work correctly).protected IRemoteFileSystemRequestprotected org.apache.http.auth.CredentialsRetrieves the credentials for requesting the file.protected booleanprotected voidRun the actual request.protected voidsetupAuthentication(String urlString) protected voidprotected voidsetupProxy(Proxy proxy) Methods inherited from class org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
createRemoteFileEvent, getException, isCanceled, newUserCancelledException, selectProxyFromProxies, sendBrowseRequest, setCanceled, setException
-
Field Details
-
DEFAULT_CONNECTION_TIMEOUT
protected static final int DEFAULT_CONNECTION_TIMEOUT -
username
-
password
-
httpClient
protected org.apache.http.impl.client.DefaultHttpClient httpClient -
headMethod
protected volatile org.apache.http.client.methods.HttpHead headMethod -
httpResponse
protected volatile org.apache.http.HttpResponse httpResponseThis is the response returned byHttpClientwhen it executesheadMethod.- Since:
- 5.0
-
httpContext
protected volatile org.apache.http.protocol.HttpContext httpContextThis is the context used to retain information about the request that theHttpClientgathers during the request.- Since:
- 5.0
-
-
Constructor Details
-
HttpClientFileSystemBrowser
public HttpClientFileSystemBrowser(org.apache.http.impl.client.DefaultHttpClient httpClient, IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy) - Parameters:
httpClient- http clientdirectoryOrFileID- directory or file idlistener- listenerdirectoryOrFileURL- directory or file idconnectContext- connect contextproxy- proxy- Since:
- 5.0
-
-
Method Details
-
createRemoteFileSystemRequest
- Overrides:
createRemoteFileSystemRequestin classAbstractFileSystemBrowser
-
cancel
protected void cancel()- Overrides:
cancelin classAbstractFileSystemBrowser
-
hasForceNTLMProxyOption
protected boolean hasForceNTLMProxyOption() -
setupProxies
protected void setupProxies()- Overrides:
setupProxiesin classAbstractFileSystemBrowser
-
cleanUp
protected void cleanUp()- Overrides:
cleanUpin classAbstractFileSystemBrowser
-
runRequest
Description 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 classAbstractFileSystemBrowser- Throws:
Exception- if some problem with making the request or receiving response to the request.
-
getFileRequestCredentials
protected 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 failsIOException- if IO fails- Since:
- 5.0
-
setupAuthentication
protected void setupAuthentication(String urlString) throws UnsupportedCallbackException, IOException -
setupProxy
- Specified by:
setupProxyin classAbstractFileSystemBrowser
-
clearProxy
protected 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
-