|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FileControllerSettings
Implementations of this interface may be passed to a control factory to create a controller that responds to instructions in a file. The file is periodically checked for creation/modification. When a change is identified, the file is read, and any control instructions it contains are executed.
It is anticipated that a common usage scenario for a file controller will be driving a Java application by another application on the same computer through the creation of an instructions file that is then read, executed and deleted by the java application.
Each line in the file should consist of a label-name optionally followed by a parameter. Blank lines and leading spaces are ignored. Lines whose first non-whitespace character is a # are treated as comments and are also ignored. An example line to a controller might be:
stop 20s
The interpretation of this line is entirely determined by the controller's engine and its corresponding adapter.
Note that the values returned for settings do not need to be stable; they can change between calls on the interface.
| Method Summary | |
|---|---|
com.tomgibara.pronto.util.Duration |
getCheckPeriod()
The approximate time between successive checks on the file. |
java.io.File |
getFile()
The file that will be checked for control instructions. |
boolean |
isFileDeleted()
Whether the file is deleted after its control instructions have been read and executed. |
boolean |
isOlderIgnored()
Whether changes in a file's last-modified that move 'back in time' should be ignored for the purpose of identifying changes in the file. |
boolean |
isPreexistingIgnored()
Whether a file that already existed the first time it was checked should be ignored until the file is updated. |
| Method Detail |
|---|
java.io.File getFile()
com.tomgibara.pronto.util.Duration getCheckPeriod()
boolean isFileDeleted()
boolean isPreexistingIgnored()
boolean isOlderIgnored()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||