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 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
- context
- - AccessControlContext or SecurityContextSecurityException
public void clearCache() throws SecurityException
clearCache
in interface CachingSecurityManager
SecurityException
protected boolean checkPermission(ProtectionDomain pd, Permission p)
pd
- p
- Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.