Class SSLFTPControlSocket

java.lang.Object
com.enterprisedt.net.ftp.FTPControlSocket
com.enterprisedt.net.ftp.ssl.SSLFTPControlSocket

public class SSLFTPControlSocket extends FTPControlSocket
SSLFTPControlSocket encapsulates the SSL/TLS control channel. It extends FTPControlSocket, adding functionality for constructing and controlling the secure control channel, as well as creating secure data channel. Methods are package access only - not for public use.
Version:
$Revision$
Author:
Hans Andersen
  • Field Details

    • IMPLICIT_FTPS_CONTROL_PORT

      public static final int IMPLICIT_FTPS_CONTROL_PORT
      The default and standard control port number for implicit FTPS
      See Also:
  • Method Details

    • usingProxy

      protected boolean usingProxy()
      Overrides:
      usingProxy in class FTPControlSocket
    • isSecureMode

      public boolean isSecureMode()
      Is this socket in secure mode?
      Overrides:
      isSecureMode in class FTPControlSocket
      Returns:
      true if secure mode
    • logout

      public void logout() throws IOException
      Quit this FTP session and clean up.
      Overrides:
      logout in class FTPControlSocket
      Throws:
      IOException - Thrown if an I/O problem occurred during closure.
    • close

      public void close() throws IOException
      Close the socket
      Overrides:
      close in class FTPControlSocket
      Throws:
      IOException
    • shutdownSSL

      public void shutdownSSL() throws IOException, FTPException
      Throws:
      IOException
      FTPException
    • setDataPort

      protected void setDataPort(InetAddress host, int portNo) throws IOException, FTPException
      Sets the data port on the server, that is, sends a EPRT command for IPV6 addresses, for example, EPRT |2|1080::8:800:200C:417A|5282|
      Overrides:
      setDataPort in class FTPControlSocket
      Parameters:
      host - the local host the server will connect to
      portNo - the port number to connect to
      Throws:
      IOException
      FTPException
    • createDataSocketPASV

      protected com.enterprisedt.net.ftp.internal.FTPDataSocket createDataSocketPASV() throws IOException, FTPException
      Request a data socket be created on the server, connect to it and return our connected socket.
      Overrides:
      createDataSocketPASV in class FTPControlSocket
      Returns:
      connected data socket
      Throws:
      IOException
      FTPException
    • newActiveDataSocket

      protected com.enterprisedt.net.ftp.internal.FTPDataSocket newActiveDataSocket(int port) throws IOException
      Constructs a new FTPDataSocket object (server mode) which will listen on the given port number.
      Overrides:
      newActiveDataSocket in class FTPControlSocket
      Parameters:
      port - Remote port to listen on.
      Returns:
      A new FTPDataSocket object (server mode) which is configured to listen on the given port.
      Throws:
      IOException - Thrown if an error occurred when creating the socket.
    • newPassiveDataSocket

      protected com.enterprisedt.net.ftp.internal.FTPDataSocket newPassiveDataSocket(String remoteHost, int port) throws IOException
      Constructs a new FTPDataSocket object (client mode) and connect to the given remote host and port number.
      Overrides:
      newPassiveDataSocket in class FTPControlSocket
      Parameters:
      remoteHost - Remote host to connect to.
      port - Remote port to connect to.
      Returns:
      A new FTPDataSocket object (client mode) which is connected to the given server.
      Throws:
      IOException - Thrown if no TCP/IP connection could be made.