|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.SecurityManager
ewe.security.mSecurityManager
| Field Summary |
| Fields inherited from class java.lang.SecurityManager |
inCheck |
| Constructor Summary | |
mSecurityManager()
|
|
| Method Summary | |
void |
checkAccess(Thread t)
Check if the current thread is allowed to modify another Thread. |
void |
checkAccess(ThreadGroup tg)
Check if the current thread is allowed to modify a ThreadGroup. |
mThreadGroup |
checkAssignMThreadGroup(mThreadGroup group)
|
void |
checkCreateClassLoader()
Check if the current thread is allowed to create a ClassLoader. |
void |
checkCreateSecurityManager(SecurityManager obj)
|
void |
checkDelete(String filename)
Check if the current thread is allowed to delete the given file. |
abstract void |
checkLocalFileAccess()
|
void |
checkPassAuthority(ClassLoader from,
ClassLoader to)
|
void |
checkRead(String filename,
Object context)
Check if the current thread is allowed to read the given file. |
protected Class |
findFirstInstanceof(Class aClass)
|
PropertyList |
getAuthorizers(ClassLoader loader,
boolean forWriting)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Constructor Detail |
public mSecurityManager()
| Method Detail |
public abstract void checkLocalFileAccess()
public PropertyList getAuthorizers(ClassLoader loader,
boolean forWriting)
protected Class findFirstInstanceof(Class aClass)
public void checkCreateClassLoader()
SecurityManagerRuntimePermission("createClassLoader"). If you override
this, you should call super.checkCreateClassLoader() rather
than throwing an exception.
checkCreateClassLoader in class SecurityManagerClassLoader.ClassLoader()
public final void checkPassAuthority(ClassLoader from,
ClassLoader to)
public void checkCreateSecurityManager(SecurityManager obj)
public mThreadGroup checkAssignMThreadGroup(mThreadGroup group)
public final void checkAccess(Thread t)
SecurityManagerRuntimePermission("modifyThread") on system threads (ie.
threads in ThreadGroup with a null parent), and returns silently on
other threads.
If you override this, you must do two things. First, call
super.checkAccess(t), to make sure you are not relaxing
requirements. Second, if the calling thread has
RuntimePermission("modifyThread"), return silently, so that
core classes (the Classpath library!) can modify any thread.
- Overrides:
checkAccess in class SecurityManager
- Parameters:
t - the other Thread to check- See Also:
Thread#stop(),
Thread#suspend(),
Thread#resume(),
Thread#setPriority(int),
Thread#setName(String),
Thread#setDaemon(boolean)
public final void checkAccess(ThreadGroup tg)
SecurityManagerRuntimePermission("modifyThread") on the system group (ie.
the one with a null parent), and returns silently on other groups.
If you override this, you must do two things. First, call
super.checkAccess(t), to make sure you are not relaxing
requirements. Second, if the calling thread has
RuntimePermission("modifyThreadGroup"), return silently,
so that core classes (the Classpath library!) can modify any thread.
- Overrides:
checkAccess in class SecurityManager
- Parameters:
tg - the ThreadGroup to check- See Also:
Thread#Thread(),
ThreadGroup#ThreadGroup(),
ThreadGroup#stop(),
ThreadGroup#suspend(),
ThreadGroup#resume(),
ThreadGroup#interrupt(),
ThreadGroup#setDaemon(boolean),
ThreadGroup#setMaxPriority(int)
public void checkRead(String filename,
Object context)
SecurityManagergetSecurityContext(). The default implementation checks
AccessControlContext.checkPermission(new FilePermission(filename,
"read")). If you override this, call super.checkRead
rather than throwing an exception.
checkRead in class SecurityManagerfilename - the full name of the file to accesscontext - the context to determine access forSecurityManager.getSecurityContext(),
AccessControlContext#checkPermission(Permission)public void checkDelete(String filename)
SecurityManagerFilePermission(filename, "delete"). If you override this,
call super.checkDelete rather than throwing an exception.
checkDelete in class SecurityManagerfilename - the full name of the file to deleteFile#delete()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||