Class HttpClientFileSystemBrowser
java.lang.Object
org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
org.eclipse.ecf.provider.filetransfer.httpclientjava.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 TypeFieldDescriptionstatic final String
static final String
protected static final int
protected HttpClient
protected org.eclipse.ecf.internal.provider.filetransfer.httpclientjava.IHttpClientContext
This is the context used to retain information about the request that theHttpClient
gathers during the request.static final String
protected String
protected String
Fields inherited from class org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
connectContext, directoryOrFile, fileID, job, listener, proxy, remoteFiles
-
Constructor Summary
ConstructorsConstructorDescriptionHttpClientFileSystemBrowser
(HttpClient httpClient, IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
cancel()
protected void
cleanUp()
protected void
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 IRemoteFileSystemRequest
protected org.eclipse.ecf.internal.provider.filetransfer.httpclientjava.Credentials
Retrieves the credentials for requesting the file.static long
getLastModifiedTimeFromHeader
(HttpHeaders httpHeaders) protected void
Run the actual request.protected void
setupAuthentication
(String urlString) protected void
protected void
setupProxy
(Proxy proxy) Methods inherited from class org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
createRemoteFileEvent, getException, isCanceled, newUserCancelledException, selectProxyFromProxies, sendBrowseRequest, setCanceled, setException
-
Field Details
-
LAST_MODIFIED_HEADER
- See Also:
-
CACHE_CONTROL_HEADER
- See Also:
-
CONTENT_LENGTH_HEADER
- See Also:
-
DEFAULT_CONNECTION_TIMEOUT
protected static final int DEFAULT_CONNECTION_TIMEOUT -
username
-
password
-
httpClient
-
httpContext
protected volatile org.eclipse.ecf.internal.provider.filetransfer.httpclientjava.IHttpClientContext httpContextThis is the context used to retain information about the request that theHttpClient
gathers during the request.- Since:
- 5.0
-
-
Constructor Details
-
HttpClientFileSystemBrowser
public HttpClientFileSystemBrowser(HttpClient 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:
createRemoteFileSystemRequest
in classAbstractFileSystemBrowser
-
cancel
protected void cancel()- Overrides:
cancel
in classAbstractFileSystemBrowser
-
setupProxies
protected void setupProxies()- Overrides:
setupProxies
in classAbstractFileSystemBrowser
-
cleanUp
protected void cleanUp()- Overrides:
cleanUp
in classAbstractFileSystemBrowser
-
runRequest
Description copied from class:AbstractFileSystemBrowser
Run the actual request. This method is called within the job created to actually get the directory or file information.- Specified by:
runRequest
in classAbstractFileSystemBrowser
- Throws:
Exception
- if some problem with making the request or receiving response to the request.
-
getLastModifiedTimeFromHeader
- Throws:
IOException
-
getFileRequestCredentials
protected org.eclipse.ecf.internal.provider.filetransfer.httpclientjava.Credentials getFileRequestCredentials() throws UnsupportedCallbackException, IOExceptionRetrieves the credentials for requesting the file.- Returns:
- the
Credentials
necessary 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:
setupProxy
in 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
-