public class FTPRemoteHostInformation
extends java.lang.Object
This class encapsulates information about remote FTP servers.
The following properties are supported:
Ftp.RemoteHosts
- a space or comma separated list of the local names all the available remote hosts; each local name may be anything unique (in this file) without a space or comma; the local name does not need to be the same as the remote host's name
Ftp.XXXX.HostNameOrIPAddress
- for the remote host with local name XXXX, what host or IP addess that AE will listen on for incoming connections
Ftp.XXXX.User
- for the remote host with local name XXXX, what user name to login with
Ftp.XXXX.Password
- for the remote host with local name XXXX, what password to login with
Ftp.XXXX.Directory
- for the remote host with local name XXXX, what initial working directory to change to
Ftp.XXXX.Security
- for the remote host with local name XXXX, what the type of security to use (supported values are NONE, TLS)
Modifier and Type | Field and Description |
---|---|
protected java.util.TreeMap<java.lang.String,FTPRemoteHost> |
localNameToRemoteHostMap |
protected static java.lang.String |
propertyDelimitersForTokenizer_FtpRemoteAEs |
static java.lang.String |
propertyName_FtpRemoteHosts |
protected static java.lang.String |
propertyNameSuffix_Directory |
protected static java.lang.String |
propertyNameSuffix_HostNameOrIPAddress |
protected static java.lang.String |
propertyNameSuffix_Password |
protected static java.lang.String |
propertyNameSuffix_Security |
protected static java.lang.String |
propertyNameSuffix_User |
Constructor and Description |
---|
FTPRemoteHostInformation()
Construct an empty container for properties of FTP network devices.
|
FTPRemoteHostInformation(java.util.Properties properties)
Extract the FTP network properties from the supplied properties.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String localName,
FTPRemoteHost frh)
Add a new host.
|
void |
add(java.lang.String localName,
java.lang.String host,
java.lang.String user,
java.lang.String password,
java.lang.String directory,
FTPSecurityType security)
Add a new remote FTP host.
|
java.util.Set |
getListOfLocalNames()
Return the set of local names of remote hosts.
|
java.util.Properties |
getProperties(java.util.Properties properties)
Retrieve the FTP network properties.
|
FTPRemoteHost |
getRemoteHost(java.lang.String localName)
Get the information for the specified remote host.
|
void |
remove(java.lang.String localName)
Remove a host.
|
void |
removeAll()
Completely empty all information.
|
java.lang.String |
toString() |
protected final java.util.TreeMap<java.lang.String,FTPRemoteHost> localNameToRemoteHostMap
protected static final java.lang.String propertyDelimitersForTokenizer_FtpRemoteAEs
public static final java.lang.String propertyName_FtpRemoteHosts
protected static final java.lang.String propertyNameSuffix_Directory
protected static final java.lang.String propertyNameSuffix_HostNameOrIPAddress
protected static final java.lang.String propertyNameSuffix_Password
protected static final java.lang.String propertyNameSuffix_Security
protected static final java.lang.String propertyNameSuffix_User
public FTPRemoteHostInformation()
Construct an empty container for properties of FTP network devices.
public FTPRemoteHostInformation(java.util.Properties properties) throws FTPException
Extract the FTP network properties from the supplied properties.
properties
- FTPException
public void add(java.lang.String localName, FTPRemoteHost frh) throws FTPException
Add a new host.
localName
- frh
- FTPException
- if local name already used, or either is null or emptypublic void add(java.lang.String localName, java.lang.String host, java.lang.String user, java.lang.String password, java.lang.String directory, FTPSecurityType security) throws FTPException
Add a new remote FTP host.
localName
- host
- user
- password
- directory
- security
- FTPException
- if local name or AET already used, or either is null or emptypublic java.util.Set getListOfLocalNames()
Return the set of local names of remote hosts.
public java.util.Properties getProperties(java.util.Properties properties)
Retrieve the FTP network properties.
param properties the existing properties to add to (removing any properties already there), or null if nonepublic FTPRemoteHost getRemoteHost(java.lang.String localName)
Get the information for the specified remote host.
localName
- public void remove(java.lang.String localName)
Remove a host.
localName
- public void removeAll()
Completely empty all information.
public java.lang.String toString()
toString
in class java.lang.Object