org.apache.synapse.transport.vfs
Class VFSTransportListener

java.lang.Object
  extended by org.apache.axis2.transport.base.AbstractTransportListener
      extended by org.apache.axis2.transport.base.AbstractTransportListenerEx<T>
          extended by org.apache.axis2.transport.base.AbstractPollingTransportListener<PollTableEntry>
              extended by org.apache.synapse.transport.vfs.VFSTransportListener
All Implemented Interfaces:
org.apache.axis2.transport.base.ManagementSupport, TransportListener

public class VFSTransportListener
extends org.apache.axis2.transport.base.AbstractPollingTransportListener<PollTableEntry>
implements org.apache.axis2.transport.base.ManagementSupport

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 enable|disable ? 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
static String DELETE
           
static String MOVE
           
static String TRANSPORT_NAME
           
 
Fields inherited from class org.apache.axis2.transport.base.AbstractTransportListener
cfgCtx, config, isNonBlocking, log, metrics, state, useAxis2ThreadPool
 
Fields inherited from interface org.apache.axis2.transport.TransportListener
HOST_ADDRESS, PARAM_PORT
 
Constructor Summary
VFSTransportListener()
           
 
Method Summary
protected  PollTableEntry createEndpoint()
           
 void init(ConfigurationContext cfgCtx, TransportInDescription trpInDesc)
           
protected  void poll(PollTableEntry entry)
           
 
Methods inherited from class org.apache.axis2.transport.base.AbstractPollingTransportListener
destroy, maintenenceShutdown, onPollCompletion, pause, processFailure, resume, startEndpoint, stopEndpoint
 
Methods inherited from class org.apache.axis2.transport.base.AbstractTransportListenerEx
getEndpoints, getEPRsForService, startListeningForService, stopListeningForService
 
Methods inherited from class org.apache.axis2.transport.base.AbstractTransportListener
createMessageContext, disableTransportForService, getActiveThreadCount, getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getConfigurationContext, getEPRForService, getEPRsForService, getFaultsReceiving, getFaultsSending, getLastResetTime, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMetricsCollector, getMetricsWindow, getMinSizeReceived, getMinSizeSent, getQueueSize, getResponseCodeTable, getSessionContext, getTimeoutsReceiving, getTimeoutsSending, getTransportName, handleException, handleIncomingMessage, logException, resetStatistics, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.axis2.transport.base.ManagementSupport
getActiveThreadCount, getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getFaultsReceiving, getFaultsSending, getLastResetTime, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMetricsWindow, getMinSizeReceived, getMinSizeSent, getQueueSize, getResponseCodeTable, getTimeoutsReceiving, getTimeoutsSending, maintenenceShutdown, pause, resetStatistics, resume
 

Field Detail

TRANSPORT_NAME

public static final String TRANSPORT_NAME
See Also:
Constant Field Values

DELETE

public static final String DELETE
See Also:
Constant Field Values

MOVE

public static final String MOVE
See Also:
Constant Field Values
Constructor Detail

VFSTransportListener

public VFSTransportListener()
Method Detail

init

public void init(ConfigurationContext cfgCtx,
                 TransportInDescription trpInDesc)
          throws AxisFault
Specified by:
init in interface TransportListener
Overrides:
init in class org.apache.axis2.transport.base.AbstractPollingTransportListener<PollTableEntry>
Throws:
AxisFault

poll

protected void poll(PollTableEntry entry)
Specified by:
poll in class org.apache.axis2.transport.base.AbstractPollingTransportListener<PollTableEntry>

createEndpoint

protected PollTableEntry createEndpoint()
Specified by:
createEndpoint in class org.apache.axis2.transport.base.AbstractTransportListenerEx<PollTableEntry>


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.