Package com.sas.services.security

# Class RemoteNameCallback

java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.sas.services.security.RemoteNameCallback

All Implemented Interfaces:
  `RemoteCallbackInterface`, `RemoteNameCallbackInterface`, `Serializable`, `Remote`, `Callback`

public class RemoteNameCallback extends UnicastRemoteObject 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

- ## Field Summary

  ### Fields inherited from class java.rmi.server.RemoteObject

  `ref`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RemoteNameCallback(String prompt)`
  Create a new instance with a prompt string.
  `RemoteNameCallback(String prompt, String defaultName)`
  Create a new instance with a prompt string and a default name.
  `RemoteNameCallback(String prompt, String defaultName, String name)`
  Creates a new instance with a prompt string.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDefaultName()`
  Gets the default name.
  `String`
  `getName()`
  Gets the name.
  `String`
  `getPrompt()`
  Gets the prompt.
  `void`
  `setName(String name)`
  Sets the name.

  ### Methods inherited from class java.rmi.server.UnicastRemoteObject

  `clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject`

  ### Methods inherited from class java.rmi.server.RemoteServer

  `getClientHost, getLog, setLog`

  ### Methods inherited from class java.rmi.server.RemoteObject

  `equals, getRef, hashCode, toString, toStub`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### RemoteNameCallback

    public RemoteNameCallback(String prompt, String defaultName, String name) throws 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:
      `RemoteException` - in the event of remote object failure.

  - ### RemoteNameCallback

    public RemoteNameCallback(String prompt) throws RemoteException
    Create a new instance with a prompt string.
    Parameters:
      `prompt` - The String to display when asking the user for their username.
    Throws:
      `RemoteException` - in the event of remote object failure.

  - ### RemoteNameCallback

    public RemoteNameCallback(String prompt, String defaultName) throws 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:
      `RemoteException` - in the event of remote object failure.

- ## Method Details

  - ### getDefaultName

    public String getDefaultName()
    Gets the default name.
    Specified by:
      `getDefaultName` in interface `RemoteNameCallbackInterface`
    Returns:
      Default name.

  - ### getPrompt

    public String getPrompt()
    Gets the prompt.
    Specified by:
      `getPrompt` in interface `RemoteNameCallbackInterface`
    Returns:
      Callback's prompt

  - ### getName

    public String getName()
    Gets the name.
    Specified by:
      `getName` in interface `RemoteNameCallbackInterface`
    Returns:
      Name

  - ### setName

    public void setName(String name)
    Sets the name.
    Specified by:
      `setName` in interface `RemoteNameCallbackInterface`
    Parameters:
      `name` - Name