org.jboss.soa.esb.listeners.gateway
Class AbstractFileGateway

java.lang.Object
  extended by org.jboss.soa.esb.listeners.gateway.AbstractFileGateway
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
FileGatewayListener

public abstract class AbstractFileGateway
extends java.lang.Object
implements java.lang.Runnable

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

Field Summary
protected  java.lang.Object _composer
           
protected  java.lang.Class _composerClass
           
protected  java.lang.String _composerName
           
protected  ConfigTree _config
           
protected  GatewayListenerController _controller
           
protected  Courier _courier
           
protected  boolean _deleteAfterOK
           
protected  java.io.File _errorDirectory
           
protected  java.lang.String _errorSuffix
           
protected  java.io.FileFilter _fileFilter
           
protected  java.io.File _inputDirectory
           
protected  java.lang.String _inputSuffix
           
protected static org.apache.log4j.Logger _logger
           
protected  EPR _myEpr
           
protected  java.io.File _postProcessDirectory
           
protected  java.lang.String _postProcessSuffix
           
protected  java.lang.reflect.Method _processMethod
           
protected  java.lang.String _serviceCategory
           
protected  java.lang.String _serviceName
           
protected  long _sleepBetweenPolls
           
protected  java.util.Collection<EPR> _targetEprs
           
protected  java.lang.String _targetServiceCategory
           
protected  java.lang.String _targetServiceName
           
protected  java.lang.String _workingSuffix
           
 
Constructor Summary
protected AbstractFileGateway()
           
protected AbstractFileGateway(GatewayListenerController commandListener, ConfigTree config)
           
 
Method Summary
protected  void checkMyParms()
          Check for mandatory and optional attributes in parameter tree
protected  void resolveComposerClass()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

protected static final org.apache.log4j.Logger _logger

_config

protected ConfigTree _config

_controller

protected GatewayListenerController _controller

_sleepBetweenPolls

protected long _sleepBetweenPolls

_serviceCategory

protected java.lang.String _serviceCategory

_serviceName

protected java.lang.String _serviceName

_targetServiceCategory

protected java.lang.String _targetServiceCategory

_targetServiceName

protected java.lang.String _targetServiceName

_myEpr

protected EPR _myEpr

_targetEprs

protected java.util.Collection<EPR> _targetEprs

_composerName

protected java.lang.String _composerName

_composerClass

protected java.lang.Class _composerClass

_composer

protected java.lang.Object _composer

_processMethod

protected java.lang.reflect.Method _processMethod

_courier

protected Courier _courier

_deleteAfterOK

protected boolean _deleteAfterOK

_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

_fileFilter

protected java.io.FileFilter _fileFilter
Constructor Detail

AbstractFileGateway

protected AbstractFileGateway()

AbstractFileGateway

protected AbstractFileGateway(GatewayListenerController commandListener,
                              ConfigTree config)
                       throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

checkMyParms

protected void checkMyParms()
                     throws java.lang.Exception
Check for mandatory and optional attributes in parameter tree

Throws:
java.lang.Exception - - if mandatory atts are not right or actionClass not in classpath

resolveComposerClass

protected void resolveComposerClass()
                             throws java.lang.Exception
Throws:
java.lang.Exception