org.eclipse.higgins.icard.common.auth.callback
Class PinCodeCallback

java.lang.Object
  extended byorg.eclipse.higgins.icard.common.auth.callback.PinCodeCallback
All Implemented Interfaces:
Callback, Serializable

public class PinCodeCallback
extends Object
implements Callback, Serializable

See Also:
Serialized Form

Constructor Summary
PinCodeCallback(String prompt)
          Construct a PinCodeCallback with a prompt and a boolean specifying whether the PIN code should be displayed as it is being typed.
 
Method Summary
 void clearPin()
          Clear the retrieved PIN code.
 byte[] getPin()
          Get the retrieved PIN code.
 String getPrompt()
          Get the prompt.
 boolean isEchoOn()
          Return whether the PIN code should be displayed as it is being typed.
 void setPin(byte[] pin)
          Set the retrieved PIN code.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PinCodeCallback

public PinCodeCallback(String prompt)
Construct a PinCodeCallback with a prompt and a boolean specifying whether the PIN code should be displayed as it is being typed.

Parameters:
prompt - the prompt used to request the PIN code.

Throws:
IllegalArgumentException - if prompt is null or if prompt has a length of 0.
Method Detail

getPrompt

public String getPrompt()
Get the prompt.

Returns:
the prompt.

isEchoOn

public boolean isEchoOn()
Return whether the PIN code should be displayed as it is being typed.

Returns:
the whether the PIN code should be displayed as it is being typed.

setPin

public void setPin(byte[] pin)
Set the retrieved PIN code.

This method makes a copy of the input pin before storing it.

See Also:
getPin()

getPin

public byte[] getPin()
Get the retrieved PIN code.

This method returns a copy of the retrieved PIN code.

Returns:
the retrieved PIN code, which may be null.
See Also:
setPin(byte[])

clearPin

public void clearPin()
Clear the retrieved PIN code.