org.jboss.soa.esb.listeners.gateway
Class AbstractFileGateway
java.lang.Object
org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle
org.jboss.soa.esb.listeners.lifecycle.AbstractScheduledManagedLifecycle
org.jboss.soa.esb.listeners.gateway.AbstractFileGateway
- All Implemented Interfaces:
- ManagedLifecycle
- Direct Known Subclasses:
- FileGatewayListener
public abstract class AbstractFileGateway
- extends AbstractScheduledManagedLifecycle
Base class for all file gateways: local filesystem, ftp, sftp and ftps.
Implementations for file manipulation (getFileList, getFileContents,
renameFile and deleteFile) must be provided by factory
- Since:
- Version 4.0
- Author:
- schifest@heuristica.com.ar
Methods inherited from class org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle |
addManagedLifecycleEventListener, changeState, destroy, getConfig, getState, getTerminationPeriod, initialise, removeManagedLifecycleEventListener, start, stop, waitUntilDestroyed, waitUntilDestroyed, waitUntilNotState, waitUntilState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_logger
protected static final org.apache.log4j.Logger _logger
config
protected ConfigTree config
_maxMillisForResponse
protected long _maxMillisForResponse
targetService
protected Service targetService
serviceInvoker
protected ServiceInvoker serviceInvoker
messageComposer
protected MessageComposer messageComposer
_deleteAfterOK
protected boolean _deleteAfterOK
_renameAfterOK
protected boolean _renameAfterOK
_inputDirectory
protected java.io.File _inputDirectory
_errorDirectory
protected java.io.File _errorDirectory
_postProcessDirectory
protected java.io.File _postProcessDirectory
_inputSuffix
protected java.lang.String _inputSuffix
_postProcessSuffix
protected java.lang.String _postProcessSuffix
_workingSuffix
protected java.lang.String _workingSuffix
_errorSuffix
protected java.lang.String _errorSuffix
AbstractFileGateway
protected AbstractFileGateway(ConfigTree config)
throws ConfigurationException,
RegistryException,
GatewayException
- Throws:
ConfigurationException
RegistryException
GatewayException
doInitialise
protected void doInitialise()
throws ManagedLifecycleException
- Handle the initialisation of the managed instance.
- Overrides:
doInitialise
in class AbstractScheduledManagedLifecycle
- Throws:
ManagedLifecycleException
- for errors while initialisation.
onSchedule
public void onSchedule()
throws SchedulingException
- Execute on trigger from the scheduler.
- Specified by:
onSchedule
in class AbstractScheduledManagedLifecycle
- Throws:
SchedulingException
setFileWorking
protected java.io.File setFileWorking(java.io.File file)
getWorkFileName
protected java.io.File getWorkFileName(java.io.File fileIn,
java.lang.String suffix)
checkInputSuffix
protected void checkInputSuffix()
throws ConfigurationException
- Throws:
ConfigurationException
getFileInputDirectory
public static java.io.File getFileInputDirectory(ConfigTree config)
throws ConfigurationException
- Throws:
ConfigurationException