Package com.enterprisedt.net.ftp.ssl
Class SSLFTPControlSocket
java.lang.Object
com.enterprisedt.net.ftp.FTPControlSocket
com.enterprisedt.net.ftp.ssl.SSLFTPControlSocket
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default and standard control port number for implicit FTPSFields inherited from class com.enterprisedt.net.ftp.FTPControlSocket
autoPassiveIPSubstitution, CONTROL_PORT, controlSock, cvsId, dataChannelCallback, EPSV_END, EPSV_START, forcedActiveIP, listenOnAllInterfaces, MAX_ACTIVE_RETRY, reader, remoteAddr, writer -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the socketprotected com.enterprisedt.net.ftp.internal.FTPDataSocketRequest a data socket be created on the server, connect to it and return our connected socket.booleanIs this socket in secure mode?voidlogout()Quit this FTP session and clean up.protected com.enterprisedt.net.ftp.internal.FTPDataSocketnewActiveDataSocket(int port) Constructs a newFTPDataSocketobject (server mode) which will listen on the given port number.protected com.enterprisedt.net.ftp.internal.FTPDataSocketnewPassiveDataSocket(String remoteHost, int port) Constructs a newFTPDataSocketobject (client mode) and connect to the given remote host and port number.protected voidsetDataPort(InetAddress host, int portNo) 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|voidprotected booleanMethods inherited from class com.enterprisedt.net.ftp.FTPControlSocket
initStreams, isIPV6, sendCommand, setActivePortRange, setAutoPassiveIPSubstitution, toByteArray, validateReply, validateReply, validateReply
-
Field Details
-
IMPLICIT_FTPS_CONTROL_PORT
public static final int IMPLICIT_FTPS_CONTROL_PORTThe default and standard control port number for implicit FTPS- See Also:
-
-
Method Details
-
usingProxy
protected boolean usingProxy()- Overrides:
usingProxyin classFTPControlSocket
-
isSecureMode
public boolean isSecureMode()Is this socket in secure mode?- Overrides:
isSecureModein classFTPControlSocket- Returns:
- true if secure mode
-
logout
Quit this FTP session and clean up.- Overrides:
logoutin classFTPControlSocket- Throws:
IOException- Thrown if an I/O problem occurred during closure.
-
close
Close the socket- Overrides:
closein classFTPControlSocket- Throws:
IOException
-
shutdownSSL
- Throws:
IOExceptionFTPException
-
setDataPort
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:
setDataPortin classFTPControlSocket- Parameters:
host- the local host the server will connect toportNo- the port number to connect to- Throws:
IOExceptionFTPException
-
createDataSocketPASV
protected com.enterprisedt.net.ftp.internal.FTPDataSocket createDataSocketPASV() throws IOException, FTPExceptionRequest a data socket be created on the server, connect to it and return our connected socket.- Overrides:
createDataSocketPASVin classFTPControlSocket- Returns:
- connected data socket
- Throws:
IOExceptionFTPException
-
newActiveDataSocket
protected com.enterprisedt.net.ftp.internal.FTPDataSocket newActiveDataSocket(int port) throws IOException Constructs a newFTPDataSocketobject (server mode) which will listen on the given port number.- Overrides:
newActiveDataSocketin classFTPControlSocket- Parameters:
port- Remote port to listen on.- Returns:
- A new
FTPDataSocketobject (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 newFTPDataSocketobject (client mode) and connect to the given remote host and port number.- Overrides:
newPassiveDataSocketin classFTPControlSocket- Parameters:
remoteHost- Remote host to connect to.port- Remote port to connect to.- Returns:
- A new
FTPDataSocketobject (client mode) which is connected to the given server. - Throws:
IOException- Thrown if no TCP/IP connection could be made.
-