com.ibm.di.connector
Class FTPClientConnector

java.lang.Object
  extended by com.ibm.di.connector.Connector
      extended by 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
FTPClientConnector()
          Default constructor
 
Method Summary
 Entry getNextEntry()
          Reads an entry , by calling the provided parser's readEntry() method.
 String getVersion()
          Returns version information.
 void initialize(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) instead
 void 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, 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
 

Constructor Detail

FTPClientConnector

public FTPClientConnector()
Default constructor

Method Detail

terminate

public void terminate()
               throws Exception
Closes connection to remote host.

Specified by:
terminate in interface ConnectorInterface
Overrides:
terminate in class Connector
Throws:
Exception - if an error occurs.

initialize

public void initialize(Object o)
                throws Exception
Creates connection for the login to the remote host and opens the socket.

Specified by:
initialize in interface ConnectorInterface
Overrides:
initialize in class Connector
Parameters:
o - ignored
Throws:
Exception - if an error occurs.

selectEntries

public void selectEntries()
                   throws Exception
Default implementation.

Specified by:
selectEntries in interface ConnectorInterface
Overrides:
selectEntries in class Connector
Throws:
Exception - never

getNextEntry

public Entry getNextEntry()
                   throws Exception
Reads an entry , by calling the provided parser's readEntry() method.

Specified by:
getNextEntry in interface ConnectorInterface
Overrides:
getNextEntry in class Connector
Returns:
the read entry.
Throws:
Exception - if an error occurs
See Also:
ConnectorInterface.selectEntries()

putEntry

public void putEntry(Entry entry)
              throws Exception
Writes an entry , by calling the provided parser's writeEntry() method.

Specified by:
putEntry in interface ConnectorInterface
Overrides:
putEntry in class Connector
Parameters:
entry - the entry to be written.
Throws:
Exception - if an error occurs.

reconnect

@Deprecated
public void reconnect()
               throws Exception
Deprecated. Use #Connector.reconnect(Object) instead

Description 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 class Connector
Throws:
Exception - if an error occurs.
See Also:
Connector.initialize(Object)

getVersion

public String getVersion()
Returns version information.

Specified by:
getVersion in interface VersionInfoInterface
Returns:
version info.