com.kuka.roboticsAPI.persistenceModel
Class FileWatcher

java.lang.Object
  extended by com.kuka.roboticsAPI.persistenceModel.FileWatcher
All Implemented Interfaces:
Runnable

public final class FileWatcher
extends Object
implements Runnable

A file watcher watches a file asynchronously and tells a connected source about changes of that file.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Constructor Summary
FileWatcher(File file, IFileStateListener listener)
          Creates a new file watcher bound to the given file.
FileWatcher(File file, IFileStateListener listener, ScheduledExecutorService executor)
          Creates a new file watcher bound to the given file.
FileWatcher(String filename, IFileStateListener listener)
          Creates a new file watcher bound to the given file.
 
Method Summary
 void disable()
          Disables the watcher, so that no further events are fired.
 void dispose()
          Closes the file watcher.
 void enable()
          Enables the watcher to fire events.
 void run()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileWatcher

public FileWatcher(String filename,
                   IFileStateListener listener)
Creates a new file watcher bound to the given file.

Parameters:
filename - The file name.
listener - The listener which will get informed when the file changes.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

FileWatcher

public FileWatcher(File file,
                   IFileStateListener listener)
Creates a new file watcher bound to the given file.

Parameters:
file - The file.
listener - The listener which will get informed when the file changes.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

FileWatcher

public FileWatcher(File file,
                   IFileStateListener listener,
                   ScheduledExecutorService executor)
Creates a new file watcher bound to the given file.

Parameters:
file - The file.
listener - The listener which will get informed when the file changes.
executor - a scheduled executor to be used by the file watcher; null if the file watcher should use its own
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
Method Detail

disable

public void disable()
Disables the watcher, so that no further events are fired.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

enable

public void enable()
Enables the watcher to fire events.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

dispose

public void dispose()
Closes the file watcher. After this call, no more events will get fired.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

run

public void run()

Specified by:
run in interface Runnable
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.


Copyright © 2019. All rights reserved.