|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.providers.AbstractConnector
org.mule.providers.ftp.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 |
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.umo.provider.UMOConnector |
INT_VALUE_NOT_SET |
Constructor Summary | |
FtpConnector()
|
Method Summary | |
UMOMessageReceiver |
createReceiver(UMOComponent component,
UMOEndpoint endpoint)
Create a Message receiver for this connector |
void |
destroyFtp(UMOEndpointURI 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,
UMOImmutableEndpoint endpoint)
Passive mode is OFF by default. |
String |
getConnectionFactoryClass()
Getter for property 'connectionFactoryClass'. |
FilenameParser |
getFilenameParser()
|
org.apache.commons.net.ftp.FTPClient |
getFtp(UMOEndpointURI uri)
|
protected ObjectPool |
getFtpPool(UMOEndpointURI uri)
|
String |
getOutputPattern()
|
OutputStream |
getOutputStream(UMOImmutableEndpoint endpoint,
UMOMessage message)
Well get the output stream (if any) for this type of transport. |
long |
getPollingFrequency()
|
String |
getProtocol()
|
boolean |
isBinary()
Getter for FTP transfer type. |
boolean |
isPassive()
Getter for FTP passive mode. |
boolean |
isValidateConnections()
Whether to test FTP connection on each take from pool. |
void |
releaseFtp(UMOEndpointURI 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 |
setupFileType(org.apache.commons.net.ftp.FTPClient client,
UMOImmutableEndpoint endpoint)
Transfer type is BINARY by default. |
void |
setValidateConnections(boolean validateConnections)
Whether to test FTP connection on each take from pool. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String PROPERTY_POLLING_FREQUENCY
public static final String PROPERTY_FILENAME
public static final String PROPERTY_OUTPUT_PATTERN
public static final String PROPERTY_PASSIVE_MODE
public static final String PROPERTY_BINARY_TRANSFER
public static final int DEFAULT_POLLING_FREQUENCY
public static final String DEFAULT_FTP_CONNECTION_FACTORY_CLASS
Constructor Detail |
public FtpConnector()
Method Detail |
public String getProtocol()
public UMOMessageReceiver createReceiver(UMOComponent component, UMOEndpoint endpoint) throws Exception
AbstractConnector
createReceiver
in class AbstractConnector
component
- the component that will receive events from this receiver,
the listenerendpoint
- the endpoint that defies this inbound communication
TransportServiceDescriptor
initialised using the component and endpoint.
Exception
- if there is a problem creating the receiver. This exception
really depends on the underlying transport, thus any exception
could be thrownpublic 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(UMOEndpointURI uri) throws Exception
Exception
public void releaseFtp(UMOEndpointURI uri, org.apache.commons.net.ftp.FTPClient client) throws Exception
Exception
public void destroyFtp(UMOEndpointURI uri, org.apache.commons.net.ftp.FTPClient client) throws Exception
Exception
protected ObjectPool getFtpPool(UMOEndpointURI uri)
protected void doInitialise() throws InitialisationException
doInitialise
in class AbstractConnector
InitialisationException
protected void doDispose()
AbstractConnector
doDispose
in class AbstractConnector
protected void doConnect() throws Exception
AbstractConnector
doConnect
in class AbstractConnector
Exception
protected void doDisconnect() throws Exception
AbstractConnector
doDisconnect
in class AbstractConnector
Exception
protected void doStart() throws UMOException
AbstractConnector
doStart
in class AbstractConnector
UMOException
- if the method failsprotected void doStop() throws UMOException
AbstractConnector
doStop
in class AbstractConnector
UMOException
- 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 flagpublic void enterActiveOrPassiveMode(org.apache.commons.net.ftp.FTPClient client, UMOImmutableEndpoint endpoint)
setPassive(boolean)
public boolean isValidateConnections()
public void setValidateConnections(boolean validateConnections)
true
public boolean isBinary()
public void setBinary(boolean binary)
binary
- binary type flagpublic void setupFileType(org.apache.commons.net.ftp.FTPClient client, UMOImmutableEndpoint endpoint) throws Exception
Exception
setBinary(boolean)
public OutputStream getOutputStream(UMOImmutableEndpoint endpoint, UMOMessage message) throws UMOException
getOutputStream
in interface UMOConnector
getOutputStream
in class AbstractConnector
endpoint
- the endpoint that releates to this Dispatchermessage
- the current message being processed
UMOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |