public class CallbackHandlerSwing extends Object
VistaLoginModule to invoke a Swing-based
interactive logon. Input values (access code, verify code, division selection, and other "user input") is collected
via a set of GUI dialogs when this callback handler is used.
LoginContext instance, passing the instance of the callback handler as one of the
parameters.
login method. The callback handler will invoke Swing dialogs to
collect user input wherever required for login.
// create the callback handler
// create the LoginContext
// login to server
String cfgName = "RpcSampleServer";
CallbackHandlerSwing cbhSwing = new CallbackHandlerSwing(myFrame);
loginContext = new LoginContext(cfgName, cbhSwing);
loginContext.login();
VistaLoginModule| Constructor and Description |
|---|
CallbackHandlerSwing(Frame windowParent)
Instantiates a JAAS callback handler for Swing applications.
|
public CallbackHandlerSwing(Frame windowParent)
windowParent - Allows login dialogs to be centered over a parent frame (a top-level window with a title and border).
If null is passed, login dialogs are centered based on the screen itself.public void handle(Callback[] callbacks) throws UnsupportedCallbackException
handle in interface CallbackHandlerUnsupportedCallbackExceptionCallbackHandler.handle(Callback[] callbacks)Copyright © 2026. All rights reserved.