public class Filelistener extends Object
Constructor and Description |
---|
Filelistener() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addFilelistener(String pResourcename,
String pListenerPath)
Add a new filelistener to the system.
|
static Map<String,String> |
getFilelisteners()
A utility method to get all filelisteners that are already defined and
stored.
|
FilesystemNotificationObserver |
getObserver()
Get the observer for this filelistener
|
IFilelistenerWriteTrx |
getTrx(String key)
Get the desired transaction.
|
boolean |
removeFilelistener(String pResourcename)
You can remove a filelistener from the system identifying it with it's
Storagename.
|
void |
setObserver(FilesystemNotificationObserver pObserver)
Set the observer for this filelistener
|
void |
shutDownListener()
Shutdown listening to the defined folders and release all bonds to
Treetank.
|
void |
startListening()
Start listening to the defined folders.
|
void |
watchDir(File dir) |
public Filelistener() throws IOException
IOException
public FilesystemNotificationObserver getObserver()
public void setObserver(FilesystemNotificationObserver pObserver)
public void watchDir(File dir) throws IOException
dir
- IOException
public void startListening() throws FileNotFoundException, ClassNotFoundException, IOException, ResourceNotExistingException, TTException
public void shutDownListener() throws TTException, IOException
TTException
IOException
public static Map<String,String> getFilelisteners() throws FileNotFoundException, IOException, ClassNotFoundException
FileNotFoundException
IOException
ClassNotFoundException
public static boolean addFilelistener(String pResourcename, String pListenerPath) throws FileNotFoundException, IOException, ClassNotFoundException
pResourcename
- pListenerPath
- FileNotFoundException
IOException
ClassNotFoundException
public boolean removeFilelistener(String pResourcename) throws IOException, TTException, ResourceNotExistingException
pResourcename
- IOException
TTException
ResourceNotExistingException
public IFilelistenerWriteTrx getTrx(String key)
key
- Copyright © 2013. All Rights Reserved.