Class SecurityDialogMessageHandler
- java.lang.Object
-
- net.sourceforge.jnlp.security.SecurityDialogMessageHandler
-
- All Implemented Interfaces:
java.lang.Runnable
public class SecurityDialogMessageHandler extends java.lang.Object implements java.lang.Runnable
HandlesSecurityDialogMessage
s and shows appropriate security dialogs.In the current architecture,
SecurityDialog
s are shown from a differentAppContext
than theAppContext
that asks for a security prompt. This ensures that all security prompts are isolated and their Look and Feel is not affected by the Look and Feel of the applet/application.This class contains allows a client application to post a
SecurityDialogMessage
. When this class finds a security message in the queue, it shows a security warning to the user, and setsSecurityDialogMessage.userResponse
to the appropriate value.
-
-
Constructor Summary
Constructors Constructor Description SecurityDialogMessageHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
handleMessage(SecurityDialogMessage message)
Handles a singleSecurityDialogMessage
by showing aSecurityDialog
.void
postMessage(SecurityDialogMessage message)
Post a message to the security event queue.void
run()
Runs the message handler loop.protected void
unlockMessagesClient(SecurityDialogMessage msg)
-
-
-
Method Detail
-
run
public void run()
Runs the message handler loop. This waits for incoming security messages and shows a security dialog.- Specified by:
run
in interfacejava.lang.Runnable
-
handleMessage
protected void handleMessage(SecurityDialogMessage message)
Handles a singleSecurityDialogMessage
by showing aSecurityDialog
.Once the user has made a choice the
SecurityDialogMessage.toDispose
(if not null) is disposed andSecurityDialogMessage.lock
(in not null) is released.- Parameters:
message
- the message indicating what type of security dialog to show
-
unlockMessagesClient
protected void unlockMessagesClient(SecurityDialogMessage msg)
-
postMessage
public void postMessage(SecurityDialogMessage message)
Post a message to the security event queue. This message will be picked up by the security thread and used to show the appropriate security dialog.Once the user has made a choice the
SecurityDialogMessage.toDispose
(if not null) is disposed andSecurityDialogMessage.lock
(in not null) is released.- Parameters:
message
- indicates the type of security dialog to show
-
-