[doc] Added comments on a brain overloading method.
Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
parent
14007f4d9a
commit
da107f0a40
@ -206,10 +206,18 @@ public final class ConnectingConsoleInput implements ConsoleInput {
|
||||
return doPrompt(message, timeout, tic);
|
||||
}
|
||||
|
||||
/** Actually do the prompting
|
||||
*
|
||||
* @param message the prompt message
|
||||
* @param timeout the time to wait for an answer
|
||||
* @param tic the moment the wait started
|
||||
* @return the message provided through the prompting
|
||||
* @throws IOException if an IO error occurred while prompting. */
|
||||
private String doPrompt(final String message, final long timeout, final long tic)
|
||||
throws IOException {
|
||||
do {
|
||||
if (!checkPrompt()) {
|
||||
// We are not prompting... lets stop here.
|
||||
break;
|
||||
}
|
||||
getConnection(getTimeoutLeft(tic, timeout));
|
||||
@ -220,10 +228,13 @@ public final class ConnectingConsoleInput implements ConsoleInput {
|
||||
actualConnected = connected;
|
||||
}
|
||||
if (!connect) {
|
||||
// There is no provide of input... So lets start again, until we actually
|
||||
// DO get a provider of input.
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
final String res = actualPrompt(message, timeout, tic, actualConnected);
|
||||
// We got something from the prompting
|
||||
synchronized (promptLock) {
|
||||
if (prompting) {
|
||||
prompting = false;
|
||||
|
Loading…
Reference in New Issue
Block a user