Package com.ibm.di.connector
Class FTPClientConnector
- java.lang.Object
-
- com.ibm.di.connector.Connector
-
- com.ibm.di.connector.FTPClientConnector
-
- All Implemented Interfaces:
ConnectorInterface
,VersionInfoInterface
public class FTPClientConnector extends Connector implements ConnectorInterface
The FTP Client Connector is a transport Connector that requires a Parser to operate. The Connector reads or writes a data stream that can either be a file or a directory listing. Think of the FTP Client Connector as a remote read/write facility, not something you use to transfer files. This Connector supports FTP Passive Mode, as per RFC959. Passive Mode reverses who initiates the data connection in a file transfer. Normally the server initiates a data connection to the client (after a command from the client), whereas passive mode enables the client to initiate the data connection. This makes it easier to transfer files when the client is behind a firewall.
-
-
Field Summary
-
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
-
-
Constructor Summary
Constructors Constructor Description FTPClientConnector()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Entry
getNextEntry()
Reads an entry , by calling the provided parser's readEntry() method.java.lang.String
getVersion()
Returns version information.void
initialize(java.lang.Object o)
Creates connection for the login to the remote host and opens the socket.void
putEntry(Entry entry)
Writes an entry , by calling the provided parser's writeEntry() method.void
reconnect()
Deprecated.Use #Connector.reconnect(Object) insteadvoid
selectEntries()
Default implementation.void
terminate()
Closes connection to remote host.-
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, deleteEntry, extractExceptionInformation, findEntry, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextClient, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, getUI, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logError, logmsg, modEntry, modEntry, pushback, queryOperations, queryReply, querySchema, queryTables, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setDebugMode, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface, terminateServer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.di.connector.ConnectorInterface
deleteEntry, findEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer
-
-
-
-
Method Detail
-
terminate
public void terminate() throws java.lang.Exception
Closes connection to remote host.- Specified by:
terminate
in interfaceConnectorInterface
- Overrides:
terminate
in classConnector
- Throws:
java.lang.Exception
- if an error occurs.
-
initialize
public void initialize(java.lang.Object o) throws java.lang.Exception
Creates connection for the login to the remote host and opens the socket.- Specified by:
initialize
in interfaceConnectorInterface
- Overrides:
initialize
in classConnector
- Parameters:
o
- ignored- Throws:
java.lang.Exception
- if an error occurs.
-
selectEntries
public void selectEntries() throws java.lang.Exception
Default implementation.- Specified by:
selectEntries
in interfaceConnectorInterface
- Overrides:
selectEntries
in classConnector
- Throws:
java.lang.Exception
- never
-
getNextEntry
public Entry getNextEntry() throws java.lang.Exception
Reads an entry , by calling the provided parser's readEntry() method.- Specified by:
getNextEntry
in interfaceConnectorInterface
- Overrides:
getNextEntry
in classConnector
- Returns:
- the read entry.
- Throws:
java.lang.Exception
- if an error occurs- See Also:
ConnectorInterface.selectEntries()
-
putEntry
public void putEntry(Entry entry) throws java.lang.Exception
Writes an entry , by calling the provided parser's writeEntry() method.- Specified by:
putEntry
in interfaceConnectorInterface
- Overrides:
putEntry
in classConnector
- Parameters:
entry
- the entry to be written.- Throws:
java.lang.Exception
- if an error occurs.
-
reconnect
@Deprecated public void reconnect() throws java.lang.Exception
Deprecated.Use #Connector.reconnect(Object) insteadDescription copied from class:Connector
Reconnect to the underlying data source.The following code could be placed in the 'On Connection lost' hook to change the connector's
ldapUrl
to another server in case the connection is lost.Example:
thisConnector.setParam("ldapURL", "ldap://backupserver.acme.com:389"); // reconnect to backup server thisConnector.reconnect();
- Overrides:
reconnect
in classConnector
- Throws:
java.lang.Exception
- if an error occurs.- See Also:
Connector.initialize(Object)
-
getVersion
public java.lang.String getVersion()
Returns version information.- Specified by:
getVersion
in interfaceVersionInfoInterface
- Returns:
- version info.
-
-