com.sas.services.security
Class RemoteNameCallback

com.sas.services.security.RemoteNameCallback
All Implemented Interfaces:
RemoteCallbackInterface, RemoteNameCallbackInterface, java.io.Serializable, java.rmi.Remote, javax.security.auth.callback.Callback

public class RemoteNameCallback
implements RemoteNameCallbackInterface

This is an instance of a NameCallback that's remoteable. This class can be used by clients, but typically, they will implement the javax.security.auth.callback.CallbackHandler interface and deal with the local versions of those callbacks, and use Challenger to convert to/from these remote versions.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
RemoteNameCallback(java.lang.String prompt)
          Create a new instance with a prompt string.
RemoteNameCallback(java.lang.String prompt, java.lang.String defaultName)
          Create a new instance with a prompt string and a default name.
RemoteNameCallback(java.lang.String prompt, java.lang.String defaultName, java.lang.String name)
          Creates a new instance with a prompt string.
 
Method Summary
 java.lang.String getDefaultName()
          Gets the default name.
 java.lang.String getName()
          Gets the name.
 java.lang.String getPrompt()
          Gets the prompt.
 void setName(java.lang.String name)
          Sets the name.
 

Constructor Detail

RemoteNameCallback

public RemoteNameCallback(java.lang.String prompt,
                          java.lang.String defaultName,
                          java.lang.String name)
                   throws java.rmi.RemoteException
Creates a new instance with a prompt string.

The remote object will be exported to the RMI system using the specified socket factories.

Parameters:
prompt - The String to display when asking the user for their username.
defaultName - Default name or null if a default name is not defined.
name - The string representing the name.
Throws:
java.rmi.RemoteException - in the event of remote object failure.

RemoteNameCallback

public RemoteNameCallback(java.lang.String prompt)
                   throws java.rmi.RemoteException
Create a new instance with a prompt string.

Parameters:
prompt - The String to display when asking the user for their username.
Throws:
java.rmi.RemoteException - in the event of remote object failure.

RemoteNameCallback

public RemoteNameCallback(java.lang.String prompt,
                          java.lang.String defaultName)
                   throws java.rmi.RemoteException
Create a new instance with a prompt string and a default name. If no name is entered by the user, the default is used. This can also be displayed with the prompt.

Parameters:
prompt - Callback's prompt
defaultName - Default name
Throws:
java.rmi.RemoteException - in the event of remote object failure.
Method Detail

getDefaultName

public java.lang.String getDefaultName()
Gets the default name.

Specified by:
getDefaultName in interface RemoteNameCallbackInterface
Returns:
Default name.

getPrompt

public java.lang.String getPrompt()
Gets the prompt.

Specified by:
getPrompt in interface RemoteNameCallbackInterface
Returns:
Callback's prompt

getName

public java.lang.String getName()
Gets the name.

Specified by:
getName in interface RemoteNameCallbackInterface
Returns:
Name

setName

public void setName(java.lang.String name)
Sets the name.

Specified by:
setName in interface RemoteNameCallbackInterface
Parameters:
name - Name



Copyright © 2009 SAS Institute Inc. All Rights Reserved.