edu.pdx.cs399J.grader
Class TesterSecurityManager
java.lang.Object
java.lang.SecurityManager
edu.pdx.cs399J.grader.TesterSecurityManager
public class TesterSecurityManager
- extends SecurityManager
This class allows us to call a main method multiple
times without the JVM exiting. Basically, every time the JVM goes
to exit, we throw a TesterExitException which we then
catch and ignore.
Note that if you install this security manager, you will have to
write a policy file that grants permissions to the code base from
which the user class was loaded.
- Author:
- My good buddy, Nate Nystrom
|
Method Summary |
void |
checkExit(int status)
A SecurityException is thrown if we do not allow the
virtual machine to exit. |
void |
setAllowExit(boolean allowExit)
Sets whether or not this security manager will allow the VM to
exit. |
| Methods inherited from class java.lang.SecurityManager |
checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPermission, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TesterSecurityManager
public TesterSecurityManager()
setAllowExit
public void setAllowExit(boolean allowExit)
- Sets whether or not this security manager will allow the VM to
exit.
checkExit
public void checkExit(int status)
- A
SecurityException is thrown if we do not allow the
virtual machine to exit.
- Overrides:
checkExit in class SecurityManager
Copyright © 2000-2009 Portland State University. All Rights Reserved.