org.mule.providers.file
Class FileConnector
java.lang.Object
org.mule.providers.AbstractConnector
org.mule.providers.file.FileConnector
- All Implemented Interfaces:
- org.mule.umo.lifecycle.Disposable, EventListener, ExceptionListener, org.mule.umo.lifecycle.Initialisable, org.mule.umo.lifecycle.Lifecycle, org.mule.impl.ManagementContextAware, org.mule.umo.NamedObject, org.mule.umo.lifecycle.Startable, org.mule.umo.lifecycle.Stoppable, org.mule.umo.provider.UMOConnectable, org.mule.umo.provider.UMOConnector, WorkListener
- public class FileConnector
- extends org.mule.providers.AbstractConnector
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, connectionStrategy, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, managementContext, name, numberOfConcurrentTransactedReceivers, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect |
| Fields inherited from interface org.mule.umo.provider.UMOConnector |
INT_VALUE_NOT_SET |
| Fields inherited from interface org.mule.umo.lifecycle.Initialisable |
PHASE_NAME |
| Fields inherited from interface org.mule.umo.lifecycle.Startable |
PHASE_NAME |
| Fields inherited from interface org.mule.umo.lifecycle.Stoppable |
PHASE_NAME |
| Fields inherited from interface org.mule.umo.lifecycle.Disposable |
PHASE_NAME |
| Methods inherited from class org.mule.providers.AbstractConnector |
checkDisposed, connect, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeRequesters, disposeWorkManagers, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getConnectionStrategy, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getManagementContext, getMaxDispatchersActive, getMaxRequestersActive, getMessageAdapter, getName, getNumberOfConcurrentTransactedReceivers, getReceiver, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isDisposing, isEnableMessageEvents, isRemoteSyncEnabled, isStarted, isSyncEnabled, lookupReceiver, registerListener, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, send, setConnectionStrategy, setCreateMultipleTransactedReceivers, setDispatcherFactory, setDispatcherThreadingProfile, setDynamicNotification, setExceptionListener, setManagementContext, setMaxDispatchersActive, setMaxRequestersActive, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setRequesterFactory, setRequesterThreadingProfile, setServiceOverrides, setSessionHandler, setSupportedProtocols, setupDispatchReturn, setupRequestReturn, start, stop, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, updateCachedNotificationHandler, workAccepted, workCompleted, workRejected, workStarted |
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
PROPERTY_READ_FROM_DIRECTORY
public static final String PROPERTY_READ_FROM_DIRECTORY
- See Also:
- Constant Field Values
PROPERTY_FILE_SIZE
public static final String PROPERTY_FILE_SIZE
- 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(org.mule.umo.UMOComponent component,
org.mule.umo.endpoint.UMOImmutableEndpoint endpoint)
createReceiver
public org.mule.umo.provider.UMOMessageReceiver createReceiver(org.mule.umo.UMOComponent component,
org.mule.umo.endpoint.UMOImmutableEndpoint endpoint)
throws Exception
- Registers a listener for a particular directory The following properties can
be overriden in the endpoint declaration
- moveToDirectory
- filterPatterns
- filterClass
- pollingFrequency
- Throws:
Exception
getProtocol
public String getProtocol()
getFilenameParser
public FilenameParser getFilenameParser()
setFilenameParser
public void setFilenameParser(FilenameParser filenameParser)
doDispose
protected void doDispose()
doInitialise
protected void doInitialise()
throws org.mule.umo.lifecycle.InitialisationException
- Throws:
org.mule.umo.lifecycle.InitialisationException
doConnect
protected void doConnect()
throws Exception
- Throws:
Exception
doDisconnect
protected void doDisconnect()
throws Exception
- Throws:
Exception
doStart
protected void doStart()
throws org.mule.umo.UMOException
- Throws:
org.mule.umo.UMOException
doStop
protected void doStop()
throws org.mule.umo.UMOException
- Throws:
org.mule.umo.UMOException
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 milliseconds 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
getReadFromDirectory
public String getReadFromDirectory()
- Returns:
- Returns the readFromDirectory.
setReadFromDirectory
public void setReadFromDirectory(String dir)
throws IOException
- Parameters:
dir - The readFromDirectory 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)
getOutputStream
public OutputStream getOutputStream(org.mule.umo.endpoint.UMOImmutableEndpoint endpoint,
org.mule.umo.UMOMessage message)
throws org.mule.umo.UMOException
- Well get the output stream (if any) for this type of transport. Typically this
will be called only when Streaming is being used on an outbound endpoint
- Parameters:
endpoint - the endpoint that releates to this Dispatchermessage - the current message being processed
- Returns:
- the output stream to use for this request or null if the transport
does not support streaming
- Throws:
org.mule.umo.UMOException
isStreaming
public boolean isStreaming()
setStreaming
public void setStreaming(boolean streaming)
Copyright © 2003-2007 MuleSource, Inc.. All Rights Reserved.