|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.SecurityManager
org.fest.swing.security.NoExitSecurityManager
public class NoExitSecurityManager
Understands a
that does not allow an application under test to terminate the
current JVM. Adapted from Abbot's SecurityManager
NoExitSecurityManager
.
Field Summary |
---|
Fields inherited from class java.lang.SecurityManager |
---|
inCheck |
Constructor Summary | |
---|---|
NoExitSecurityManager()
Creates a new NoExitSecurityManager . |
|
NoExitSecurityManager(ExitCallHook hook)
Creates a new NoExitSecurityManager . |
Method Summary | |
---|---|
void |
checkExit(int status)
Throws an if an application tries to terminate the current JVM (through
or .) |
void |
checkPermission(Permission permission)
Allows everything. |
void |
checkPermission(Permission permission,
Object context)
Allows everything. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NoExitSecurityManager()
NoExitSecurityManager
.
public NoExitSecurityManager(ExitCallHook hook)
NoExitSecurityManager
.
hook
- notified when an application tries to terminate the current JVM.
NullPointerException
- if the given hook is null
.Method Detail |
---|
public void checkPermission(Permission permission, Object context)
checkPermission
in class SecurityManager
permission
- the specified permission.context
- a system-dependent security context.public void checkPermission(Permission permission)
checkPermission
in class SecurityManager
permission
- the specified permission.public void checkExit(int status)
ExitException
if an application tries to terminate the current JVM (through
Runtime.exit(int)
or Runtime.halt(int)
.)
checkExit
in class SecurityManager
status
- the exit status.
ExitException
- if an application tries to terminate the current JVM.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |