Interface Client
-
- All Known Subinterfaces:
SecureClient
public interface Client
An FTP client.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
configure(Configuration configuration)
Configure the client with the configuration.void
connect(java.lang.String hostname)
Connect.void
connect(java.lang.String hostname, int port)
Connect.void
disconnect()
Disconnect.Response
send(Command command)
Send the command.Response
send(Command command, java.lang.String argument)
Send the command with an argument.
-
-
-
Method Detail
-
configure
void configure(Configuration configuration)
Configure the client with the configuration.- Parameters:
configuration
- the configuration- Since:
- 1.0
-
connect
void connect(java.lang.String hostname) throws java.io.IOException
Connect.- Parameters:
hostname
- the hostname- Throws:
java.io.IOException
- If the socket could not be opened. In most cases you will only want to catch IOException since SocketException is derived from it.- Since:
- 1.0
-
connect
void connect(java.lang.String hostname, int port) throws java.io.IOException
Connect.- Parameters:
hostname
- the hostnameport
- the port- Throws:
java.io.IOException
- If the socket could not be opened. In most cases you will only want to catch IOException since SocketException is derived from it.- Since:
- 1.0
-
disconnect
void disconnect() throws java.io.IOException
Disconnect.- Throws:
java.io.IOException
- If an error occurs while disconnecting.- Since:
- 1.0
-
send
Response send(Command command) throws java.io.IOException
Send the command.- Parameters:
command
- the command- Returns:
- the response
- Throws:
java.io.IOException
- If an I/O error occurs while either sending the command or receiving the server reply.- Since:
- 1.0
-
send
Response send(Command command, java.lang.String argument) throws java.io.IOException
Send the command with an argument.- Parameters:
command
- the commandargument
- the argument- Returns:
- the response
- Throws:
java.io.IOException
- If an I/O error occurs while either sending the command or receiving the server reply.- Since:
- 1.0
-
-