org.eclipse.ecf.provider.filetransfer.httpclient4
Class HttpClientFileSystemBrowser
java.lang.Object
org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientFileSystemBrowser
public class HttpClientFileSystemBrowser
- extends AbstractFileSystemBrowser
Field Summary |
protected static int |
DEFAULT_CONNECTION_TIMEOUT
|
protected org.apache.http.client.methods.HttpHead |
headMethod
|
protected org.apache.http.impl.client.DefaultHttpClient |
httpClient
|
protected org.apache.http.protocol.HttpContext |
httpContext
This is the context used to retain information about the request that
the HttpClient gathers during the request. |
protected org.apache.http.HttpResponse |
httpResponse
This is the response returned by HttpClient when it executes
headMethod . |
protected java.lang.String |
password
|
protected java.lang.String |
username
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CONNECTION_TIMEOUT
protected static final int DEFAULT_CONNECTION_TIMEOUT
username
protected java.lang.String username
password
protected java.lang.String 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 httpResponse
- This is the response returned by
HttpClient
when it executes
headMethod
.
- Since:
- 5.0
httpContext
protected volatile org.apache.http.protocol.HttpContext httpContext
- This is the context used to retain information about the request that
the
HttpClient
gathers during the request.
- Since:
- 5.0
HttpClientFileSystemBrowser
public HttpClientFileSystemBrowser(org.apache.http.impl.client.DefaultHttpClient httpClient,
IFileID directoryOrFileID,
IRemoteFileSystemListener listener,
java.net.URL directoryOrFileURL,
IConnectContext connectContext,
Proxy proxy)
- Parameters:
directoryOrFileID
- listener
- - Since:
- 5.0
createRemoteFileSystemRequest
protected IRemoteFileSystemRequest createRemoteFileSystemRequest()
- Overrides:
createRemoteFileSystemRequest
in class AbstractFileSystemBrowser
cancel
protected void cancel()
- Overrides:
cancel
in class AbstractFileSystemBrowser
hasForceNTLMProxyOption
protected boolean hasForceNTLMProxyOption()
setupProxies
protected void setupProxies()
- Overrides:
setupProxies
in class AbstractFileSystemBrowser
cleanUp
protected void cleanUp()
- Overrides:
cleanUp
in class AbstractFileSystemBrowser
runRequest
protected void runRequest()
throws java.lang.Exception
- 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 class AbstractFileSystemBrowser
- Throws:
java.lang.Exception
- if some problem with making the request or receiving response to the request.
getFileRequestCredentials
protected org.apache.http.auth.Credentials getFileRequestCredentials()
throws UnsupportedCallbackException,
java.io.IOException
- Retrieves the credentials for requesting the file.
- Returns:
- the
Credentials
necessary to retrieve the file
- Throws:
UnsupportedCallbackException
- if the callback fails
java.io.IOException
- if IO fails- Since:
- 5.0
setupAuthentication
protected void setupAuthentication(java.lang.String urlString)
throws UnsupportedCallbackException,
java.io.IOException
- Throws:
UnsupportedCallbackException
java.io.IOException
setupProxy
protected void setupProxy(Proxy proxy)
- Specified by:
setupProxy
in class AbstractFileSystemBrowser
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