public class FirewallingSecurityManager extends SecurityManager
inCheck
Constructor and Description |
---|
FirewallingSecurityManager() |
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 specified security context is denied access to the resource
specified by the given permission. |
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, getSecurityContext, getThreadGroup, inClass, inClassLoader
public void checkPermission(Permission perm)
SecurityException
if the requested access, specified by the given permission, is not
permitted based on the security policy currently in effect.
This method calls AccessController.checkPermission
with the given permission.checkPermission
in class SecurityManager
perm
- the requested permission.SecurityException
- if access is not permitted based on the current security policy.NullPointerException
- if the permission argument is null
.public void checkPermission(Permission perm, Object context)
SecurityException
if the specified security context is denied access to the resource
specified by the given permission. The context must be a security context returned by a previous call to
getSecurityContext
and the access control decision is based upon the configured security policy for
that security context.
If context
is an instance of AccessControlContext
then the
AccessControlContext.checkPermission
method is invoked with the specified permission.
If context
is not an instance of AccessControlContext
then a
SecurityException
is thrown.checkPermission
in class SecurityManager
perm
- the specified permissioncontext
- a system-dependent security context.SecurityException
- if the specified security context is not an instance of
AccessControlContext
(e.g., is null
), or is denied access to the resource specified by the
given permission.NullPointerException
- if the permission argument is null
.SecurityManager.getSecurityContext()
,
AccessControlContext.checkPermission(java.security.Permission)
Copyright © 2017 Hitachi Vantara. All rights reserved.