Interface FTPClientFactory

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void abandonClient​(URL url, org.apache.commons.net.ftp.FTPClient client)
      Abandon an FTP client.
      void destroyClient​(URL url, org.apache.commons.net.ftp.FTPClient client)
      Destroy an FTP client that is known to be no-longer valid.
      org.apache.commons.net.ftp.FTPClient getFtpClient​(URL url)
      Create an FTP client for the given URL.
      InputStream openStream​(URL url)
      Open an input stream for the given FTP URL.
      void recycleClient​(URL url, org.apache.commons.net.ftp.FTPClient client)
      Recycle the FTP client so that it might be reused in the future.
    • Method Detail

      • getFtpClient

        org.apache.commons.net.ftp.FTPClient getFtpClient​(URL url)
                                                   throws IOException
        Create an FTP client for the given URL.

        Once you're done with the client, you should consider recycling it with recycleClient(URL, FTPClient). However, if you do so, make sure that all pending commands have completed with FTPClient.completePendingCommand().

        Throws:
        IOException
      • recycleClient

        void recycleClient​(URL url,
                           org.apache.commons.net.ftp.FTPClient client)
        Recycle the FTP client so that it might be reused in the future.
      • destroyClient

        void destroyClient​(URL url,
                           org.apache.commons.net.ftp.FTPClient client)
        Destroy an FTP client that is known to be no-longer valid.
      • abandonClient

        void abandonClient​(URL url,
                           org.apache.commons.net.ftp.FTPClient client)
        Abandon an FTP client.

        Unlike destroyClient(URL, FTPClient), no attempt will be made to gracefully logout.

      • openStream

        InputStream openStream​(URL url)
                        throws IOException
        Open an input stream for the given FTP URL.

        The FTP client will be recycled once the stream is closed.

        Throws:
        IOException