|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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
|
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,
MuleEvent event)
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 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 AbstractConnector
flowConstruct
- 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
Exception
protected ObjectPool getFtpPool(EndpointURI uri)
protected GenericObjectPool createPool(FtpConnectionFactory connectionFactory)
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 MuleException
AbstractConnector
doStart
in class AbstractConnector
MuleException
- if the method failsprotected void doStop() throws MuleException
AbstractConnector
doStop
in class AbstractConnector
MuleException
- 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, ImmutableEndpoint endpoint)
setPassive(boolean)
public boolean isBinary()
public void setBinary(boolean binary)
binary
- binary type flagpublic void setupFileType(org.apache.commons.net.ftp.FTPClient client, ImmutableEndpoint endpoint) throws Exception
Exception
setBinary(boolean)
public OutputStream getOutputStream(OutboundEndpoint endpoint, MuleEvent event) throws MuleException
getOutputStream
in interface Connector
getOutputStream
in class AbstractConnector
endpoint
- the endpoint that releates to this Dispatcherevent
- the current event being processed
MuleException
- in case of any errorprotected org.apache.commons.net.ftp.FTPClient createFtpClient(ImmutableEndpoint endpoint) throws Exception
endpoint
.
Exception
protected 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 |