public class FTPLoader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_MAXFILESIZE |
private ConcurrentLog |
log |
private long |
maxFileSize |
private Switchboard |
sb |
Constructor and Description |
---|
FTPLoader(Switchboard sb,
ConcurrentLog log) |
Modifier and Type | Method and Description |
---|---|
private void |
closeConnection(FTPClient ftpClient) |
private Response |
getFile(FTPClient ftpClient,
Request request,
boolean acceptOnlyParseable) |
private java.lang.String |
getPath(MultiProtocolURL entryUrl)
gets path suitable for FTP (url-decoded, double-quotes escaped)
|
Response |
load(Request request,
boolean acceptOnlyParseable)
Loads the entry from a ftp-server
|
private boolean |
openConnection(FTPClient ftpClient,
DigestURL entryUrl)
establish a connection to the ftp server (open, login, set transfer mode)
|
public static final long DEFAULT_MAXFILESIZE
private final Switchboard sb
private final ConcurrentLog log
private final long maxFileSize
public FTPLoader(Switchboard sb, ConcurrentLog log)
public Response load(Request request, boolean acceptOnlyParseable) throws java.io.IOException
request
- java.io.IOException
private void closeConnection(FTPClient ftpClient)
ftpClient
- private boolean openConnection(FTPClient ftpClient, DigestURL entryUrl)
private Response getFile(FTPClient ftpClient, Request request, boolean acceptOnlyParseable) throws java.io.IOException
java.io.IOException
private java.lang.String getPath(MultiProtocolURL entryUrl)
entryUrl
-