jfileupload.transfer.client.ftp
Class FtpClientFactory

java.lang.Object
  extended by jfileupload.transfer.client.ftp.FtpClientFactory

public class FtpClientFactory
extends java.lang.Object

This factory manages FTPClient and FTPSClient instances.


Method Summary
 void closeSessions()
           
 org.apache.commons.net.ftp.FTPClient getClient()
          Returns FTPClient instance.
 org.apache.commons.net.ftp.FTPClient getClient(java.lang.String impl)
          Returns FTPClient instance for a given implementation.
 FTPSClient getClient(java.lang.String ftpsmode, java.lang.String ftpsprot)
          Returns FTPSClient instance.
static FtpClientFactory getInstance()
           
 boolean isSessionOpened(org.apache.commons.net.ftp.FTPClient clt)
          Return true if FTPClient session if opened.
 void reset()
           
 void setConcurrency(java.lang.String str)
          Set concurrency value.
 void setSessionOpened(org.apache.commons.net.ftp.FTPClient clt, boolean opened)
          Set session status for a given FTP Client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FtpClientFactory getInstance()

getClient

public org.apache.commons.net.ftp.FTPClient getClient()
Returns FTPClient instance.

Returns:

getClient

public org.apache.commons.net.ftp.FTPClient getClient(java.lang.String impl)
Returns FTPClient instance for a given implementation.

Returns:

getClient

public FTPSClient getClient(java.lang.String ftpsmode,
                            java.lang.String ftpsprot)
Returns FTPSClient instance.

Returns:

isSessionOpened

public boolean isSessionOpened(org.apache.commons.net.ftp.FTPClient clt)
Return true if FTPClient session if opened.

Parameters:
clt -
Returns:

setSessionOpened

public void setSessionOpened(org.apache.commons.net.ftp.FTPClient clt,
                             boolean opened)
Set session status for a given FTP Client.

Parameters:
clt -
opened -

closeSessions

public void closeSessions()

reset

public void reset()

setConcurrency

public void setConcurrency(java.lang.String str)
Set concurrency value.

Parameters:
str - -1 means unlimited HTTP connections.