| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransfer
public class HttpClientRetrieveFileTransfer
| Nested Class Summary | |
|---|---|
 class | 
HttpClientRetrieveFileTransfer.GzipGetMethod
gzip encoding wrapper for httpclient class.  | 
| Field Summary | |
|---|---|
protected static int | 
DEFAULT_CONNECTION_TIMEOUT
 | 
protected static int | 
DEFAULT_READ_TIMEOUT
 | 
protected  IFileID | 
fileid
 | 
protected static java.lang.String | 
HTTP
 | 
protected static int | 
HTTP_PORT
 | 
protected static java.lang.String | 
HTTPS
 | 
protected static int | 
HTTPS_PORT
 | 
protected  int | 
httpVersion
 | 
protected static int | 
MAX_RETRY
 | 
protected  JREProxyHelper | 
proxyHelper
 | 
protected static java.lang.String[] | 
supportedProtocols
 | 
| Fields inherited from class org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer | 
|---|
buff_length, bytesReceived, CLOSE_TIMEOUT, closeOutputStream, connectContext, DEFAULT_BUF_LENGTH, done, downloadRateBytesPerSecond, exception, fileLength, job, jobLock, lastModifiedTime, listener, localFileContents, options, paused, POLLING_RETRY_ATTEMPTS, proxy, rangeSpecification, READ_TIMEOUT, remoteFileContents, remoteFileID, remoteFileURL, responseHeaders, TIMEOUT_INPUTSTREAM_BUFFER_SIZE, transferStartTime | 
| Constructor Summary | |
|---|---|
HttpClientRetrieveFileTransfer(org.apache.commons.httpclient.HttpClient client)
 | 
|
| Method Summary | |
|---|---|
 void | 
cancel()
Cancel this file transfer.  | 
protected  void | 
connectUsingJob(FileTransferJob cjob)
 | 
protected  java.lang.String | 
createConnectJobName()
 | 
static org.apache.commons.httpclient.NTCredentials | 
createNTLMCredentials(Proxy p)
 | 
protected  boolean | 
doPause()
Subclass overridable version of AbstractRetrieveFileTransfer.pause(). | 
protected  boolean | 
doResume()
Subclass overridable version of AbstractRetrieveFileTransfer.resume(). | 
protected  void | 
fireConnectStartEvent()
 | 
protected  void | 
fireReceiveResumedEvent()
 | 
protected  void | 
fireTransferReceiveDataEvent()
 | 
protected  void | 
fireTransferReceiveDoneEvent()
 | 
protected  void | 
fireTransferReceivePausedEvent()
 | 
 java.lang.Object | 
getAdapter(java.lang.Class adapter)
 | 
protected  int | 
getConnectTimeout()
 | 
protected  org.apache.commons.httpclient.Credentials | 
getFileRequestCredentials()
 | 
protected static java.lang.String | 
getHostFromURL(java.lang.String url)
 | 
 ID | 
getID()
Return the ID for this 'identifiable' object.  | 
protected static java.lang.String | 
getNTLMDomainName(Proxy p)
 | 
protected static java.lang.String | 
getNTLMUserName(Proxy p)
 | 
protected static int | 
getPortFromURL(java.lang.String url)
 | 
 java.lang.String | 
getRemoteFileName()
Obtains the name of the remote file if possible.  | 
 int | 
getResponseCode()
 | 
protected  void | 
getResponseHeaderValues()
 | 
protected  void | 
getResumeResponseHeaderValues()
 | 
protected  int | 
getSocketReadTimeout()
 | 
protected  void | 
hardClose()
 | 
protected  boolean | 
hasForceNTLMProxyOption()
 | 
protected  boolean | 
isConnected()
 | 
protected  void | 
openStreams()
Open incoming and outgoing streams associated with this file transfer.  | 
protected  FileTransferJob | 
prepareConnectJob(FileTransferJob cjob)
 | 
 void | 
setConnectContextForAuthentication(IConnectContext connectContext)
Set connect context for authentication upon subsequent IRetrieveFileTransferContainerAdapter.sendRetrieveRequest(IFileID, IFileTransferListener, Map). | 
protected  void | 
setInputStream(java.io.InputStream ins)
 | 
protected  void | 
setRequestHeaderValues()
 | 
protected  void | 
setResumeRequestHeaderValues()
 | 
protected  void | 
setupAuthentication(java.lang.String urlString)
 | 
protected  void | 
setupHostAndPort(org.apache.commons.httpclient.auth.CredentialsProvider credProvider,
                 java.lang.String urlString)
 | 
protected  void | 
setupProxies()
 | 
protected  void | 
setupProxy(Proxy proxy)
Setup ECF proxy.  | 
static boolean | 
supportsProtocol(java.lang.String protocolString)
 | 
protected static boolean | 
urlUsesHttps(java.lang.String url)
 | 
protected  java.io.InputStream | 
wrapTransferReadInputStream(java.io.InputStream inputStream,
                            org.eclipse.core.runtime.IProgressMonitor monitor)
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected static final int DEFAULT_CONNECTION_TIMEOUT
protected static final int DEFAULT_READ_TIMEOUT
protected static final int HTTP_PORT
protected static final int HTTPS_PORT
protected static final int MAX_RETRY
protected static final java.lang.String HTTPS
protected static final java.lang.String HTTP
protected static final java.lang.String[] supportedProtocols
protected int httpVersion
protected IFileID fileid
protected JREProxyHelper proxyHelper
| Constructor Detail | 
|---|
public HttpClientRetrieveFileTransfer(org.apache.commons.httpclient.HttpClient client)
| Method Detail | 
|---|
public java.lang.String getRemoteFileName()
IIncomingFileTransfer
getRemoteFileName in interface IIncomingFileTransfergetRemoteFileName in class AbstractRetrieveFileTransfernull if no such name can be determined.public void cancel()
IFileTransferIFileTransferEvent being delivered to the
 IFileTransferListener indicating that transfer is done (IFileTransfer.isDone()
 returns true), and some exception will be made available
