|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.SecurityManager
sun.awt.AWTSecurityManager
sun.applet.AppletSecurity
public class AppletSecurity
This class defines an applet security policy
| Constructor Summary | |
|---|---|
AppletSecurity()
Construct and initialize. |
|
| Method Summary | |
|---|---|
void |
checkAccess(Thread t)
Applets are not allowed to manipulate threads outside applet thread groups. |
void |
checkAccess(ThreadGroup g)
Applets are not allowed to manipulate thread groups outside applet thread groups. |
void |
checkAwtEventQueueAccess()
Tests if a client can get access to the AWT event queue. |
void |
checkPackageAccess(String pkgname)
Throws a SecurityException if the
calling thread is not allowed to access the package specified by
the argument. |
sun.awt.AppContext |
getAppContext()
Get the AppContext corresponding to the current context. |
ThreadGroup |
getThreadGroup()
Returns the thread group of the applet. |
protected boolean |
inThreadGroup(Thread thread)
Returns true of the threadgroup of thread is in the applet's own threadgroup. |
protected boolean |
inThreadGroup(ThreadGroup g)
Returns true if this threadgroup is in the applet's own thread group. |
void |
reset()
Reset from Properties |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AppletSecurity()
| Method Detail |
|---|
public void reset()
protected boolean inThreadGroup(ThreadGroup g)
protected boolean inThreadGroup(Thread thread)
public void checkAccess(Thread t)
checkAccess in class SecurityManagert - the thread to be checked.setDaemon,
setName,
setPriority,
checkPermissionpublic void checkAccess(ThreadGroup g)
checkAccess in class SecurityManagerg - the thread group to be checked.destroy,
setDaemon,
setMaxPriority,
checkPermissionpublic void checkPackageAccess(String pkgname)
SecurityException 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 class
SecurityManager calls
checkPermission with the
RuntimePermission("accessClassInPackage."+pkg)
permission.
checkPackageAccess in class SecurityManagerpkg - the package name.
SecurityException - if the caller does not have
permission to access the specified package.ClassLoader.loadClass(java.lang.String, boolean)public void checkAwtEventQueueAccess()
This method calls checkPermission with the
AWTPermission("accessEventQueue") permission.
checkAwtEventQueueAccess in class SecurityManagerSecurityException - if the caller does not have
permission to accesss the AWT event queue.checkPermissionpublic ThreadGroup getThreadGroup()
getThreadGroup in class SecurityManagerThreadGrouppublic sun.awt.AppContext getAppContext()
getAppContext in class sun.awt.AWTSecurityManagerAppContext,
SecurityManager
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||