|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sadun.util.TelnetInputStreamConsumer.NoMoreInputAvailableCriterium
A criterium which holds if no more input is available within a certain amount of time (i.e. we can suppose that the host has nothing more to say).
The minimum granularity of the timeout is
TelnetInputStreamConsumer.BASIC_CRITERIA_CHECK_TIME
, that is,
timeouts lower than that value won't be enforced.
Constructor Summary | |
TelnetInputStreamConsumer.NoMoreInputAvailableCriterium(boolean cumulative)
Create a critierium which will hold when no input is received. |
|
TelnetInputStreamConsumer.NoMoreInputAvailableCriterium(boolean cumulative,
long waitingTime)
Create a critierium which will hold when no input is received for a certain waiting time. |
Method Summary | |
boolean |
holds(java.lang.String input)
Return true when no input has been received during the time interval defined at construction. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TelnetInputStreamConsumer.NoMoreInputAvailableCriterium(boolean cumulative, long waitingTime)
cumulative
- if true, the criterium will consider the time from the
first nonempty input. Otherwise, it will consider the time
from the first empty input (that is, receiving input rests
the time count).waitingTime
- the time to wait until this criterium holdspublic TelnetInputStreamConsumer.NoMoreInputAvailableCriterium(boolean cumulative)
The waiting timeis set as double the
TelnetInputStreamConsumer.BASIC_CRITERIA_CHECK_TIME
.
cumulative
- if true, the criterium will consider the time from the
first nonempty input. Otherwise, it will consider the time
from the first empty input (that is, receiving input rests
the time count).Method Detail |
public boolean holds(java.lang.String input)
holds
in interface TelnetInputStreamConsumer.Criterium
TelnetInputStreamConsumer.Criterium.holds(java.lang.String)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |