AXL Software®

com.theorem.radius3.login
Class RADIUSTextInputCallback

Object
  extended byTextInputCallback
      extended byRADIUSTextInputCallback
All Implemented Interfaces:
Callback, RADIUSCallback, Serializable

public final class RADIUSTextInputCallback
extends TextInputCallback
implements RADIUSCallback

Class to retrieve information. Text input is requested when an Access-Challenge packet containing a Reply-Message attribute is present. The prompt is set to the Reply-Message text.

There are two ways to return the retrieved text. It may be incorporated into the AttributeList and return using setRequestAttributes(). If the text is returned using setText() the attribute type the text response and the decision to encode it must be set using setAttributeType().

Access to data handling methods in this class may only be performed when isReady() returns true.

This is a handler class.

See Also:
Serialized Form

Constructor Summary
RADIUSTextInputCallback(String prompt)
           
RADIUSTextInputCallback(String prompt, String defaultText)
           
 
Method Summary
 boolean isReady()
          Determine if the values in the callback class are ready to be accessed or modified.
 void setAttributeType(int attributeType, boolean pwdEncode)
          Set the attribute type that should hold the text.
 void setReady(boolean setting)
          Set the ready indicator.
 
Methods inherited from class TextInputCallback
getDefaultText, getPrompt, getText, setText
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RADIUSTextInputCallback

public RADIUSTextInputCallback(String prompt)

RADIUSTextInputCallback

public RADIUSTextInputCallback(String prompt,
                               String defaultText)
Method Detail

setAttributeType

public void setAttributeType(int attributeType,
                             boolean pwdEncode)
Set the attribute type that should hold the text.

Parameters:
attributeType - The type of attribute the text should be place in.
pwdEncode - True if the attribute is to be encoded using the RADIUS authenticator and shared secret (standard password encoding). Otherwise the text is sent in plain text.

isReady

public boolean isReady()
Determine if the values in the callback class are ready to be accessed or modified. A handler must not access the contents of this callback class if this method returns false.

Specified by:
isReady in interface RADIUSCallback
Returns:
True if the class is ready to have data read or written.

setReady

public void setReady(boolean setting)
Set the ready indicator.

Specified by:
setReady in interface RADIUSCallback
Parameters:
setting - Set to true if the data is readable or writable, false otherwise.

AXL Software®

Submit a bug report or feature request

Copyright 1998-2009 AXL Software® PO Box 97, Viola, Delaware 19979, U.S.A. All Rights Reserved.