Package opencard.core.terminal
Class CardTerminalIOControl
- java.lang.Object
-
- opencard.core.terminal.CardTerminalIOControl
-
public class CardTerminalIOControl extends java.lang.Object
The CardTerminalIOControl class provides a means of fine-tuning the way a CardTerminal processes user input.You can specify
- Maximal number of input characters
- The maximal number of input characters permissible.
- Timeout value
- The time to wait for user input (in seconds).
- Input character set
- The set of characters to accept for input.
- Terminator character set
- The set of characters that terminate the user input.
- Input blender
- An object of type CardTerminalIOBlender that will process user input.
- Author:
- Dirk Husemann (hud@zurich.ibm.com)
- See Also:
CardTerminal
,CardTerminalIOBlender
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IS_NUMBERS
Predefined set of input characters: Numbers only
-
Constructor Summary
Constructors Constructor Description CardTerminalIOControl(int maxInputChars, int timeout, java.lang.String inputSet, java.lang.String terminatorSet)
Constructor.CardTerminalIOControl(CardTerminalIOBlender blender)
Constructor using an I/O blender.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CardTerminalIOBlender
blender()
Return the current CardTerminalIOBlender.java.lang.String
inputSet()
Return the current input character set.int
maxInputChars()
Return the current maximal number of input characters.java.lang.String
terminatorSet()
Return the current terminator character set.int
timeout()
Return the current timeout value.
-
-
-
Field Detail
-
IS_NUMBERS
public static final java.lang.String IS_NUMBERS
Predefined set of input characters: Numbers only- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CardTerminalIOControl
public CardTerminalIOControl(int maxInputChars, int timeout, java.lang.String inputSet, java.lang.String terminatorSet)
Constructor.- Parameters:
maxInputChars
- The maximal number of input characters to accept; if 0 then assume no limit.timeout
- The number of seconds to wait for user input.inputSet
- A string specifying what characters to accept as user input.terminatorSet
- A string specifying the characters that terminate the user input.
-
CardTerminalIOControl
public CardTerminalIOControl(CardTerminalIOBlender blender)
Constructor using an I/O blender.- Parameters:
blender
- An object of type CardTerminalIOBlender that will process the user input.
-
-
Method Detail
-
blender
public CardTerminalIOBlender blender()
Return the current CardTerminalIOBlender.- Returns:
- The current CardTerminalIOBlender.
-
inputSet
public java.lang.String inputSet()
Return the current input character set.- Returns:
- The current input character set.
-
terminatorSet
public java.lang.String terminatorSet()
Return the current terminator character set.- Returns:
- The current terminator character set.
-
maxInputChars
public int maxInputChars()
Return the current maximal number of input characters.- Returns:
- The current limit.
-
timeout
public int timeout()
Return the current timeout value.- Returns:
- The current timeout.
-
-