![]() D.8. Miscellaneous PackagesThis section lists security-related classes that appear in miscellaneous packages: permission classes, class loaders, and security managers.
This class represents permission to perform windowing operations, like opening a top-level window or examining the event queue. This is a basic permission, so it has no actions. Class Definitionpublic final class java.awt.AWTPermission extends java.security.BasicPermission { // Constructors public AWTPermission(String); public AWTPermission(String, String); } See also: BasicPermission, Permission
This class represents permission to read, write, delete, or execute files. The name encapsulated in this permission is the name of the file; the string "<<ALL_FILES>>" represents all files, while an asterisk represents all files in a directory and a hyphen represents all files that descend from a directory. The actions for this permission are read, write, execute, and delete. Class Definitionpublic final class java.io.FilePermission extends java.security.Permission implements java.io.Serializable { // Constructors public FilePermission(String, String); // Instance Methods public boolean equals(Object); public String getActions(); public int hashCode(); public boolean implies(Permission); public PermissionCollection newPermissionCollection(); } See also: Permission
This class represents permission to perform specific operations during object serialization--specifically, whether or not object substitution may occur during serialization. As all basic permissions, there are no actions associated with this class, which has one valid name: enableSubstitution. Class Definitionpublic final class java.io.SerializablePermission extends java.security.BasicPermission { // Constructors public SerializablePermission(String); public SerializablePermission(String, String); } See also: BasicPermission, Permission
This class is the basis for loading a class dynamically in Java. For historical reasons, it appears in this package, but it is recommended that all new class loaders subclass the SecureClassLoader class in the java.security package instead of using this class. Loading a class explicitly may be done with the loadClass() method of this class (though classes are usually simply loaded as needed). Class Definitionpublic abstract class java.lang.ClassLoader extends java.lang.Object { // Constructors protected ClassLoader(); protected ClassLoader(ClassLoader); // Class Methods public static ClassLoader getSystemClassLoader(); public static URL getSystemResource(String); public static InputStream getSystemResourceAsStream(String); public static Enumeration getSystemResources(String); // Instance Methods public ClassLoader getParent(); public URL getResource(String); public InputStream getResourceAsStream(String); public final Enumeration getResources(String); public Class loadClass(String); // Protected Instance Methods protected final Class defineClass(String, byte[], int, int); protected final Class defineClass(byte[], int, int); protected final Class defineClass(String, byte[], int, int, ProtectionDomain); protected Package definePackage(String, String, String, String, String, String, String, URL); protected Class findClass(String); protected String findLibrary(String); protected final Class findLoadedClass(String); protected Class findLocalClass(String); protected final Class findSystemClass(String); protected Package getPackage(String); protected Package[] getPackages(); protected synchronized Class loadClass(String, boolean); protected final void resolveClass(Class); protected final void setSigners(Class, Object[]); } See also: SecureClassLoader, URLClassLoader
This class represents permission to perform certain runtime operations, such as executing other programs. Like all basic permissions, runtime permissions have no actions. Class Definitionpublic final class java.lang.RuntimePermission extends java.security.BasicPermission { // Constructors public RuntimePermission(String); public RuntimePermission(String, String); } See also: BasicPermission, Permission
This class forms the primary interface to the security model of the virtual machine; it is recommended for backwards compatibility that access to that model occur through this class rather than by calling the access controller directly. However, most of the methods of this class simply call the access controller. Class Definitionpublic class java.lang.SecurityManager extends java.lang.Object { // Variables protected boolean inCheck; // Constructors public SecurityManager(); // Instance Methods public void checkAccept(String, int); public void checkAccess(Thread); public void checkAccess(ThreadGroup); public void checkAwtEventQueueAccess(); public void checkConnect(String, int); public void checkConnect(String, int, Object); public void checkCreateClassLoader(); public void checkDelete(String); public void checkExec(String); public void checkExit(int); public void checkLink(String); public void checkListen(int); public void checkMemberAccess(Class, int); public void checkMulticast(InetAddress); public void checkMulticast(InetAddress, byte); public void checkPackageAccess(String); public void checkPackageDefinition(String); public void checkPermission(Permission); public void checkPermission(Permission, Object); public void checkPrintJobAccess(); public void checkPropertiesAccess(); public void checkPropertyAccess(String); public void checkRead(FileDescriptor); public void checkRead(String); public void checkRead(String, Object); public void checkSecurityAccess(String); public void checkSetFactory(); public void checkSystemClipboardAccess(); public boolean checkTopLevelWindow(Object); public void checkWrite(FileDescriptor); public void checkWrite(String); public boolean getInCheck(); public Object getSecurityContext(); public ThreadGroup getThreadGroup(); // Protected Instance Methods protected native int classDepth(String); protected native int classLoaderDepth(); protected native ClassLoader currentClassLoader(); protected Class currentLoadedClass(); protected native Class[] getClassContext(); protected boolean inClass(String); protected boolean inClassLoader(); } See also: AccessController
This class represents the ability to obtain information via object reflections; specifically, whether private and protected variables and methods may be accessed through object reflection. As all basic permissions, this permission carries no actions; it has a single name: access. Class Definitionpublic final class java.lang.reflect.ReflectPermission extends java.security.BasicPermission { // Constructors public ReflectPermission(String); public ReflectPermission(String, String); } See also: BasicPermission, Permission
This class represents the ability to work with multicast sockets and the ability to use the authenticator classes. As all basic permissions, this class carries no actions. Class Definitionpublic final class java.net.NetPermission extends java.security.BasicPermission { // Constructors public NetPermission(String); public NetPermission(String, String); } See also: BasicPermission, Permission
This class represents the ability to work with certain sockets. The name of this permission is constructed from the hostname or IP address of the machine on the other end of the socket and the port number; either portion of the name is subject to wildcard matching. Valid actions for this class include connect, accept, and listen. Class Definitionpublic final class java.net.SocketPermission extends java.security.Permission implements java.io.Serializable { // Constructors public SocketPermission(String, String); // Instance Methods public boolean equals(Object); public String getActions(); public int hashCode(); public boolean implies(Permission); public PermissionCollection newPermissionCollection(); } See also: Permission
This class provides a concrete class loader that may be used to load classes from one or more URLs (either http-based or file-based URLs). Since it is a secure class loader, classes loaded from a URL class loader will be fully integrated into the access controller's security model. Class Definitionpublic class java.net.URLClassLoader extends java.security.SecureClassLoader { // Constructors public URLClassLoader(URL[], ClassLoader); public URLClassLoader(URL[]); public URLCLassLoader(URL[], ClassLoader, URLStreamHandlerFactory); // Class Methods public static URLClassLoader newInstance(URL[]); public static URLClassLoader newInstance(URL[], ClassLoader); // Instance Methods public URL findResource(String); public Enumeration findResources(String); public URL[] getURLs(); // Protected Instance Methods protected void addURL(URL); protected Package definePackage(String, Manifest, URL); protected Class findClass(String); protected PermissionCollection getPermissions(CodeSource); } See also: ClassLoader, SecureClassLoader
The RMI security manager provides a security manager that is suitable for many RMI servers. It provides the ability for RMI applications to make socket-based connections to each other, and otherwise follows the default security manager implementation. Class Definitionpublic class java.rmi.RMISecurityManager extends java.lang.SecurityManager { // Constructors public RMISecurityManager(); // Instance Methods } See also: SecurityManager
While not a traditional class loader, this class allows classes to be loaded via the same mechanics as a class loader: the loadClass() method may be called to load a class explicitly, and this class will also be used to load all subsequent classes required by the target class. This class loader will only load classes from the URL specified by the java.rmi.server.codebase property. The internal class loader used by this class is a secure class loader, so the security model of the access controller will be used by classes loaded in this manner. Class Definitionpublic class java.rmi.server.RMIClassLoader extends java.lang.Object { // Class Methods public static Object getSecurityContext(ClassLoader); public static Class loadClass(String); public static Class loadClass(String, String); public static Class loadClass(URL, String); } See also: ClassLoader, SecureClassLoader
This class represents the ability to read or write properties. The name of a property permission is the name of the property itself; the action for a property permission is either set or get. Class Definitionpublic final class java.util.PropertyPermission extends java.security.BasicPermission { // Constructors public PropertyPermission(String, String); // Instance Methods public boolean equals(Object); public String getActions(); public int hashCode(); public boolean implies(Permission); public PermissionCollection newPermissionCollection(); } See also: Permission ![]() Copyright © 2001 O'Reilly & Associates. All rights reserved. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|