org.apache.camel.component.file.remote
Class FtpComponent

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultComponent
          extended by org.apache.camel.component.file.GenericFileComponent<T>
              extended by org.apache.camel.component.file.remote.RemoteFileComponent<org.apache.commons.net.ftp.FTPFile>
                  extended by org.apache.camel.component.file.remote.FtpComponent
All Implemented Interfaces:
CamelContextAware, Component, Service, ShutdownableService
Direct Known Subclasses:
FtpsComponent

public class FtpComponent
extends RemoteFileComponent<org.apache.commons.net.ftp.FTPFile>

FTP Component


Field Summary
 
Fields inherited from class org.apache.camel.component.file.GenericFileComponent
log
 
Constructor Summary
FtpComponent()
           
FtpComponent(CamelContext context)
           
 
Method Summary
protected  void afterPropertiesSet(GenericFileEndpoint<org.apache.commons.net.ftp.FTPFile> endpoint)
          A factory method for derived file components to perform validation of properties
protected  GenericFileEndpoint<org.apache.commons.net.ftp.FTPFile> buildFileEndpoint(String uri, String remaining, Map<String,Object> parameters)
          A factory method for derived file components to create the endpoint
protected  void extractAndSetFtpClientConfigParameters(Map<String,Object> parameters, FtpEndpoint<org.apache.commons.net.ftp.FTPFile> answer)
          Extract additional ftp client configuration options from the parameters map (parameters starting with 'ftpClientConfig.').
protected  void extractAndSetFtpClientParameters(Map<String,Object> parameters, FtpEndpoint<org.apache.commons.net.ftp.FTPFile> answer)
          Extract additional ftp client options from the parameters map (parameters starting with 'ftpClient.').
protected  String getBaseUri(String uri)
          get the base uri part before the options as they can be non URI valid such as the expression using $ chars and the URI constructor will regard $ as an illegal character and we dont want to enforce end users to to escape the $ for the expression (file language)
 
Methods inherited from class org.apache.camel.component.file.GenericFileComponent
createEndpoint
 
Methods inherited from class org.apache.camel.impl.DefaultComponent
afterConfiguration, createEndpoint, doStart, doStop, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, ifStartsWithReturnRemainder, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, useIntrospectionOnEndpoint, validateParameters, validateURI
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FtpComponent

public FtpComponent()

FtpComponent

public FtpComponent(CamelContext context)
Method Detail

buildFileEndpoint

protected GenericFileEndpoint<org.apache.commons.net.ftp.FTPFile> buildFileEndpoint(String uri,
                                                                                    String remaining,
                                                                                    Map<String,Object> parameters)
                                                                             throws Exception
Description copied from class: GenericFileComponent
A factory method for derived file components to create the endpoint

Specified by:
buildFileEndpoint in class GenericFileComponent<org.apache.commons.net.ftp.FTPFile>
Parameters:
uri - the full URI of the endpoint
remaining - the remaining part of the URI without the query parameters or component prefix
parameters - the optional parameters passed in
Returns:
a newly created endpoint or null if the endpoint cannot be created based on the inputs
Throws:
Exception - can be thrown

getBaseUri

protected String getBaseUri(String uri)
get the base uri part before the options as they can be non URI valid such as the expression using $ chars and the URI constructor will regard $ as an illegal character and we dont want to enforce end users to to escape the $ for the expression (file language)


extractAndSetFtpClientConfigParameters

protected void extractAndSetFtpClientConfigParameters(Map<String,Object> parameters,
                                                      FtpEndpoint<org.apache.commons.net.ftp.FTPFile> answer)
Extract additional ftp client configuration options from the parameters map (parameters starting with 'ftpClientConfig.'). To remember these parameters, we set them in the endpoint and we can use them when creating a client.


extractAndSetFtpClientParameters

protected void extractAndSetFtpClientParameters(Map<String,Object> parameters,
                                                FtpEndpoint<org.apache.commons.net.ftp.FTPFile> answer)
Extract additional ftp client options from the parameters map (parameters starting with 'ftpClient.'). To remember these parameters, we set them in the endpoint and we can use them when creating a client.


afterPropertiesSet

protected void afterPropertiesSet(GenericFileEndpoint<org.apache.commons.net.ftp.FTPFile> endpoint)
                           throws Exception
Description copied from class: GenericFileComponent
A factory method for derived file components to perform validation of properties

Specified by:
afterPropertiesSet in class GenericFileComponent<org.apache.commons.net.ftp.FTPFile>
Parameters:
endpoint - the endpoint
Throws:
Exception - can be thrown in case of validation errors


Apache CAMEL