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
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:
-
Field Summary
Fields inherited from class java.rmi.server.RemoteObject
ref -
Constructor Summary
ConstructorsConstructorDescriptionRemoteNameCallback(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
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObjectMethods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLogMethods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStubMethods 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 ornullif 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 promptdefaultName- Default name- Throws:
RemoteException- in the event of remote object failure.
-
-
Method Details
-
getDefaultName
public String getDefaultName()Gets the default name.- Specified by:
getDefaultNamein interfaceRemoteNameCallbackInterface- Returns:
- Default name.
-
getPrompt
public String getPrompt()Gets the prompt.- Specified by:
getPromptin interfaceRemoteNameCallbackInterface- Returns:
- Callback's prompt
-
getName
public String getName()Gets the name.- Specified by:
getNamein interfaceRemoteNameCallbackInterface- Returns:
- Name
-
setName
public void setName(String name) Sets the name.- Specified by:
setNamein interfaceRemoteNameCallbackInterface- Parameters:
name- Name
-