org.adroitlogic.ultraesb.transport.file
Class FileTransportListener
java.lang.Object
org.adroitlogic.ultraesb.core.config.AbstractConfigurationElement
org.adroitlogic.ultraesb.transport.base.AbstractTransportListener
org.adroitlogic.ultraesb.transport.base.AbstractPollingTransportListener
org.adroitlogic.ultraesb.transport.file.FileTransportListener
- All Implemented Interfaces:
- ConfigurationElement, org.springframework.beans.factory.BeanNameAware, org.springframework.context.ApplicationContextAware
public class FileTransportListener
- extends org.adroitlogic.ultraesb.transport.base.AbstractPollingTransportListener
The File transport listener supporting polling of messages from: file, ftp, sftp and ftps protocols
Most of the file transport configuration is performed at the transport configuration section of the
Proxy service using the file transport. Proxy services are triggered either on a specified cron expression,
or as per specified {ultra.polling.start_delay, ultra.polling.repeat_interval, [ultra.polling.repeat_count]}
The available properties are as follows:
- url - the File or Directory URL e.g. file:///tmp/AS2/tosend
- ultra.file.name_pattern - if the 'url' points to a directory, the file name pattern to match as a regex e.g. ".*\.edi"
- ultra.polling.start_delay - number of milliseconds to wait before starting
- ultra.polling.repeat_interval - interval between successive polling runs specified in milli seconds
- ultra.polling.repeat_count - the number of iterations to execute the service (default: infinite)
- ultra.polling.cron_expression - an optional 'cron' expression specifying polling schedule - instead of a
ultra.polling.start_delay and ultra.polling.repeat_interval
- ultra.polling.concurrent - true implies concurrent polling by multiple threads
- ultra.file.move_after_process - local directory to move the file after successful processing
- ultra.file.move_after_failure - local directory to move files that fail processing
- ultra.file.move_timestamp_format - an optional timestamp pattern to rename processed files e.g. "yyyy_MM_dd_'T'HH_mm_ss.SSSSZ"
e.g. see sample # 350
For normal operations, there are no specific properties to be tuned.
However, the number of threads used maybe tuned where applicable by using the relevant constructor
Note: Remote files are always first fully downloaded before processing. File messages set the following values as
transport headers:
- See Also:
for transport headers set by this transport
| Nested classes/interfaces inherited from class org.adroitlogic.ultraesb.transport.base.AbstractPollingTransportListener |
org.adroitlogic.ultraesb.transport.base.AbstractPollingTransportListener.PollingJob |
| Fields inherited from class org.adroitlogic.ultraesb.transport.base.AbstractTransportListener |
logger, metrics, properties, transportName |
| Fields inherited from class org.adroitlogic.ultraesb.core.config.AbstractConfigurationElement |
config, ctx, debugOn, derivedName, id, outdated, state |
| Methods inherited from class org.adroitlogic.ultraesb.transport.base.AbstractPollingTransportListener |
customizeJobDataMap, execute, maintenanceShutdown, onPoll, pause, registerProxyService, resume, start, stop, unregisterProxyService |
| Methods inherited from class org.adroitlogic.ultraesb.transport.base.AbstractTransportListener |
getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getDetails, getFaultsReceiving, getFaultsSending, getLastResetTime, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMetricsWindow, getMinSizeReceived, getMinSizeSent, getReceiveErrorCodeTable, getSendErrorCodeTable, getTimeoutsReceiving, getTimeoutsSending, init, resetStatistics, setProperties, toBasicView, toDetailedView, toDetailedViewExt |
| Methods inherited from class org.adroitlogic.ultraesb.core.config.AbstractConfigurationElement |
equals, getAppCtx, getDerivedName, getId, getState, hashCode, isDebugOn, isStarted, markAsOutdated, setApplicationContext, setBeanName, setConfig, setDebugOn, setDerivedName, setId, setState, throwIllegalStateException, undeploy |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
FileTransportListener
public FileTransportListener()
- Default constructor
FileTransportListener
public FileTransportListener(int threads)
- The constructor allowing the tuning of allocated threads for polling
- Parameters:
threads - number of polling threads
setTempDirectory
public void setTempDirectory(java.io.File tempDirectory)
setUseSafeLock
public void setUseSafeLock(boolean useSafeLock)