opencard.opt.terminal
Interface UserInteraction


public abstract interface UserInteraction

User interaction takes place through the display() method (to display information to the user), the keyboardInput() method (to retrieve information from the user) and the promptUser() method to combine display and input in a single call.

See Also:
CardTerminal, CardTerminalIOControl

Method Summary
 void clearDisplay()
          Clear the display.
 void display(java.lang.String message)
          Display a message.
 java.lang.String keyboardInput(opencard.core.terminal.CardTerminalIOControl ioControl)
          Return keyboard (i.e., keyboard, PIN pad, etc.) input.
 java.lang.String promptUser(java.lang.String prompt, opencard.core.terminal.CardTerminalIOControl ioControl)
          Prompt the user for a password, etc. This method displays a message and reads a password from the user.
 

Method Detail

display

public void display(java.lang.String message)
Display a message.

Parameters:
message - The String to display.

clearDisplay

public void clearDisplay()
Clear the display.


keyboardInput

public java.lang.String keyboardInput(opencard.core.terminal.CardTerminalIOControl ioControl)
Return keyboard (i.e., keyboard, PIN pad, etc.) input.

Parameters:
ioControl - A CardTerminalIOControl object that specifies how the user input should look like.
Returns:
A String containing the input.

promptUser

public java.lang.String promptUser(java.lang.String prompt,
                                   opencard.core.terminal.CardTerminalIOControl ioControl)
Prompt the user for a password, etc.

This method displays a message and reads a password from the user. The implementation of this method depends on the ioBlender implementation of the terminal. E.g. a PIN input could be implemented by the terminals numerical keyboard whereas an alphanumeric password might be implemented through the UserInteractionHandler.

Parameters:
prompt - The message to be displayed.
ioControl - A CardTerminalIOControl object that specifies how the user input should look like.
Returns:
A String containing the input.