public final class SecurityManager extends SecurityManager
inCheck
Modifier and Type | Method and Description |
---|---|
void |
checkAccess(Thread t) |
void |
checkAccess(ThreadGroup g) |
void |
checkDelete(String file) |
void |
checkExec(String cmd) |
void |
checkExit(int status) |
void |
checkPackageAccess(String pkg) |
void |
checkPermission(Permission perm) |
void |
checkPropertyAccess(String key) |
void |
checkRead(String file) |
void |
checkWrite(FileDescriptor fd) |
static SecurityManager |
createSecurityManager(SystemMail systemMail,
Main main)
Creates a SecurityManager.
|
Optional<AddOnModel> |
getAddOnModelForClassLoader()
Gets the current AddOnModel, that is the AddOnModel for the class loader to which the class belongs that
triggered the security manager call, or throws a IzouPermissionException
|
boolean |
shouldCheck()
performs some basic checks to determine whether to check the permission
|
checkAccept, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageDefinition, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader
public static SecurityManager createSecurityManager(SystemMail systemMail, Main main) throws IllegalAccessException
systemMail
- the system mail object in order to send e-mails to owner in case of emergencymain
- a reference to the main instanceIllegalAccessException
- thrown if this method is called more than oncepublic Optional<AddOnModel> getAddOnModelForClassLoader()
IzouPermissionException
- if the AddOnModel is not foundpublic boolean shouldCheck()
public void checkPermission(Permission perm)
checkPermission
in class SecurityManager
public void checkPropertyAccess(String key)
checkPropertyAccess
in class SecurityManager
public void checkExec(String cmd)
checkExec
in class SecurityManager
public void checkExit(int status)
checkExit
in class SecurityManager
public void checkDelete(String file)
checkDelete
in class SecurityManager
public void checkAccess(ThreadGroup g)
checkAccess
in class SecurityManager
public void checkAccess(Thread t)
checkAccess
in class SecurityManager
public void checkRead(String file)
checkRead
in class SecurityManager
public void checkWrite(FileDescriptor fd)
checkWrite
in class SecurityManager
public void checkPackageAccess(String pkg)
checkPackageAccess
in class SecurityManager
Copyright © 2016. All rights reserved.