org.xworker.thingManagers
类 FileMonitor

java.lang.Object
  继承者 java.util.TimerTask
      继承者 org.xworker.thingManagers.FileMonitor
所有已实现的接口:
java.lang.Runnable

public class FileMonitor
extends java.util.TimerTask

监控事物文件是否被改动或者删除。

作者:
zyx

嵌套类摘要
 class FileMonitor.FileEntry
           
 
字段摘要
(专用软件包)  java.util.Map<FileMonitor.FileEntry,java.lang.Long> files
           
private static FileMonitor instance
           
(专用软件包)  java.util.Map<java.lang.String,FileMonitor.FileEntry> things
           
(专用软件包)  java.util.Timer timer
           
(专用软件包)  World world
           
 
构造方法摘要
private FileMonitor()
           
 
方法摘要
 void addFile(java.lang.String path, Thing thing, java.io.File file)
           
private  void changeRemoved(Thing thing)
           
 FileMonitor.FileEntry getFileEntry(java.lang.String path)
           
static FileMonitor getInstance()
           
 void run()
           
 void updateLastModified(FileMonitor.FileEntry entry, long lastmodified)
           
 
从类 java.util.TimerTask 继承的方法
cancel, scheduledExecutionTime
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

instance

private static FileMonitor instance

files

java.util.Map<FileMonitor.FileEntry,java.lang.Long> files

things

java.util.Map<java.lang.String,FileMonitor.FileEntry> things

timer

java.util.Timer timer

world

World world
构造方法详细信息

FileMonitor

private FileMonitor()
方法详细信息

getInstance

public static FileMonitor getInstance()

addFile

public void addFile(java.lang.String path,
                    Thing thing,
                    java.io.File file)

getFileEntry

public FileMonitor.FileEntry getFileEntry(java.lang.String path)

updateLastModified

public void updateLastModified(FileMonitor.FileEntry entry,
                               long lastmodified)

run

public void run()
指定者:
接口 java.lang.Runnable 中的 run
指定者:
java.util.TimerTask 中的 run

changeRemoved

private void changeRemoved(Thing thing)