Class AbstractUrlConnectionOutgoingFileTransfer

java.lang.Object
org.eclipse.ecf.provider.filetransfer.outgoing.AbstractOutgoingFileTransfer
org.eclipse.ecf.provider.filetransfer.outgoing.AbstractUrlConnectionOutgoingFileTransfer
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IIdentifiable, IFileTransfer, IOutgoingFileTransfer, ISendFileTransferContainerAdapter, ISendFileTransfer

public abstract class AbstractUrlConnectionOutgoingFileTransfer extends AbstractOutgoingFileTransfer implements ISendFileTransfer
  • Field Details

    • urlConnection

      protected URLConnection urlConnection
    • lastModifiedTime

      protected long lastModifiedTime
    • httpVersion

      protected int httpVersion
    • responseCode

      protected int responseCode
    • responseMessage

      protected String responseMessage
  • Constructor Details

    • AbstractUrlConnectionOutgoingFileTransfer

      public AbstractUrlConnectionOutgoingFileTransfer()
  • Method Details

    • connect

      protected abstract void connect() throws IOException
      Setup and connect. Subclasses should override as appropriate. After calling is complete, the urlConnection member variable should be non-null, and ready to have it's getInputStream() method called.
      Throws:
      IOException - if the connection cannot be opened.
    • isConnected

      protected boolean isConnected()
    • getResponseCode

      public int getResponseCode()
    • setupProxy

      protected void setupProxy(Proxy proxy2)
      Specified by:
      setupProxy in class AbstractOutgoingFileTransfer
      Parameters:
      proxy2 - the ECF proxy to setup
    • openStreams

      protected void openStreams() throws SendFileTransferException
      Description copied from class: AbstractOutgoingFileTransfer
      Open incoming and outgoing streams associated with this file transfer. Subclasses must implement this method to open input and output streams. The remoteFileContents and localFileContent must be non-null after successful completion of the implementation of this method.
      Specified by:
      openStreams in class AbstractOutgoingFileTransfer
      Throws:
      SendFileTransferException - if some problem
    • hardClose

      protected void hardClose()
      Overrides:
      hardClose in class AbstractOutgoingFileTransfer