org.apache.openejb.util
Class DirectoryMonitor

java.lang.Object
  extended by org.apache.openejb.util.DirectoryMonitor

public class DirectoryMonitor
extends Object

Version:
$Rev: 1417506 $ $Date: 2012-12-05 16:19:59 +0000 (Wed, 05 Dec 2012) $

Nested Class Summary
static interface DirectoryMonitor.Listener
          Allows custom behavior to be hooked up to process file state changes.
 
Field Summary
static Logger logger
           
 
Constructor Summary
DirectoryMonitor(File target, DirectoryMonitor.Listener listener, long pollIntervalMillis)
           
 
Method Summary
 void addFile(File file)
           
 DirectoryMonitor.Listener getListener()
           
 long getPollIntervalMillis()
           
 File getTarget()
           
 void removeFile(File file)
           
 void scan()
          Looks for changes to the immediate contents of the directory we're watching.
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final Logger logger
Constructor Detail

DirectoryMonitor

public DirectoryMonitor(File target,
                        DirectoryMonitor.Listener listener,
                        long pollIntervalMillis)
Method Detail

getPollIntervalMillis

public long getPollIntervalMillis()

getTarget

public File getTarget()

getListener

public DirectoryMonitor.Listener getListener()

stop

public void stop()

start

public void start()

addFile

public void addFile(File file)

removeFile

public void removeFile(File file)

scan

public void scan()
Looks for changes to the immediate contents of the directory we're watching.



Copyright © 1999-2013 The Apache Software Foundation. All Rights Reserved.