public class HttpClientFileSystemBrowser extends AbstractFileSystemBrowser
AbstractFileSystemBrowser.DirectoryJob, AbstractFileSystemBrowser.RemoteFileSystemRequest
Modifier and Type | Field and Description |
---|---|
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 |
connectContext, directoryOrFile, fileID, job, listener, proxy, remoteFiles
Constructor and Description |
---|
HttpClientFileSystemBrowser(org.apache.http.impl.client.DefaultHttpClient httpClient,
IFileID directoryOrFileID,
IRemoteFileSystemListener listener,
java.net.URL directoryOrFileURL,
IConnectContext connectContext,
Proxy proxy) |
Modifier and Type | Method and Description |
---|---|
protected void |
cancel() |
protected void |
cleanUp() |
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).
|
protected IRemoteFileSystemRequest |
createRemoteFileSystemRequest() |
protected org.apache.http.auth.Credentials |
getFileRequestCredentials()
Retrieves the credentials for requesting the file.
|
protected boolean |
hasForceNTLMProxyOption() |
protected void |
runRequest()
Run the actual request.
|
protected void |
setupAuthentication(java.lang.String urlString) |
protected void |
setupProxies() |
protected void |
setupProxy(Proxy proxy) |
createRemoteFileEvent, getException, isCanceled, newUserCancelledException, selectProxyFromProxies, sendBrowseRequest, setCanceled, setException
protected static final int DEFAULT_CONNECTION_TIMEOUT
protected java.lang.String username
protected java.lang.String password
protected org.apache.http.impl.client.DefaultHttpClient httpClient
protected volatile org.apache.http.client.methods.HttpHead headMethod
protected volatile org.apache.http.HttpResponse httpResponse
HttpClient
when it executes
headMethod
.protected volatile org.apache.http.protocol.HttpContext httpContext
HttpClient
gathers during the request.public HttpClientFileSystemBrowser(org.apache.http.impl.client.DefaultHttpClient httpClient, IFileID directoryOrFileID, IRemoteFileSystemListener listener, java.net.URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy)
httpClient
- http clientdirectoryOrFileID
- directory or file idlistener
- listenerdirectoryOrFileURL
- directory or file idconnectContext
- connect contextproxy
- proxyprotected IRemoteFileSystemRequest createRemoteFileSystemRequest()
createRemoteFileSystemRequest
in class AbstractFileSystemBrowser
protected void cancel()
cancel
in class AbstractFileSystemBrowser
protected boolean hasForceNTLMProxyOption()
protected void setupProxies()
setupProxies
in class AbstractFileSystemBrowser
protected void cleanUp()
cleanUp
in class AbstractFileSystemBrowser
protected void runRequest() throws java.lang.Exception
AbstractFileSystemBrowser
runRequest
in class AbstractFileSystemBrowser
java.lang.Exception
- if some problem with making the request or receiving response to the request.protected org.apache.http.auth.Credentials getFileRequestCredentials() throws UnsupportedCallbackException, java.io.IOException
Credentials
necessary to retrieve the fileUnsupportedCallbackException
- if the callback failsjava.io.IOException
- if IO failsprotected void setupAuthentication(java.lang.String urlString) throws UnsupportedCallbackException, java.io.IOException
UnsupportedCallbackException
java.io.IOException
protected void setupProxy(Proxy proxy)
setupProxy
in class AbstractFileSystemBrowser
protected void clearProxy()