|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.transport.AbstractConnector
org.mule.transport.ftp.FtpConnector
public class FtpConnector
| Field Summary | |
|---|---|
static String |
DEFAULT_FTP_CONNECTION_FACTORY_CLASS
TODO it makes sense to have a type-safe adapter for FTP specifically, but without Java 5's covariant return types the benefits are diminished. |
static int |
DEFAULT_POLLING_FREQUENCY
|
static String |
FTP
|
static String |
PROPERTY_BINARY_TRANSFER
|
static String |
PROPERTY_FILENAME
|
static String |
PROPERTY_OUTPUT_PATTERN
|
static String |
PROPERTY_PASSIVE_MODE
|
static String |
PROPERTY_POLLING_FREQUENCY
|
| Fields inherited from interface org.mule.api.transport.Connector |
|---|
INT_VALUE_NOT_SET |
| Fields inherited from interface org.mule.api.lifecycle.Disposable |
|---|
PHASE_NAME |
| Constructor Summary | |
|---|---|
FtpConnector(MuleContext context)
|
|
| Method Summary | |
|---|---|
protected org.apache.commons.net.ftp.FTPClient |
createFtpClient(ImmutableEndpoint endpoint)
Creates a new FTPClient that logs in and changes the working directory using the data provided in endpoint. |
protected GenericObjectPool |
createPool(FtpConnectionFactory connectionFactory)
|
MessageReceiver |
createReceiver(FlowConstruct flowConstruct,
InboundEndpoint endpoint)
Create a Message receiver for this connector |
void |
destroyFtp(EndpointURI uri,
org.apache.commons.net.ftp.FTPClient client)
|
protected void |
doConnect()
Template method where any connections should be made for the connector |
protected void |
doDisconnect()
Template method where any connected resources used by the connector should be disconnected |
protected void |
doDispose()
Template method to perform any work when destroying the connectoe |
protected void |
doInitialise()
|
protected void |
doStart()
Template method to perform any work when starting the connectoe |
protected void |
doStop()
Template method to perform any work when stopping the connectoe |
void |
enterActiveOrPassiveMode(org.apache.commons.net.ftp.FTPClient client,
ImmutableEndpoint endpoint)
Passive mode is OFF by default. |
String |
getConnectionFactoryClass()
Getter for property 'connectionFactoryClass'. |
FilenameParser |
getFilenameParser()
|
org.apache.commons.net.ftp.FTPClient |
getFtp(EndpointURI uri)
|
protected ObjectPool |
getFtpPool(EndpointURI uri)
|
String |
getOutputPattern()
|
OutputStream |
getOutputStream(OutboundEndpoint endpoint,
MuleMessage message)
Well get the output stream (if any) for this type of transport. |
long |
getPollingFrequency()
|
String |
getProtocol()
|
protected List |
getReceiverArguments(Map endpointProperties)
|
boolean |
isBinary()
Getter for FTP transfer type. |
boolean |
isPassive()
Getter for FTP passive mode. |
boolean |
isStreaming()
|
void |
releaseFtp(EndpointURI uri,
org.apache.commons.net.ftp.FTPClient client)
|
void |
setBinary(boolean binary)
Setter for FTP transfer type. |
void |
setConnectionFactoryClass(String connectionFactoryClass)
Setter for property 'connectionFactoryClass'. |
void |
setFilenameParser(FilenameParser filenameParser)
|
void |
setOutputPattern(String outputPattern)
|
void |
setPassive(boolean passive)
Setter for FTP passive mode. |
void |
setPollingFrequency(long pollingFrequency)
|
void |
setStreaming(boolean streaming)
|
void |
setupFileType(org.apache.commons.net.ftp.FTPClient client,
ImmutableEndpoint endpoint)
Transfer type is BINARY by default. |
protected boolean |
validateFile(org.apache.commons.net.ftp.FTPFile file)
Override this method to do extra checking on the file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String FTP
public static final String PROPERTY_POLLING_FREQUENCY
public static final int DEFAULT_POLLING_FREQUENCY
public static final String PROPERTY_OUTPUT_PATTERN
public static final String PROPERTY_PASSIVE_MODE
public static final String PROPERTY_BINARY_TRANSFER
public static final String PROPERTY_FILENAME
public static final String DEFAULT_FTP_CONNECTION_FACTORY_CLASS
| Constructor Detail |
|---|
public FtpConnector(MuleContext context)
| Method Detail |
|---|
public String getProtocol()
public MessageReceiver createReceiver(FlowConstruct flowConstruct,
InboundEndpoint endpoint)
throws Exception
AbstractConnector
createReceiver in class AbstractConnectorflowConstruct - the service that will receive events from this receiver, the
listenerendpoint - the endpoint that defies this inbound communication
TransportServiceDescriptor
initialised using the service and endpoint.
Exception - if there is a problem creating the receiver. This exception
really depends on the underlying transport, thus any exception
could be thrownprotected List getReceiverArguments(Map endpointProperties)
public long getPollingFrequency()
public void setPollingFrequency(long pollingFrequency)
pollingFrequency - The pollingFrequency to set.public String getConnectionFactoryClass()
public void setConnectionFactoryClass(String connectionFactoryClass)
FtpConnectionFactory.
connectionFactoryClass - Value to set for property 'connectionFactoryClass'.
public org.apache.commons.net.ftp.FTPClient getFtp(EndpointURI uri)
throws Exception
Exception
public void releaseFtp(EndpointURI uri,
org.apache.commons.net.ftp.FTPClient client)
throws Exception
Exception
public void destroyFtp(EndpointURI uri,
org.apache.commons.net.ftp.FTPClient client)
throws Exception
Exceptionprotected ObjectPool getFtpPool(EndpointURI uri)
protected GenericObjectPool createPool(FtpConnectionFactory connectionFactory)
protected void doInitialise()
throws InitialisationException
doInitialise in class AbstractConnectorInitialisationExceptionprotected void doDispose()
AbstractConnector
doDispose in class AbstractConnector
protected void doConnect()
throws Exception
AbstractConnector
doConnect in class AbstractConnectorException
protected void doDisconnect()
throws Exception
AbstractConnector
doDisconnect in class AbstractConnectorException
protected void doStart()
throws MuleException
AbstractConnector
doStart in class AbstractConnectorMuleException - if the method fails
protected void doStop()
throws MuleException
AbstractConnector
doStop in class AbstractConnectorMuleException - if the method failspublic String getOutputPattern()
public void setOutputPattern(String outputPattern)
outputPattern - The outputPattern to set.public FilenameParser getFilenameParser()
public void setFilenameParser(FilenameParser filenameParser)
filenameParser - The filenameParser to set.public boolean isPassive()
public void setPassive(boolean passive)
passive - passive mode flag
public void enterActiveOrPassiveMode(org.apache.commons.net.ftp.FTPClient client,
ImmutableEndpoint endpoint)
setPassive(boolean)public boolean isBinary()
public void setBinary(boolean binary)
binary - binary type flag
public void setupFileType(org.apache.commons.net.ftp.FTPClient client,
ImmutableEndpoint endpoint)
throws Exception
ExceptionsetBinary(boolean)
public OutputStream getOutputStream(OutboundEndpoint endpoint,
MuleMessage message)
throws MuleException
getOutputStream in interface ConnectorgetOutputStream in class AbstractConnectorendpoint - the endpoint that releates to this Dispatchermessage - the current message being processed
MuleException
protected org.apache.commons.net.ftp.FTPClient createFtpClient(ImmutableEndpoint endpoint)
throws Exception
endpoint.
Exceptionprotected boolean validateFile(org.apache.commons.net.ftp.FTPFile file)
public boolean isStreaming()
public void setStreaming(boolean streaming)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||