public abstract static class Session.TickingCallback extends Session.InputCallback
Session.InputCallback.Type
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.StringBuilder |
collectedInput |
|
protected int |
counter |
Constructor | Description |
---|---|
TickingCallback(long tickerMs) |
Only constructor is the one to tell out often to call back.
|
Modifier and Type | Method | Description |
---|---|---|
void |
callBack() |
This method is called if the user hits ENTER, and
their input data is valid (one of the choices for
CHOOSE or CONFIRM), or anything else for PROMPT.
|
void |
setInput(java.lang.String input) |
Forces user-input into this class, potentially changing its user
input waiting state.
|
void |
showPrompt() |
TimeOutCallback has no prompt
|
abstract boolean |
tick(int counter) |
This method id called every ticker ms with an incremented
counter.
|
void |
timedOut() |
This method is call by InputCallback if a timeout
value greater than 0 is given and that amount of time has
been exceeded.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isTimedOut, reset, waitForInput
protected volatile int counter
protected final java.lang.StringBuilder collectedInput
public TickingCallback(long tickerMs)
tickerMs
- the time is ms between timeoutspublic void showPrompt()
showPrompt
in class Session.InputCallback
public void callBack()
Session.InputCallback
callBack
in class Session.InputCallback
public void setInput(java.lang.String input)
Session.InputCallback
setInput
in class Session.InputCallback
input
- the user input to forcepublic void timedOut()
Session.InputCallback
timedOut
in class Session.InputCallback
public abstract boolean tick(int counter)
counter
- the counter, higher than the last time