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.
Note, that if you provide a CardTerminalIOBlender it will override cause these setting to be ignored.

See Also:
CardTerminal, CardTerminalIOBlender

Field Summary
static java.lang.String IS_NUMBERS
          Predefined set of input characters: Numbers only
 
Constructor Summary
CardTerminalIOControl(CardTerminalIOBlender blender)
          Constructor using an I/O blender.
CardTerminalIOControl(int maxInputChars, int timeout, java.lang.String inputSet, java.lang.String terminatorSet)
          Constructor.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IS_NUMBERS

public static final java.lang.String IS_NUMBERS
Predefined set of input characters: Numbers only
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.