Class InternalSecurityManager
- java.lang.Object
-
- java.lang.SecurityManager
-
- com.atlassian.bamboo.specs.maven.sandbox.internal.InternalSecurityManager
-
public class InternalSecurityManager extends java.lang.SecurityManagerThis class defines a security policy based on the applet security policy, with stuff that pertains only to applets removed.
-
-
Constructor Summary
Constructors Constructor Description InternalSecurityManager()Construct and initialize.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckAccess(java.lang.Thread t)Applets are not allowed to manipulate threads outside applet thread groups.voidcheckAccess(java.lang.ThreadGroup g)Applets are not allowed to manipulate thread groups outside applet thread groups.voidcheckPackageAccess(java.lang.String pkgname)Throws aSecurityExceptionif the calling thread is not allowed to access the package specified by the argument.protected booleaninThreadGroup(java.lang.Thread thread)Returns true of the threadgroup of thread is in the applet's own threadgroup.protected booleaninThreadGroup(java.lang.ThreadGroup g)Returns true if this threadgroup is in the applet's own thread group.voidreset()Reset from Properties.-
Methods inherited from class java.lang.SecurityManager
checkAccept, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMulticast, checkMulticast, checkPackageDefinition, checkPermission, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkWrite, checkWrite, getClassContext, getSecurityContext, getThreadGroup
-
-
-
-
Method Detail
-
reset
public void reset()
Reset from Properties.
-
inThreadGroup
protected boolean inThreadGroup(java.lang.ThreadGroup g)
Returns true if this threadgroup is in the applet's own thread group. This will return false if there is no current class loader.
-
inThreadGroup
protected boolean inThreadGroup(java.lang.Thread thread)
Returns true of the threadgroup of thread is in the applet's own threadgroup.
-
checkAccess
public void checkAccess(java.lang.Thread t)
Applets are not allowed to manipulate threads outside applet thread groups. However a terminated thread no longer belongs to any group.- Overrides:
checkAccessin classjava.lang.SecurityManager
-
checkAccess
public void checkAccess(java.lang.ThreadGroup g)
Applets are not allowed to manipulate thread groups outside applet thread groups.- Overrides:
checkAccessin classjava.lang.SecurityManager
-
checkPackageAccess
public void checkPackageAccess(java.lang.String pkgname)
Throws aSecurityExceptionif the calling thread is not allowed to access the package specified by the argument.This method is used by the
loadClassmethod of class loaders.The
checkPackageAccessmethod for classSecurityManagercallscheckPermissionwith theRuntimePermission("accessClassInPackage."+ pkgname)permission.- Overrides:
checkPackageAccessin classjava.lang.SecurityManager- Parameters:
pkgname- the package name.- Throws:
java.lang.SecurityException- if the caller does not have permission to access the specified package.- See Also:
ClassLoader.loadClass(java.lang.String, boolean)
-
-