Home » synapse-1.2-src » org.apache.synapse.transport.vfs » [javadoc | source]
org.apache.synapse.transport.vfs
public class: VFSTransportListener [javadoc | source]
java.lang.Object
   org.apache.synapse.transport.base.AbstractTransportListener
      org.apache.synapse.transport.base.AbstractPollingTransportListener
         org.apache.synapse.transport.vfs.VFSTransportListener

All Implemented Interfaces:
    ManagementSupport, org.apache.axis2.transport.TransportListener

The "vfs" transport is a polling based transport - i.e. it gets kicked off at specified periodic durations, and would iterate through a list of directories or files specified according to poll durations. When scanning a directory, it will match its contents against a given regex to find the set of input files. For compressed files, the contents could be matched against a regex to find individual files. Each of these files thus found would be submitted as an Axis2 "message" into the Axis2 engine. The processed files would be deleted or renamed as specified in the configuration Supported VFS example URIs file:///directory/filename.ext file:////somehost/someshare/afile.txt jar:../lib/classes.jar!/META-INF/manifest.mf zip:http://somehost/downloads/somefile.zip jar:zip:outer.zip!/nested.jar!/somedir jar:zip:outer.zip!/nested.jar!/some%21dir tar:gz:http://anyhost/dir/mytar.tar.gz!/mytar.tar!/path/in/tar/README.txt tgz:file://anyhost/dir/mytar.tgz!/somepath/somefile gz:/my/gz/file.gz http://somehost:8080/downloads/somefile.jar http://myusername@somehost/index.html webdav://somehost:8080/dist ftp://myusername:mypassword@somehost/pub/downloads/somefile.tgz[?passive=true] sftp://myusername:mypassword@somehost/pub/downloads/somefile.tgz smb://somehost/home axis2.xml - transport definition services.xml - service attachment required parameters .. .. optional parameters .. .. .. .. .. .. .. FTP testing URIs ftp://ftpuser:password@asankha/somefile.csv?passive=true ftp://vfs:apache@vfs.netfirms.com/somepath/somefile.xml?passive=true
Field Summary
public static final  String TRANSPORT_NAME     
public static final  String DELETE     
public static final  String MOVE     
Fields inherited from org.apache.synapse.transport.base.AbstractPollingTransportListener:
TRANSPORT_POLL_INTERVAL,  DEFAULT_POLL_INTERVAL,  pollInterval,  timer,  pollInProgress,  pollLock,  serviceToTimerTaskMap
Fields inherited from org.apache.synapse.transport.base.AbstractTransportListener:
log,  transportName,  cfgCtx,  engine,  state,  isNonBlocking,  workerPool,  useAxis2ThreadPool,  metrics
Method from org.apache.synapse.transport.vfs.VFSTransportListener Summary:
getEPRsForService,   init,   onPoll,   startListeningForService,   stopListeningForService
Methods from org.apache.synapse.transport.base.AbstractPollingTransportListener:
cancelPoll,   getPollInterval,   maintenenceShutdown,   onPoll,   pause,   resume,   schedulePoll,   setPollInterval,   startListeningForService,   stopListeningForService
Methods from org.apache.synapse.transport.base.AbstractTransportListener:
createMessageContext,   destroy,   disableTransportForService,   getActiveThreadCount,   getBytesReceived,   getBytesSent,   getEPRForService,   getFaultsReceiving,   getFaultsSending,   getMessagesReceived,   getMessagesSent,   getMetricsCollector,   getQueueSize,   getSessionContext,   getTransportName,   handleException,   handleIncomingMessage,   init,   logException,   maintenenceShutdown,   pause,   resume,   setTransportName,   start,   startListeningForService,   stop,   stopListeningForService
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.synapse.transport.vfs.VFSTransportListener Detail:
 public EndpointReference[] getEPRsForService(String serviceName,
    String ip) throws AxisFault 
    Get the EPR for the given service over the VFS transport vfs:uri (@see http://jakarta.apache.org/commons/vfs/filesystems.html for the URI formats)
 public  void init(ConfigurationContext cfgCtx,
    TransportInDescription trpInDesc) throws AxisFault 
    Initializes the VFS transport by getting the VFS File System manager
 public  void onPoll() 
    On a poller tick, iterate over the list of directories/files and check if it is time to scan the contents for new files
 protected  void startListeningForService(AxisService service) 
 protected  void stopListeningForService(AxisService service)