cancel in interface IFileTransfercancel in class AbstractRetrieveFileTransferprotected void hardClose()
hardClose in class AbstractRetrieveFileTransfer
protected org.apache.commons.httpclient.Credentials getFileRequestCredentials()
                                                                       throws UnsupportedCallbackException,
                                                                              java.io.IOException
UnsupportedCallbackException
java.io.IOExceptionprotected void setupProxies()
setupProxies in class AbstractRetrieveFileTransfer
protected void setupAuthentication(java.lang.String urlString)
                            throws UnsupportedCallbackException,
                                   java.io.IOException
UnsupportedCallbackException
java.io.IOException
protected void setupHostAndPort(org.apache.commons.httpclient.auth.CredentialsProvider credProvider,
                                java.lang.String urlString)
protected void setRequestHeaderValues()
                               throws InvalidFileRangeSpecificationException
InvalidFileRangeSpecificationExceptionpublic int getResponseCode()
public ID getID()
IIdentifiablenull.
getID in interface IIdentifiablegetID in class AbstractRetrieveFileTransfernull.
protected void getResponseHeaderValues()
                                throws java.io.IOException
java.io.IOExceptionprotected void setInputStream(java.io.InputStream ins)
setInputStream in class AbstractRetrieveFileTransfer
protected java.io.InputStream wrapTransferReadInputStream(java.io.InputStream inputStream,
                                                          org.eclipse.core.runtime.IProgressMonitor monitor)
wrapTransferReadInputStream in class AbstractRetrieveFileTransferprotected boolean hasForceNTLMProxyOption()
protected int getSocketReadTimeout()
getSocketReadTimeout in class AbstractRetrieveFileTransferprotected int getConnectTimeout()
protected void openStreams()
                    throws IncomingFileTransferException
AbstractRetrieveFileTransferremoteFileContents and localFileContent
 must be non-null after successful completion of the
 implementation of this method.
openStreams in class AbstractRetrieveFileTransferIncomingFileTransferExceptionpublic void setConnectContextForAuthentication(IConnectContext connectContext)
IRetrieveFileTransferContainerAdapterIRetrieveFileTransferContainerAdapter.sendRetrieveRequest(IFileID, IFileTransferListener, Map). This
 method should be called with a non-null connectContext in order to allow
 authentication to occur during call to
 IRetrieveFileTransferContainerAdapter.sendRetrieveRequest(IFileID, IFileTransferListener, Map).
setConnectContextForAuthentication in interface IRetrieveFileTransferContainerAdaptersetConnectContextForAuthentication in class AbstractRetrieveFileTransferconnectContext - the connect context to use for authenticating during
            subsequent call to
            IRetrieveFileTransferContainerAdapter.sendRetrieveRequest(IFileID, IFileTransferListener, Map).
            If null, then no authentication will be
            attempted.protected static java.lang.String getHostFromURL(java.lang.String url)
protected static int getPortFromURL(java.lang.String url)
protected static boolean urlUsesHttps(java.lang.String url)
public static boolean supportsProtocol(java.lang.String protocolString)
protected boolean isConnected()
protected boolean doPause()
AbstractRetrieveFileTransferAbstractRetrieveFileTransfer.pause(). Subclasses must provide
 an implementation of this method to support IFileTransferPausable
 .
doPause in class AbstractRetrieveFileTransferfalse otherwise.protected boolean doResume()
AbstractRetrieveFileTransferAbstractRetrieveFileTransfer.resume(). Subclasses must
 provide an implementation of this method to support
 IFileTransferPausable.
doResume in class AbstractRetrieveFileTransferfalse otherwise.
protected void setResumeRequestHeaderValues()
                                     throws java.io.IOException
java.io.IOException
protected void getResumeResponseHeaderValues()
                                      throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object getAdapter(java.lang.Class adapter)
getAdapter in interface org.eclipse.core.runtime.IAdaptablegetAdapter in class AbstractRetrieveFileTransferprotected void setupProxy(Proxy proxy)
AbstractRetrieveFileTransferAbstractRetrieveFileTransfer.sendRetrieveRequest(IFileID, IFileTransferListener, Map) and
 AbstractRetrieveFileTransfer.sendRetrieveRequest(IFileID, IFileRangeSpecification, IFileTransferListener, Map)
 , prior to the actual call to AbstractRetrieveFileTransfer.openStreams().
setupProxy in class AbstractRetrieveFileTransferproxy - the proxy to be setup. Will not be null.public static org.apache.commons.httpclient.NTCredentials createNTLMCredentials(Proxy p)
protected static java.lang.String getNTLMDomainName(Proxy p)
protected static java.lang.String getNTLMUserName(Proxy p)
protected void fireConnectStartEvent()
protected java.lang.String createConnectJobName()
protected FileTransferJob prepareConnectJob(FileTransferJob cjob)
protected void connectUsingJob(FileTransferJob cjob)
protected void fireReceiveResumedEvent()
fireReceiveResumedEvent in class AbstractRetrieveFileTransferprotected void fireTransferReceiveDataEvent()
fireTransferReceiveDataEvent in class AbstractRetrieveFileTransferprotected void fireTransferReceiveDoneEvent()
fireTransferReceiveDoneEvent in class AbstractRetrieveFileTransferprotected void fireTransferReceivePausedEvent()
fireTransferReceivePausedEvent in class AbstractRetrieveFileTransfer
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||