org.apache.commons.net.ftp

## Class FTPSServerSocketFactory

- java.lang.Object
- - javax.net.ServerSocketFactory
  - - org.apache.commons.net.ftp.FTPSServerSocketFactory

-     public class FTPSServerSocketFactory
      extends ServerSocketFactory

  Server socket factory for FTPS connections.
  Since:
    2.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FTPSServerSocketFactory(SSLContext sslContext)` Constructs a new instance for the given SSL context.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ServerSocket` | `createServerSocket()`
    `ServerSocket` | `createServerSocket(int port)`
    `ServerSocket` | `createServerSocket(int port, int backlog)`
    `ServerSocket` | `createServerSocket(int port, int backlog, InetAddress ifAddress)`
    `ServerSocket` | `init(ServerSocket socket)` Sets the socket so newly accepted connections will use SSL client mode.

    - ### Methods inherited from class javax.net.ServerSocketFactory

      `getDefault`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FTPSServerSocketFactory

          public FTPSServerSocketFactory(SSLContext sslContext)

      Constructs a new instance for the given SSL context.
      Parameters:
        `sslContext` - The SSL context.

  - ### Method Detail

    - #### createServerSocket

          public ServerSocket createServerSocket()
                                          throws IOException

      Overrides:
        `createServerSocket` in class `ServerSocketFactory`
      Throws:
        `IOException`

    - #### createServerSocket

          public ServerSocket createServerSocket(int port)
                                          throws IOException

      Specified by:
        `createServerSocket` in class `ServerSocketFactory`
      Throws:
        `IOException`

    - #### createServerSocket

          public ServerSocket createServerSocket(int port,
                                                 int backlog)
                                          throws IOException

      Specified by:
        `createServerSocket` in class `ServerSocketFactory`
      Throws:
        `IOException`

    - #### createServerSocket

          public ServerSocket createServerSocket(int port,
                                                 int backlog,
                                                 InetAddress ifAddress)
                                          throws IOException

      Specified by:
        `createServerSocket` in class `ServerSocketFactory`
      Throws:
        `IOException`

    - #### init

          public ServerSocket init(ServerSocket socket)

      Sets the socket so newly accepted connections will use SSL client mode.
      Parameters:
        `socket` - the SSLServerSocket to initialize
      Returns:
        the socket
      Throws:
        `ClassCastException` - if socket is not an instance of SSLServerSocket

Copyright © 2001–2021 The Apache Software Foundation. All rights reserved.