org.mule.providers.file
Class FileConnector
java.lang.Object
org.mule.providers.AbstractConnector
org.mule.providers.AbstractServiceEnabledConnector
org.mule.providers.file.FileConnector
- All Implemented Interfaces:
- Disposable, ExceptionListener, Initialisable, UMOConnectable, UMOConnector
- public class FileConnector
- extends AbstractServiceEnabledConnector
FileConnector is used for setting up listeners on a directory and
for writing files to a directory. The connecotry provides support for defining
file output patterns and filters for receiving files.
| Fields inherited from class org.mule.providers.AbstractConnector |
connected, connecting, createDispatcherPerRequest, createMultipleTransactedReceivers, defaultInboundTransformer, defaultOutboundTransformer, defaultResponseTransformer, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, name, receivers, serverSide, sessionHandler, started, startOnConnect |
| Methods inherited from class org.mule.providers.AbstractConnector |
checkDisposed, connect, createDispatcher, destroyReceiver, disconnect, dispose, disposeDispatchers, disposeReceivers, doConnect, doDisconnect, doStart, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getConnectionStrategy, getDefaultInboundTransformer, getDefaultOutboundTransformer, getDefaultResponseTransformer, getDispatcher, getDispatcher, getDispatcherFactory, getDispatchers, getDispatcherThreadingProfile, getExceptionListener, getName, getReceiver, getReceiver, getReceivers, getReceivers, getReceiverThreadingProfile, getReplyToHandler, getSessionHandler, getSupportedProtocols, handleException, handleWorkException, initialise, isConnected, isCreateDispatcherPerRequest, isCreateMultipleTransactedReceivers, isDisposed, isDisposing, isEnableMessageEvents, isRemoteSyncEnabled, isServerSide, isStarted, isUseSingleDispatcherThreadPool, isUseSingleReceiverThreadPool, lookupDispatcher, lookupReceiver, registerListener, registerSupportedProtocol, registerSupportedProtocolWithotPrefix, setConnectionStrategy, setCreateDispatcherPerRequest, setCreateMultipleTransactedReceivers, setDefaultInboundTransformer, setDefaultOutboundTransformer, setDefaultResponseTransformer, setDispatcherFactory, setDispatcherThreadingProfile, setEnableMessageEvents, setExceptionListener, setName, setReceiverThreadingProfile, setServerSide, setSessionHandler, setSupportedProtocols, setUseSingleDispatcherThreadPool, setUseSingleReceiverThreadPool, startConnector, stopConnector, supportsProtocol, unregisterListener, unregisterSupportedProtocol, workAccepted, workCompleted, workRejected, workStarted |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_POLLING_FREQUENCY
public static final String PROPERTY_POLLING_FREQUENCY
- See Also:
- Constant Field Values
PROPERTY_FILE_AGE
public static final String PROPERTY_FILE_AGE
- See Also:
- Constant Field Values
PROPERTY_FILENAME
public static final String PROPERTY_FILENAME
- See Also:
- Constant Field Values
PROPERTY_ORIGINAL_FILENAME
public static final String PROPERTY_ORIGINAL_FILENAME
- See Also:
- Constant Field Values
PROPERTY_OUTPUT_PATTERN
public static final String PROPERTY_OUTPUT_PATTERN
- See Also:
- Constant Field Values
PROPERTY_MOVE_TO_PATTERN
public static final String PROPERTY_MOVE_TO_PATTERN
- See Also:
- Constant Field Values
PROPERTY_MOVE_TO_DIRECTORY
public static final String PROPERTY_MOVE_TO_DIRECTORY
- See Also:
- Constant Field Values
PROPERTY_DELETE_ON_READ
public static final String PROPERTY_DELETE_ON_READ
- See Also:
- Constant Field Values
PROPERTY_DIRECTORY
public static final String PROPERTY_DIRECTORY
- See Also:
- Constant Field Values
PROPERTY_SERVICE_OVERRIDE
public static final String PROPERTY_SERVICE_OVERRIDE
- See Also:
- Constant Field Values
PROPERTY_WRITE_TO_DIRECTORY
public static final String PROPERTY_WRITE_TO_DIRECTORY
- See Also:
- Constant Field Values
DEFAULT_POLLING_FREQUENCY
public static final long DEFAULT_POLLING_FREQUENCY
- See Also:
- Constant Field Values
filenameParser
public FilenameParser filenameParser
FileConnector
public FileConnector()
getReceiverKey
protected Object getReceiverKey(UMOComponent component,
UMOEndpoint endpoint)
- Description copied from class:
AbstractConnector
- The method determines the key used to store the receiver against.
- Overrides:
getReceiverKey in class AbstractConnector
- Parameters:
component - the component for which the endpoint is being registeredendpoint - the endpoint being registered for the component
- Returns:
- the key to store the newly created receiver against
createReceiver
public UMOMessageReceiver createReceiver(UMOComponent component,
UMOEndpoint endpoint)
throws Exception
- Registers a listener for a particular directory The following properties can
be overriden in the endpoint declaration
- moveToDirectory
- filterPatterns
- filterClass
- pollingFrequency
- Overrides:
createReceiver in class AbstractServiceEnabledConnector
- Throws:
Exception
doStop
protected void doStop()
throws UMOException
- Description copied from class:
AbstractConnector
- Template method to perform any work when stopping the connectoe
- Overrides:
doStop in class AbstractConnector
- Throws:
UMOException - if the method fails
getProtocol
public String getProtocol()
- Specified by:
getProtocol in interface UMOConnector- Specified by:
getProtocol in class AbstractConnector
getFilenameParser
public FilenameParser getFilenameParser()
setFilenameParser
public void setFilenameParser(FilenameParser filenameParser)
doDispose
protected void doDispose()
- Description copied from class:
AbstractConnector
- Template method to perform any work when destroying the connectoe
- Overrides:
doDispose in class AbstractConnector
getMoveToDirectory
public String getMoveToDirectory()
- Returns:
- Returns the moveToDirectoryName.
setMoveToDirectory
public void setMoveToDirectory(String dir)
- Parameters:
dir - The moveToDirectoryName to set.
isOutputAppend
public boolean isOutputAppend()
- Returns:
- Returns the outputAppend.
setOutputAppend
public void setOutputAppend(boolean outputAppend)
- Parameters:
outputAppend - The outputAppend to set.
getOutputPattern
public String getOutputPattern()
- Returns:
- Returns the outputPattern.
setOutputPattern
public void setOutputPattern(String outputPattern)
- Parameters:
outputPattern - The outputPattern to set.
getOutputStream
public FileOutputStream getOutputStream()
- Returns:
- Returns the outputStream.
setOutputStream
public void setOutputStream(FileOutputStream outputStream)
- Parameters:
outputStream - The outputStream to set.
getPollingFrequency
public long getPollingFrequency()
- Returns:
- Returns the pollingFrequency.
setPollingFrequency
public void setPollingFrequency(long pollingFrequency)
- Parameters:
pollingFrequency - The pollingFrequency to set.
getFileAge
public long getFileAge()
- Returns:
- Returns the fileAge.
getCheckFileAge
public boolean getCheckFileAge()
setFileAge
public void setFileAge(long fileAge)
- Parameters:
fileAge - The fileAge in seconds to set.
getWriteToDirectory
public String getWriteToDirectory()
- Returns:
- Returns the writeToDirectory.
setWriteToDirectory
public void setWriteToDirectory(String dir)
throws IOException
- Parameters:
dir - The writeToDirectory to set.
- Throws:
IOException
isSerialiseObjects
public boolean isSerialiseObjects()
setSerialiseObjects
public void setSerialiseObjects(boolean serialiseObjects)
isAutoDelete
public boolean isAutoDelete()
setAutoDelete
public void setAutoDelete(boolean autoDelete)
getMoveToPattern
public String getMoveToPattern()
setMoveToPattern
public void setMoveToPattern(String moveToPattern)
Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.