|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StdinControllerSettings
Implementations of this interface may be passed to a control factory to
create a controller that responds to instructions from STDIN (System.in).
When new input on STDIN is received by the controller, any control
instructions it contains are executed.
Such a controller could be used to control a Java application via a shell pipe, or provide a user with a simple interface with which to control execution.
Each line submitted on STDIN should consist of a label-name optionally followed by a parameter. Blank lines and leading spaces are 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.
Lines supplied on STDIN are subject to a maximum length - this is intended to protect a Java application from excessive memory usage caused by long lines of input. See the documentation on pronto properties for more information about how to change this maximum length.
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 for new input on STDIN. |
boolean |
isInteractive()
Whether the input on STDIN is user interactive. |
| Method Detail |
|---|
com.tomgibara.pronto.util.Duration getCheckPeriod()
boolean isInteractive()
System.in stream is obtaining input
from a user or a pipe. Returning a true value from this method will cause
the controller to report input-errors to STDOUT, otherwise input errors
are logged to the standard package logger.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||