org.eclipse.ecf.provider.filetransfer.httpclient4
Class HttpClientFileSystemBrowser

java.lang.Object
  extended by org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
      extended by org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientFileSystemBrowser

public class HttpClientFileSystemBrowser
extends AbstractFileSystemBrowser


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
AbstractFileSystemBrowser.DirectoryJob, AbstractFileSystemBrowser.RemoteFileSystemRequest
 
Field Summary
protected static int DEFAULT_CONNECTION_TIMEOUT
           
protected  HttpHead headMethod
           
protected  DefaultHttpClient httpClient
           
protected  HttpContext httpContext
          This is the context used to retain information about the request that the HttpClient gathers during the request.
protected  HttpResponse httpResponse
          This is the response returned by HttpClient when it executes headMethod.
protected  java.lang.String password
           
protected  java.lang.String username
           
 
Fields inherited from class org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
connectContext, directoryOrFile, fileID, job, listener, proxy, remoteFiles
 
Constructor Summary
HttpClientFileSystemBrowser(DefaultHttpClient httpClient, IFileID directoryOrFileID, IRemoteFileSystemListener listener, java.net.URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy)
           
 
Method Summary
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  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)
           
 
Methods inherited from class org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser
createRemoteFileEvent, getException, isCanceled, newUserCancelledException, selectProxyFromProxies, sendBrowseRequest, setCanceled, setException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONNECTION_TIMEOUT

protected static final int DEFAULT_CONNECTION_TIMEOUT

username

protected java.lang.String username

password

protected java.lang.String password

httpClient

protected DefaultHttpClient httpClient

headMethod

protected volatile HttpHead headMethod

httpResponse

protected volatile HttpResponse httpResponse
This is the response returned by HttpClient when it executes headMethod.

Since:
5.0

httpContext

protected volatile HttpContext httpContext
This is the context used to retain information about the request that the HttpClient gathers during the request.

Since:
5.0
Constructor Detail

HttpClientFileSystemBrowser

public HttpClientFileSystemBrowser(DefaultHttpClient httpClient,
                                   IFileID directoryOrFileID,
                                   IRemoteFileSystemListener listener,
                                   java.net.URL directoryOrFileURL,
                                   IConnectContext connectContext,
                                   Proxy proxy)
Parameters:
directoryOrFileID -
listener -
Since:
5.0
Method Detail

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 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