public class CombinerSecurityManager extends SecurityManager implements CachingSecurityManager
Security
,
SecurityContext
,
AccessControlContext
inCheck
Constructor and Description |
---|
CombinerSecurityManager() |
Modifier and Type | Method and Description |
---|---|
void |
checkPermission(Permission perm)
Throws a
SecurityException if the requested
access, specified by the given permission, is not permitted based
on the security policy currently in effect. |
void |
checkPermission(Permission perm,
Object context)
Throws a
SecurityException if the requested
access, specified by the given permission and context, is not permitted based
on the security policy currently in effect. |
protected boolean |
checkPermission(ProtectionDomain pd,
Permission p)
Enables customisation of permission check.
|
void |
clearCache()
This method is intended to be called only by a Policy.
|
Object |
getSecurityContext() |
checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getThreadGroup, inClass, inClassLoader
public Object getSecurityContext()
getSecurityContext
in class SecurityManager
public void checkPermission(Permission perm) throws SecurityException
SecurityException
if the requested
access, specified by the given permission, is not permitted based
on the security policy currently in effect.
This method obtains the current SecurityContext and checks
the give permission in that context.checkPermission
in class SecurityManager
perm
- SecurityException
SecurityContext
,
Security
public final void checkPermission(Permission perm, Object context) throws SecurityException
SecurityException
if the requested
access, specified by the given permission and context, is not permitted based
on the security policy currently in effect.
It is absolutely essential that the SecurityContext override equals
and hashCode.checkPermission
in class SecurityManager
perm
- permission to be checkedcontext
- - AccessControlContext or SecurityContextSecurityException
- if context doesn't have permission.public void clearCache() throws SecurityException
clearCache
in interface CachingSecurityManager
SecurityException
- if caller isn't permitted to clear cache.protected boolean checkPermission(ProtectionDomain pd, Permission p)
pd
- protection domain to be checked.p
- permission to be checked.Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.