org.apache.servicemix.ftp
Class FtpSenderEndpoint
java.lang.Object
org.apache.servicemix.common.endpoints.AbstractEndpoint
org.apache.servicemix.common.endpoints.SimpleEndpoint
org.apache.servicemix.common.endpoints.ProviderEndpoint
org.apache.servicemix.ftp.FtpSenderEndpoint
- All Implemented Interfaces:
- Endpoint, FtpEndpointType
public class FtpSenderEndpoint
- extends ProviderEndpoint
- implements FtpEndpointType
An FTP endpoint
- Version:
- $Revision: $
| Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint |
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString |
FtpSenderEndpoint
public FtpSenderEndpoint()
FtpSenderEndpoint
public FtpSenderEndpoint(FtpComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint)
validate
public void validate()
throws javax.jbi.management.DeploymentException
- Specified by:
validate in interface Endpoint- Overrides:
validate in class AbstractEndpoint
- Throws:
javax.jbi.management.DeploymentException
setUri
public void setUri(URI uri)
- Configures the endpoint from a URI
isCheckDuplicates
public boolean isCheckDuplicates()
setCheckDuplicates
public void setCheckDuplicates(boolean checkDuplicates)
start
public void start()
throws Exception
- Specified by:
start in interface Endpoint- Overrides:
start in class SimpleEndpoint
- Throws:
Exception
getClientPool
public FTPClientPool getClientPool()
setClientPool
public void setClientPool(FTPClientPool clientPool)
getMarshaler
public org.apache.servicemix.components.util.FileMarshaler getMarshaler()
setMarshaler
public void setMarshaler(org.apache.servicemix.components.util.FileMarshaler marshaler)
getUniqueFileName
public String getUniqueFileName()
setUniqueFileName
public void setUniqueFileName(String uniqueFileName)
- Sets the name used to make a unique name if no file name is available on the message.
- Parameters:
uniqueFileName - the new value of the unique name to use for generating unique names
isOverwrite
public boolean isOverwrite()
setOverwrite
public void setOverwrite(boolean overwrite)
getUploadPrefix
public String getUploadPrefix()
setUploadPrefix
public void setUploadPrefix(String uploadPrefix)
- Set the file name prefix used during upload. The prefix will be automatically removed as soon as the upload has completed.
This allows other processes to discern completed files from files that are being uploaded.
- Parameters:
uploadPrefix -
getUploadSuffix
public String getUploadSuffix()
setUploadSuffix
public void setUploadSuffix(String uploadSuffix)
- Set the file name suffix used during upload. The suffix will be automatically removed as soon as the upload has completed.
This allows other processes to discern completed files from files that are being uploaded.
- Parameters:
uploadSuffix -
processInOnly
protected void processInOnly(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message)
throws Exception
- Overrides:
processInOnly in class ProviderEndpoint
- Throws:
Exception
getUploadName
protected String getUploadName(String name)
createClientPool
protected FTPClientPool createClientPool()
throws Exception
- Throws:
Exception
borrowClient
protected org.apache.commons.net.ftp.FTPClient borrowClient()
throws javax.jbi.JBIException
- Throws:
javax.jbi.JBIException
returnClient
protected void returnClient(org.apache.commons.net.ftp.FTPClient client)
Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.