jahiafilewatcherservice.java
来自「java 写的一个新闻发布系统」· Java 代码 · 共 82 行
JAVA
82 行
//// ____.// __/\ ______| |__/\. _______// __ .____| | \ | +----+ \// _______| /--| | | - \ _ | : - \_________// \\______: :---| : : | : | \________>// |__\---\_____________:______: :____|____:_____\// /_____|//// . . . i n j a h i a w e t r u s t . . .//////// JahiaFileWatcherService//// NK 12.01.2001////package org.jahia.services.deamons.filewatcher;import java.io.*;import java.text.*;import java.util.*;import org.jahia.exceptions.*; // JahiaExceptionimport org.jahia.utils.*; // JahiaConsoleimport org.jahia.services.*; // JahiaService/** * This Service hold a pool of instance of jahia.tools.FileWatcher Class. * Each Thread are identified by a name and accessible through this name. * Threads are added in an Hashtable registry. * * @author Khue ng * @version 1.0 */public abstract class JahiaFileWatcherService extends JahiaService { /** * addFileWatcher * * @param (String) threadName, the Name to identify this thread * @param (String) fullFolderPath, the real path to the folder to watch * @param (boolean) checkDate, check new fle by last modif date * * @param (long) intetal, the interval in millis */ public abstract void addFileWatcher( String threadName, String fullFolderPath, boolean checkDate, long interval, boolean fileOny ) throws JahiaException; /** * Call the start method of the thread * @param (String) threadName, the Name to identify this thread */ public abstract void startFileWatcher( String threadName ) throws JahiaException; /** * Register an Observer Thread with an Observable Thread * * @param (String) threadName, the Name of Observable object * @param (Observer) the observer object */ public abstract void registerObserver( String threadName, Observer obs ); } // end JahiaFileWatcherService
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?