org.apache.avalon.excalibur.monitor
Class DirectoryResource

java.lang.Object
  extended byorg.apache.avalon.excalibur.monitor.Resource
      extended byorg.apache.avalon.excalibur.monitor.DirectoryResource
All Implemented Interfaces:
Modifiable

public class DirectoryResource
extends Resource

This is a Resource that monitors a directory. If any files are added, removed or modified in directory then it will send an event indicating the change.

Version:
$Revision: 1.5 $ $Date: 2004/02/28 11:47:32 $
Author:
Avalon Development Team

Field Summary
static java.lang.String ADDED
           
static java.lang.String MODIFIED
           
static java.lang.String REMOVED
           
 
Fields inherited from class org.apache.avalon.excalibur.monitor.Resource
m_eventSupport, m_previousModified
 
Constructor Summary
DirectoryResource(java.lang.String resourceKey)
           
 
Method Summary
 long lastModified()
          The time this was last modified.
 void testModifiedAfter(long time)
          Test whether this has been modified since time X
 
Methods inherited from class org.apache.avalon.excalibur.monitor.Resource
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenersFrom, fireAndSetModifiedTime, getEventSupport, getPreviousModified, getResourceKey, hasListeners, hasListeners, removeAllPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, setPreviousModified, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADDED

public static final java.lang.String ADDED
See Also:
Constant Field Values

REMOVED

public static final java.lang.String REMOVED
See Also:
Constant Field Values

MODIFIED

public static final java.lang.String MODIFIED
See Also:
Constant Field Values
Constructor Detail

DirectoryResource

public DirectoryResource(java.lang.String resourceKey)
                  throws java.lang.Exception
Method Detail

testModifiedAfter

public void testModifiedAfter(long time)
Test whether this has been modified since time X

Specified by:
testModifiedAfter in interface Modifiable
Overrides:
testModifiedAfter in class Resource

lastModified

public long lastModified()
Description copied from class: Resource
The time this was last modified.

Specified by:
lastModified in interface Modifiable
Specified by:
lastModified in class Resource


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.