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 EntrygetNextEntry()Reads an entry , by calling the provided parser's readEntry() method.java.lang.StringgetVersion()Returns version information.voidinitialize(java.lang.Object o)Creates connection for the login to the remote host and opens the socket.voidputEntry(Entry entry)Writes an entry , by calling the provided parser's writeEntry() method.voidreconnect()Deprecated.Use #Connector.reconnect(Object) insteadvoidselectEntries()Default implementation.voidterminate()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.ExceptionCloses connection to remote host.- Specified by:
terminatein interfaceConnectorInterface- Overrides:
terminatein classConnector- Throws:
java.lang.Exception- if an error occurs.
-
initialize
public void initialize(java.lang.Object o) throws java.lang.ExceptionCreates connection for the login to the remote host and opens the socket.- Specified by:
initializein interfaceConnectorInterface- Overrides:
initializein classConnector- Parameters:
o- ignored- Throws:
java.lang.Exception- if an error occurs.
-
selectEntries
public void selectEntries() throws java.lang.ExceptionDefault implementation.- Specified by:
selectEntriesin interfaceConnectorInterface- Overrides:
selectEntriesin 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:
getNextEntryin interfaceConnectorInterface- Overrides:
getNextEntryin 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:
putEntryin interfaceConnectorInterface- Overrides:
putEntryin classConnector- Parameters:
entry- the entry to be written.- Throws:
java.lang.Exception- if an error occurs.
-
reconnect
@Deprecated public void reconnect() throws java.lang.ExceptionDeprecated.Use #Connector.reconnect(Object) insteadDescription copied from class:ConnectorReconnect to the underlying data source.The following code could be placed in the 'On Connection lost' hook to change the connector's
ldapUrlto another server in case the connection is lost.Example:
thisConnector.setParam("ldapURL", "ldap://backupserver.acme.com:389"); // reconnect to backup server thisConnector.reconnect();- Overrides:
reconnectin 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:
getVersionin interfaceVersionInfoInterface- Returns:
- version info.
-
-