|
||||||||||
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 java.lang.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 java.lang.String |
FTP
|
static java.lang.String |
PROPERTY_BINARY_TRANSFER
|
static java.lang.String |
PROPERTY_FILENAME
|
static java.lang.String |
PROPERTY_OUTPUT_PATTERN
|
static java.lang.String |
PROPERTY_PASSIVE_MODE
|
static java.lang.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. |
java.lang.String |
getConnectionFactoryClass()
Getter for property 'connectionFactoryClass'. |
FilenameParser |
getFilenameParser()
|
org.apache.commons.net.ftp.FTPClient |
getFtp(EndpointURI uri)
|
protected ObjectPool |
getFtpPool(EndpointURI uri)
|
java.lang.String |
getOutputPattern()
|
java.io.OutputStream |
getOutputStream(OutboundEndpoint endpoint,
MuleEvent event)
Well get the output stream (if any) for this type of transport. |
long |
getPollingFrequency()
|
java.lang.String |
getProtocol()
|
protected java.util.List |
getReceiverArguments(java.util.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(java.lang.String connectionFactoryClass)
Setter for property 'connectionFactoryClass'. |
void |
setFilenameParser(FilenameParser filenameParser)
|
void |
setOutputPattern(java.lang.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 java.lang.String FTP
public static final java.lang.String PROPERTY_POLLING_FREQUENCY
public static final int DEFAULT_POLLING_FREQUENCY
public static final java.lang.String PROPERTY_OUTPUT_PATTERN
public static final java.lang.String PROPERTY_PASSIVE_MODE
public static final java.lang.String PROPERTY_BINARY_TRANSFER
public static final java.lang.String PROPERTY_FILENAME
public static final java.lang.String DEFAULT_FTP_CONNECTION_FACTORY_CLASS
Constructor Detail |
---|
public FtpConnector(MuleContext context)
Method Detail |
---|
public java.lang.String getProtocol()
public MessageReceiver createReceiver(FlowConstruct flowConstruct, InboundEndpoint endpoint) throws java.lang.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.
java.lang.Exception
- if there is a problem creating the receiver. This exception
really depends on the underlying transport, thus any exception
could be thrownprotected java.util.List getReceiverArguments(java.util.Map endpointProperties)
public long getPollingFrequency()
public void setPollingFrequency(long pollingFrequency)
pollingFrequency
- The pollingFrequency to set.public java.lang.String getConnectionFactoryClass()
public void setConnectionFactoryClass(java.lang.String connectionFactoryClass)
FtpConnectionFactory
.
connectionFactoryClass
- Value to set for property 'connectionFactoryClass'.public org.apache.commons.net.ftp.FTPClient getFtp(EndpointURI uri) throws java.lang.Exception
java.lang.Exception
public void releaseFtp(EndpointURI uri, org.apache.commons.net.ftp.FTPClient client) throws java.lang.Exception
java.lang.Exception
public void destroyFtp(EndpointURI uri, org.apache.commons.net.ftp.FTPClient client) throws java.lang.Exception
java.lang.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 java.lang.Exception
AbstractConnector
doConnect
in class AbstractConnector
java.lang.Exception
protected void doDisconnect() throws java.lang.Exception
AbstractConnector
doDisconnect
in class AbstractConnector
java.lang.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 java.lang.String getOutputPattern()
public void setOutputPattern(java.lang.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 java.lang.Exception
java.lang.Exception
setBinary(boolean)
public java.io.OutputStream getOutputStream(OutboundEndpoint endpoint, MuleEvent event) throws MuleException
getOutputStream
in interface Connector
getOutputStream
in class AbstractConnector
endpoint
- the endpoint that releates to this Dispatchermessage
- the current message being processed
MuleException
protected org.apache.commons.net.ftp.FTPClient createFtpClient(ImmutableEndpoint endpoint) throws java.lang.Exception
endpoint
.
java.lang.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 |