Author: asankha
Date: Tue Oct 9 23:15:50 2007
New Revision: 583365
URL: http://svn.apache.org/viewvc?rev=583365&view=rev
Log:
minor fix for VFS to include that no files were processed in the last run
Modified:
webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/vfs/PollTableEntry.java
webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/vfs/VFSTransportListener.java
Modified:
webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/vfs/PollTableEntry.java
URL:
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/vfs/PollTableEntry.java?rev=583365&r1=583364&r2=583365&view=diff
==============================================================================
---
webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/vfs/PollTableEntry.java
(original)
+++
webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/vfs/PollTableEntry.java
Tue Oct 9 23:15:50 2007
@@ -28,6 +28,7 @@
public static final int SUCCSESSFUL = 0;
public static final int WITH_ERRORS = 1;
public static final int FAILED = 2;
+ public static final int NONE = 3;
// operation after scan
public static final int DELETE = 0;
Modified:
webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/vfs/VFSTransportListener.java
URL:
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/vfs/VFSTransportListener.java?rev=583365&r1=583364&r2=583365&view=diff
==============================================================================
---
webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/vfs/VFSTransportListener.java
(original)
+++
webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/vfs/VFSTransportListener.java
Tue Oct 9 23:15:50 2007
@@ -153,6 +153,7 @@
try {
if (fileObject.exists() && fileObject.isReadable()) {
+ entry.setLastPollState(PollTableEntry.NONE);
FileObject[] children = null;
try {
children = fileObject.getChildren();
@@ -219,7 +220,7 @@
* @param entry the PollTableEntry for the file that has been processed
* @param fileObject the FileObject representing the file to be moved or
deleted
*/
- private void moveOrDeleteAfterProcessing(PollTableEntry entry, FileObject
fileObject) {
+ private void moveOrDeleteAfterProcessing(final PollTableEntry entry,
FileObject fileObject) {
String moveToDirectory = null;
try {
@@ -241,6 +242,8 @@
moveToDirectory = entry.getMoveAfterFailure();
}
break;
+ case PollTableEntry.NONE:
+ return;
}
if (moveToDirectory != null) {
@@ -258,7 +261,12 @@
if (fileObject.delete(new FileSelector() {
public boolean includeFile(FileSelectInfo
fileSelectInfo) throws Exception {
- return true;
+ if (entry.getFileNamePattern().equals(
+
fileSelectInfo.getFile().getName().getBaseName())) {
+ return true;
+ } else {
+ return false;
+ }
}
public boolean traverseDescendents(FileSelectInfo
fileSelectInfo) throws Exception {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]