Package org.teiid.resource.adapter.ftp
Class FtpManagedConnectionFactory
- java.lang.Object
-
- org.teiid.resource.spi.BasicManagedConnectionFactory
-
- org.teiid.resource.adapter.ftp.FtpManagedConnectionFactory
-
- All Implemented Interfaces:
Serializable
,javax.resource.spi.ManagedConnectionFactory
,javax.resource.spi.ResourceAdapterAssociation
,javax.resource.spi.ValidatingManagedConnectionFactory
,FtpConfiguration
public class FtpManagedConnectionFactory extends BasicManagedConnectionFactory implements FtpConfiguration
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Integer
bufferSize
protected Integer
clientMode
protected org.apache.commons.net.ftp.FTPClientConfig
config
protected String
controlEncoding
protected Integer
fileType
protected String
host
protected String
password
protected Integer
port
protected String
username
static BundleUtil
UTIL
-
Constructor Summary
Constructors Constructor Description FtpManagedConnectionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BasicConnectionFactory<FtpFileConnectionImpl>
createConnectionFactory()
boolean
equals(Object obj)
String
getAuthValue()
Integer
getBufferSize()
String
getCertificate()
String
getCipherSuites()
Integer
getClientMode()
MUST be one of the values with default set, Default value requiredFTPClient.ACTIVE_LOCAL_DATA_CONNECTION_MODE
FTPClient.PASSIVE_LOCAL_DATA_CONNECTION_MODE
org.apache.commons.net.ftp.FTPClientConfig
getConfig()
Integer
getConnectTimeout()
String
getControlEncoding()
Integer
getDataTimeout()
Integer
getDefaultTimeout()
String
getExecProt()
Value for the PROT command when SFTP is chosen.String
getFileMapping()
Integer
getFileType()
File types defined byFTP
constants: default file requiredFTP.ASCII_FILE_TYPE
FTP.EBCDIC_FILE_TYPE
FTP.BINARY_FILE_TYPE
FTP.LOCAL_FILE_TYPE
String
getHost()
Required PropertyBoolean
getIsFtps()
KeyManager
getKeyManager()
String
getKeyPassword()
String
getKeyPath()
Boolean
getNeedClientAuth()
String
getParentDirectory()
The parent/root directory for ftp operations.String
getPassword()
Required PropertyInteger
getPort()
String
getProtocol()
String
getProtocols()
Boolean
getSessionCreation()
String[]
getSupportedCipherSuites()
String[]
getSupportedProtocols()
TrustManager
getTrustManager()
Boolean
getUseClientMode()
String
getUsername()
Required PropertyBoolean
getWantsClientAuth()
int
hashCode()
Boolean
isImplicit()
void
setAuthValue(String authValue)
void
setBufferSize(Integer bufferSize)
void
setCertificate(String certificate)
void
setCipherSuites(String cipherSuites)
void
setClientMode(Integer clientMode)
void
setConfig(org.apache.commons.net.ftp.FTPClientConfig config)
void
setConnectTimeout(Integer connectTimeout)
void
setControlEncoding(String controlEncoding)
void
setDataTimeout(Integer dataTimeout)
void
setDefaultTimeout(Integer defaultTimeout)
void
setExecProt(String execProt)
void
setFileMapping(String fileMapping)
void
setFileType(Integer fileType)
File types defined byFTP
constants:FTP.ASCII_FILE_TYPE
FTP.EBCDIC_FILE_TYPE
FTP.BINARY_FILE_TYPE
FTP.LOCAL_FILE_TYPE
void
setHost(String host)
void
setImplicit(Boolean implicit)
void
setIsFtps(Boolean isFtps)
void
setKeyPassword(String keyPassword)
void
setKeyPath(String keyPath)
void
setNeedClientAuth(Boolean needClientAuth)
void
setParentDirectory(String parentDirectory)
void
setPassword(String password)
void
setPort(Integer port)
void
setProtocol(String protocol)
void
setProtocols(String protocols)
void
setSessionCreation(Boolean sessionCreation)
void
setUseClientMode(Boolean useClientMode)
void
setUsername(String username)
void
setWantsClientAuth(Boolean wantsClientAuth)
-
Methods inherited from class org.teiid.resource.spi.BasicManagedConnectionFactory
checkEquals, createConnectionFactory, createManagedConnection, getInstance, getInvalidConnections, getLogWriter, getResourceAdapter, matchManagedConnections, setLogWriter, setResourceAdapter
-
-
-
-
Field Detail
-
UTIL
public static final BundleUtil UTIL
-
config
protected org.apache.commons.net.ftp.FTPClientConfig config
-
username
protected String username
-
host
protected String host
-
password
protected String password
-
port
protected Integer port
-
bufferSize
protected Integer bufferSize
-
clientMode
protected Integer clientMode
-
fileType
protected Integer fileType
-
controlEncoding
protected String controlEncoding
-
-
Method Detail
-
getConfig
public org.apache.commons.net.ftp.FTPClientConfig getConfig()
-
getParentDirectory
public String getParentDirectory()
Description copied from interface:FtpConfiguration
The parent/root directory for ftp operations.
Required Property- Specified by:
getParentDirectory
in interfaceFtpConfiguration
-
setParentDirectory
public void setParentDirectory(String parentDirectory)
-
getFileMapping
public String getFileMapping()
- Specified by:
getFileMapping
in interfaceFtpConfiguration
-
setFileMapping
public void setFileMapping(String fileMapping)
-
setConfig
public void setConfig(org.apache.commons.net.ftp.FTPClientConfig config)
-
getUsername
public String getUsername()
Description copied from interface:FtpConfiguration
Required Property- Specified by:
getUsername
in interfaceFtpConfiguration
-
setUsername
public void setUsername(String username)
-
getHost
public String getHost()
Description copied from interface:FtpConfiguration
Required Property- Specified by:
getHost
in interfaceFtpConfiguration
-
setHost
public void setHost(String host)
-
getPassword
public String getPassword()
Description copied from interface:FtpConfiguration
Required Property- Specified by:
getPassword
in interfaceFtpConfiguration
-
setPassword
public void setPassword(String password)
-
getPort
public Integer getPort()
- Specified by:
getPort
in interfaceFtpConfiguration
-
setPort
public void setPort(Integer port)
-
getBufferSize
public Integer getBufferSize()
- Specified by:
getBufferSize
in interfaceFtpConfiguration
-
setBufferSize
public void setBufferSize(Integer bufferSize)
-
getClientMode
public Integer getClientMode()
Description copied from interface:FtpConfiguration
MUST be one of the values with default set, Default value requiredFTPClient.ACTIVE_LOCAL_DATA_CONNECTION_MODE
FTPClient.PASSIVE_LOCAL_DATA_CONNECTION_MODE
- Specified by:
getClientMode
in interfaceFtpConfiguration
- Returns:
-
setClientMode
public void setClientMode(Integer clientMode)
-
getFileType
public Integer getFileType()
Description copied from interface:FtpConfiguration
File types defined byFTP
constants: default file requiredFTP.ASCII_FILE_TYPE
FTP.EBCDIC_FILE_TYPE
FTP.BINARY_FILE_TYPE
FTP.LOCAL_FILE_TYPE
- Specified by:
getFileType
in interfaceFtpConfiguration
- Returns:
- fileType The file type.
-
setFileType
public void setFileType(Integer fileType)
File types defined byFTP
constants:FTP.ASCII_FILE_TYPE
FTP.EBCDIC_FILE_TYPE
FTP.BINARY_FILE_TYPE
FTP.LOCAL_FILE_TYPE
- Parameters:
fileType
- The file type.
-
getControlEncoding
public String getControlEncoding()
- Specified by:
getControlEncoding
in interfaceFtpConfiguration
-
setControlEncoding
public void setControlEncoding(String controlEncoding)
-
getConnectTimeout
public Integer getConnectTimeout()
- Specified by:
getConnectTimeout
in interfaceFtpConfiguration
-
setConnectTimeout
public void setConnectTimeout(Integer connectTimeout)
-
getDefaultTimeout
public Integer getDefaultTimeout()
- Specified by:
getDefaultTimeout
in interfaceFtpConfiguration
-
setDefaultTimeout
public void setDefaultTimeout(Integer defaultTimeout)
-
getDataTimeout
public Integer getDataTimeout()
- Specified by:
getDataTimeout
in interfaceFtpConfiguration
-
setDataTimeout
public void setDataTimeout(Integer dataTimeout)
-
getIsFtps
public Boolean getIsFtps()
- Specified by:
getIsFtps
in interfaceFtpConfiguration
-
setIsFtps
public void setIsFtps(Boolean isFtps)
-
getUseClientMode
public Boolean getUseClientMode()
- Specified by:
getUseClientMode
in interfaceFtpConfiguration
-
setUseClientMode
public void setUseClientMode(Boolean useClientMode)
-
getSessionCreation
public Boolean getSessionCreation()
- Specified by:
getSessionCreation
in interfaceFtpConfiguration
-
setSessionCreation
public void setSessionCreation(Boolean sessionCreation)
-
getAuthValue
public String getAuthValue()
- Specified by:
getAuthValue
in interfaceFtpConfiguration
-
setAuthValue
public void setAuthValue(String authValue)
-
getCertificate
public String getCertificate()
-
setCertificate
public void setCertificate(String certificate)
-
getCipherSuites
public String getCipherSuites()
-
setCipherSuites
public void setCipherSuites(String cipherSuites)
-
getProtocols
public String getProtocols()
-
setProtocols
public void setProtocols(String protocols)
-
getKeyPath
public String getKeyPath()
-
setKeyPath
public void setKeyPath(String keyPath)
-
getKeyPassword
public String getKeyPassword()
-
setKeyPassword
public void setKeyPassword(String keyPassword)
-
getNeedClientAuth
public Boolean getNeedClientAuth()
- Specified by:
getNeedClientAuth
in interfaceFtpConfiguration
-
setNeedClientAuth
public void setNeedClientAuth(Boolean needClientAuth)
-
getWantsClientAuth
public Boolean getWantsClientAuth()
- Specified by:
getWantsClientAuth
in interfaceFtpConfiguration
-
setWantsClientAuth
public void setWantsClientAuth(Boolean wantsClientAuth)
-
isImplicit
public Boolean isImplicit()
- Specified by:
isImplicit
in interfaceFtpConfiguration
-
setImplicit
public void setImplicit(Boolean implicit)
-
getExecProt
public String getExecProt()
Description copied from interface:FtpConfiguration
Value for the PROT command when SFTP is chosen. Defaults to P - private- Specified by:
getExecProt
in interfaceFtpConfiguration
-
setExecProt
public void setExecProt(String execProt)
-
getProtocol
public String getProtocol()
- Specified by:
getProtocol
in interfaceFtpConfiguration
-
setProtocol
public void setProtocol(String protocol)
-
createConnectionFactory
public BasicConnectionFactory<FtpFileConnectionImpl> createConnectionFactory() throws javax.resource.ResourceException
- Specified by:
createConnectionFactory
in interfacejavax.resource.spi.ManagedConnectionFactory
- Specified by:
createConnectionFactory
in classBasicManagedConnectionFactory
- Throws:
javax.resource.ResourceException
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
getTrustManager
public TrustManager getTrustManager()
- Specified by:
getTrustManager
in interfaceFtpConfiguration
-
getKeyManager
public KeyManager getKeyManager()
- Specified by:
getKeyManager
in interfaceFtpConfiguration
-
getSupportedCipherSuites
public String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites
in interfaceFtpConfiguration
-
getSupportedProtocols
public String[] getSupportedProtocols()
- Specified by:
getSupportedProtocols
in interfaceFtpConfiguration
-
-