|
Version: 1.1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.SecurityManager
org.biomoby.service.dashboard.ExitSecurityManager
public class ExitSecurityManager
A security manager allowing to enable and disable usage of System.exit() calls.
Everybody can enable and disable it - so it is not strictly speaking too secure but the purpose is not to prevent against malicious classes but to allow to embed code and libraries that use System.exit() - such as the Ant classes - without breaking wrapping code.
| Constructor Summary | |
|---|---|
ExitSecurityManager()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
checkExit(int status)
|
void |
checkPermission(Permission perm)
|
void |
checkPermission(Permission perm,
Object context)
|
static ExitSecurityManager |
createAndInstall()
Create and install an instance of this exit manager as a new security manager. |
void |
setExitForbidden(boolean enabled)
Enable od disable usage of System.exit(). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExitSecurityManager()
| Method Detail |
|---|
public static ExitSecurityManager createAndInstall()
public void setExitForbidden(boolean enabled)
enabled - true enables System.exit() callspublic void checkExit(int status)
checkExit in class SecurityManagerorg.apache.tools.ant.ExitException - if System.exit() was called and was not
allowed. The exception has an exit code taken from this
System.exit() call.
public void checkPermission(Permission perm,
Object context)
checkPermission in class SecurityManagerpublic void checkPermission(Permission perm)
checkPermission in class SecurityManager
|
Version: 1.1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||