Class InternalSecurityManager
java.lang.Object
java.lang.SecurityManager
com.atlassian.bamboo.specs.maven.sandbox.internal.InternalSecurityManager
This class defines a security policy based on the applet security policy, with stuff that pertains only to applets removed.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Applets are not allowed to manipulate threads outside applet thread groups.void
Applets are not allowed to manipulate thread groups outside applet thread groups.void
checkPackageAccess
(String pkgname) Throws aSecurityException
if the calling thread is not allowed to access the package specified by the argument.protected boolean
inThreadGroup
(Thread thread) Returns true of the threadgroup of thread is in the applet's own threadgroup.protected boolean
Returns true if this threadgroup is in the applet's own thread group.void
reset()
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
-
Constructor Details
-
InternalSecurityManager
public InternalSecurityManager()Construct and initialize.
-
-
Method Details
-
reset
public void reset()Reset from Properties. -
inThreadGroup
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
Returns true of the threadgroup of thread is in the applet's own threadgroup. -
checkAccess
Applets are not allowed to manipulate threads outside applet thread groups. However a terminated thread no longer belongs to any group.- Overrides:
checkAccess
in classSecurityManager
-
checkAccess
Applets are not allowed to manipulate thread groups outside applet thread groups.- Overrides:
checkAccess
in classSecurityManager
-
checkPackageAccess
Throws aSecurityException
if the calling thread is not allowed to access the package specified by the argument.This method is used by the
loadClass
method of class loaders.The
checkPackageAccess
method for classSecurityManager
callscheckPermission
with theRuntimePermission("accessClassInPackage."+ pkgname)
permission.- Overrides:
checkPackageAccess
in classSecurityManager
- Parameters:
pkgname
- the package name.- Throws:
SecurityException
- if the caller does not have permission to access the specified package.- See Also:
-