public class FtpSenderEndpoint extends ProviderEndpoint implements FtpEndpointType
loggerdefinition, description, endpoint, interfaceName, service, serviceUnit| Constructor and Description |
|---|
FtpSenderEndpoint() |
FtpSenderEndpoint(FtpComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.commons.net.ftp.FTPClient |
borrowClient() |
protected FTPClientPool |
createClientPool() |
FTPClientPool |
getClientPool() |
org.apache.servicemix.components.util.FileMarshaler |
getMarshaler() |
java.lang.String |
getUniqueFileName() |
protected java.lang.String |
getUploadName(java.lang.String name)
Deprecated.
|
java.lang.String |
getUploadPrefix()
Deprecated.
|
java.lang.String |
getUploadSuffix()
Deprecated.
|
boolean |
isAutoCreateDirectory() |
boolean |
isCheckDuplicates() |
boolean |
isOverwrite() |
protected void |
processInOnly(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message) |
protected void |
returnClient(org.apache.commons.net.ftp.FTPClient client) |
void |
setAutoCreateDirectory(boolean autoCreateDirectory)
Specifies if the endpoint should create the target directory, if it does
not already exist.
|
void |
setCheckDuplicates(boolean checkDuplicates)
Specifies whether duplicates should be checked.
|
void |
setClientPool(FTPClientPool clientPool)
Set a custom FTPClientPool.
|
void |
setMarshaler(org.apache.servicemix.components.util.FileMarshaler marshaler)
Set a custom FileMarshaler implementation to control how the file contents is being translated into a JBI message.
|
void |
setOverwrite(boolean overwrite)
Specifies if a file with the same name already exists on the FTP server, the file should be overwritten.
|
void |
setUniqueFileName(java.lang.String uniqueFileName)
Sets the name used to make a unique name if no file name is available on the message.
|
void |
setUploadPrefix(java.lang.String uploadPrefix)
Deprecated.
|
void |
setUploadSuffix(java.lang.String uploadSuffix)
Deprecated.
|
void |
setUri(java.net.URI uri)
Configures the endpoint from a URI
|
void |
start() |
void |
validate() |
activate, deactivate, getRole, process, processInOutdone, fail, getChannel, getContext, getExchangeFactory, send, sendSync, stopgetDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toStringpublic FtpSenderEndpoint()
public FtpSenderEndpoint(FtpComponent component, javax.jbi.servicedesc.ServiceEndpoint endpoint)
public void validate()
throws javax.jbi.management.DeploymentException
validate in interface Endpointvalidate in class AbstractEndpointjavax.jbi.management.DeploymentExceptionpublic void setUri(java.net.URI uri)
public boolean isCheckDuplicates()
public void setCheckDuplicates(boolean checkDuplicates)
true.checkDuplicates - is a boolean specifying whether duplicate should be checked. Default value is true.
.public void start()
throws java.lang.Exception
start in interface Endpointstart in class SimpleEndpointjava.lang.Exceptionpublic FTPClientPool getClientPool()
public void setClientPool(FTPClientPool clientPool)
clientPool - the clientPool implementation to usepublic org.apache.servicemix.components.util.FileMarshaler getMarshaler()
public void setMarshaler(org.apache.servicemix.components.util.FileMarshaler marshaler)
marshaler - the marshaler implementation to usepublic java.lang.String getUniqueFileName()
public void setUniqueFileName(java.lang.String uniqueFileName)
uniqueFileName - the new value of the unique name to use for generating unique namespublic boolean isOverwrite()
public void setOverwrite(boolean overwrite)
false.overwrite - if a file with the same name already exists on the FTP server, the file should be overwritten.@Deprecated public java.lang.String getUploadPrefix()
@Deprecated public void setUploadPrefix(java.lang.String uploadPrefix)
uploadPrefix - @Deprecated public java.lang.String getUploadSuffix()
@Deprecated public void setUploadSuffix(java.lang.String uploadSuffix)
uploadSuffix - public void setAutoCreateDirectory(boolean autoCreateDirectory)
false and the
directory does not exist, the endpoint will not do anything. Default
value is true.autoCreateDirectory - a boolean specifying if the endpoint creates
directories.public boolean isAutoCreateDirectory()
protected void processInOnly(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message)
throws java.lang.Exception
processInOnly in class ProviderEndpointjava.lang.Exception@Deprecated protected java.lang.String getUploadName(java.lang.String name)
protected FTPClientPool createClientPool() throws java.lang.Exception
java.lang.Exceptionprotected org.apache.commons.net.ftp.FTPClient borrowClient()
throws javax.jbi.JBIException
javax.jbi.JBIExceptionprotected void returnClient(org.apache.commons.net.ftp.FTPClient client)
Copyright © 2005-2016 FuseSource. All Rights Reserved.