public class JahiaFileWatcherBaseService extends JahiaFileWatcherService
settingsBean| Modifier | Constructor and Description |
|---|---|
protected |
JahiaFileWatcherBaseService()
Protected Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFileWatcher(String threadName,
String fullFolderPath,
boolean checkDate,
long interval,
boolean fileOnly)
addFileWatcher
|
FileWatcher |
getFileWatcher(String threadName)
getFileWatcher
|
static JahiaFileWatcherBaseService |
getInstance()
Use this method to get an instance of this class
|
SchedulerService |
getSchedulerService() |
void |
registerObserver(String threadName,
Observer obs)
Register an Observer Thread with an Observable Thread
|
void |
setSchedulerService(SchedulerService schedulerService) |
void |
start() |
void |
startFileWatcher(String threadName)
Call the start method of the thread
|
void |
stop()
Code to clean up the services ressource here.
|
void |
stopFileWatcher(String threadName)
Stops the file watcher thread.
|
getSettingsBean, setSettingsBeanprotected JahiaFileWatcherBaseService()
public static JahiaFileWatcherBaseService getInstance()
public void addFileWatcher(String threadName, String fullFolderPath, boolean checkDate, long interval, boolean fileOnly) throws JahiaException
addFileWatcher in class JahiaFileWatcherServicethreadName - the Name to identify this threadfullFolderPath - the real path to the folder to watchcheckDate - check new file by last modif date or notinterval - the interval in millisfileOnly - if true, only files will be watched, not directories.JahiaExceptionpublic void startFileWatcher(String threadName) throws JahiaException
startFileWatcher in class JahiaFileWatcherServicethreadName - the Name to identify this threadJahiaExceptionpublic void stopFileWatcher(String threadName) throws JahiaException
stopFileWatcher in class JahiaFileWatcherServicethreadName - String the name of the thread to shutdown.JahiaExceptionpublic void registerObserver(String threadName, Observer obs)
registerObserver in class JahiaFileWatcherServicethreadName - the Name of Observable objectobs - the observer objectpublic void start()
start in class JahiaServicepublic void stop()
throws JahiaException
stop in class JahiaServiceJahiaException - Raise an JahiaException exception on any failure.public FileWatcher getFileWatcher(String threadName)
getFileWatcher in class JahiaFileWatcherServicethreadName - the Name to identify this threadpublic SchedulerService getSchedulerService()
public void setSchedulerService(SchedulerService schedulerService)
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.