public class SandboxSecurity extends SecurityManager
inCheck
Constructor and Description |
---|
SandboxSecurity(SandboxControler sandboxControler)
构造函数
|
checkAwtEventQueueAccess, checkMemberAccess, checkMulticast, checkPermission, checkRead, checkRead, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader
public SandboxSecurity(SandboxControler sandboxControler)
sandboxControler
- 安全模型public SecurityManager getSystemSecurityManager()
public boolean isInList(List<String> restricts, String param)
restricts
- 约束 Listparam
- 被判断参数public boolean isNotInList(List<String> restricts, String param)
restricts
- 约束 Listparam
- 被判断参数public boolean commonCheck(Object condiction, Object param)
condiction
- 判断条件可以为 List 或者 boolean 数据param
- 被判断参数public void throwException(String resource)
resource
- 异常信息public void checkLoadClass(String className) throws ClassNotFoundException
className
- 类名ClassNotFoundException
- 类无法找到异常public void checkPermission(Permission perm)
checkPermission
in class SecurityManager
public void checkAccess(Thread t)
checkAccess
in class SecurityManager
public void checkAccess(ThreadGroup g)
checkAccess
in class SecurityManager
public void checkExit(int status)
checkExit
in class SecurityManager
public void checkExec(String cmd)
checkExec
in class SecurityManager
public void checkLink(String lib)
checkLink
in class SecurityManager
public void checkRead(String file)
checkRead
in class SecurityManager
public void checkWrite(String file)
checkWrite
in class SecurityManager
public void checkDelete(String file)
checkDelete
in class SecurityManager
public void checkConnect(String host, int port)
checkConnect
in class SecurityManager
public void checkConnect(String host, int port, Object context)
checkConnect
in class SecurityManager
public void checkListen(int port)
checkListen
in class SecurityManager
public void checkAccept(String host, int port)
checkAccept
in class SecurityManager
public void checkMulticast(InetAddress maddr)
checkMulticast
in class SecurityManager
public void checkPropertiesAccess()
checkPropertiesAccess
in class SecurityManager
public void checkPropertyAccess(String key)
checkPropertyAccess
in class SecurityManager
public void checkPrintJobAccess()
checkPrintJobAccess
in class SecurityManager
public void checkPackageAccess(String pkg)
checkPackageAccess
in class SecurityManager
public void checkPackageDefinition(String pkg)
checkPackageDefinition
in class SecurityManager
public void checkSetFactory()
checkSetFactory
in class SecurityManager
public void checkSecurityAccess(String target)
checkSecurityAccess
in class SecurityManager
public void checkCreateClassLoader()
checkCreateClassLoader
in class SecurityManager
Copyright © 2020 Voovan. All rights reserved.