| |
|
| java.lang.Object java.lang.SecurityManager sun.awt.AWTSecurityManager com.sun.xlet.XletSecurity
XletSecurity | public class XletSecurity extends AWTSecurityManager (Code) | | This class defines an xlet security policy
version: 1.109, 01/23/03 |
Method Summary | |
public synchronized void | checkAccess(Thread t) Xlets are not allowed to manipulate threads outside
xlet thread groups. | public synchronized void | checkAccess(ThreadGroup g) Xlets are not allowed to manipulate thread groups outside
xlet thread groups. | public void | checkAwtEventQueueAccess() Tests if a client can get access to the AWT event queue. | public void | checkPackageAccess(String pkgname) Throws a SecurityException if the
calling thread is not allowed to access the package specified by
the argument. | public AppContext | getAppContext() Get the AppContext corresponding to the current context.
The default implementation returns null, but this method
may be overridden by various SecurityManagers
(e.g. | public ThreadGroup | getThreadGroup() Returns the thread group of the xlet. | protected boolean | inThreadGroup(ThreadGroup g) Returns true if this threadgroup is in the xlet's own thread
group. | protected boolean | inThreadGroup(Thread thread) Returns true of the threadgroup of thread is in the xlet's
own threadgroup. | public void | reset() Reset from Properties
this method exists to set additional package
access restrictions, which in Applet's case provided
in $USER/.appletviewer or $USER/.hotjava/properties file
as "package.restrict.access., * ". |
XletSecurity | public XletSecurity()(Code) | | Construct and initialize.
|
checkAccess | public synchronized void checkAccess(Thread t)(Code) | | Xlets are not allowed to manipulate threads outside
xlet thread groups.
|
checkAccess | public synchronized void checkAccess(ThreadGroup g)(Code) | | Xlets are not allowed to manipulate thread groups outside
xlet thread groups.
|
checkAwtEventQueueAccess | public void checkAwtEventQueueAccess()(Code) | | Tests if a client can get access to the AWT event queue.
This method calls checkPermission with the
AWTPermission("accessEventQueue") permission.
since: JDK1.1 exception: SecurityException - if the caller does not have permission to accesss the AWT event queue. |
checkPackageAccess | public void checkPackageAccess(String pkgname)(Code) | | Throws a 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.
Parameters: pkg - the package name. exception: SecurityException - if the caller does not havepermission to access the specified package. See Also: java.lang.ClassLoader.loadClass(java.lang.Stringboolean) |
getAppContext | public AppContext getAppContext()(Code) | | Get the AppContext corresponding to the current context.
The default implementation returns null, but this method
may be overridden by various SecurityManagers
(e.g. XletSecurity) to index AppContext objects by the
calling context.
the AppContext corresponding to the current context. See Also: sun.awt.AppContext See Also: java.lang.SecurityManager since: JDK1.2.1 |
getThreadGroup | public ThreadGroup getThreadGroup()(Code) | | Returns the thread group of the xlet. We consult the classloader
if there is one.
|
inThreadGroup | protected boolean inThreadGroup(ThreadGroup g)(Code) | | Returns true if this threadgroup is in the xlet's own thread
group. This will return false if there is no current class
loader.
|
inThreadGroup | protected boolean inThreadGroup(Thread thread)(Code) | | Returns true of the threadgroup of thread is in the xlet's
own threadgroup.
|
reset | public void reset()(Code) | | Reset from Properties
this method exists to set additional package
access restrictions, which in Applet's case provided
in $USER/.appletviewer or $USER/.hotjava/properties file
as "package.restrict.access., * ".
Xlets don't have this default property file, but I'm
leaving the method for now and commenting out the call
from the constructor.
|
|
|
|