Package org.apache.commons.net.ftp
Class FTPSServerSocketFactory
java.lang.Object
javax.net.ServerSocketFactory
org.apache.commons.net.ftp.FTPSServerSocketFactory
Server socket factory for FTPS connections.
- Since:
- 2.2
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFTPSServerSocketFactory
(SSLContext sslContext) Constructs a new instance for the given SSL context. -
Method Summary
Modifier and TypeMethodDescriptioncreateServerSocket
(int port) createServerSocket
(int port, int backlog) createServerSocket
(int port, int backlog, InetAddress ifAddress) private SSLServerSocketFactory
init
(ServerSocket socket) Sets the socket so newly accepted connections will use SSL client mode.Methods inherited from class javax.net.ServerSocketFactory
getDefault
-
Field Details
-
sslContext
Factory for secure socket factories
-
-
Constructor Details
-
FTPSServerSocketFactory
Constructs a new instance for the given SSL context.- Parameters:
sslContext
- The SSL context.
-
-
Method Details
-
createServerSocket
- Overrides:
createServerSocket
in classServerSocketFactory
- Throws:
IOException
-
createServerSocket
- Specified by:
createServerSocket
in classServerSocketFactory
- Throws:
IOException
-
createServerSocket
- Specified by:
createServerSocket
in classServerSocketFactory
- Throws:
IOException
-
createServerSocket
public ServerSocket createServerSocket(int port, int backlog, InetAddress ifAddress) throws IOException - Specified by:
createServerSocket
in classServerSocketFactory
- Throws:
IOException
-
getServerSocketFactory
-
init
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
-