API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. SecurityManager View Source
Author(s)
Arthur van Hoff
Roland Schemers
Since
JDK1.0
Version
1.139, 04/21/06
Serial
Hierarchy
 Object
      SecurityManager
Implements
Subclasses
Description
public class SecurityManager
  The security manager is a class that allows applications to implement a security policy.
Constructors
public SecurityManager ()
  Constructs a new SecurityManager.
Methods
Hide/Show inherited methods
public void checkAccept (String host, int port)
  Throws a SecurityException if the calling thread is not permitted to accept a socket connection from the specified host and port number.
public void checkAccess (Thread t)
  Throws a SecurityException if the calling thread is not allowed to modify the thread argument.
public void checkAccess (ThreadGroup g)
  Throws a SecurityException if the calling thread is not allowed to modify the thread group argument.
public void checkAwtEventQueueAccess ()
  Throws a SecurityException if the calling thread is not allowed to access the AWT event queue.
public void checkConnect (String host, int port)
  Throws a SecurityException if the calling thread is not allowed to open a socket connection to the specified host and port number.
public void checkConnect (String host, int port, Object context)
  Throws a SecurityException if the specified security context is not allowed to open a socket connection to the specified host and port number.
public void checkCreateClassLoader ()
  Throws a SecurityException if the calling thread is not allowed to create a new class loader.
public void checkDelete (String file)
  Throws a SecurityException if the calling thread is not allowed to delete the specified file.
public void checkExec (String cmd)
  Throws a SecurityException if the calling thread is not allowed to create a subprocess.
public void checkExit (int status)
  Throws a SecurityException if the calling thread is not allowed to cause the Java Virtual Machine to halt with the specified status code.
public void checkLink (String lib)
  Throws a SecurityException if the calling thread is not allowed to dynamic link the library code specified by the string argument file.
public void checkListen (int port)
  Throws a SecurityException if the calling thread is not allowed to wait for a connection request on the specified local port number.
public void checkMemberAccess (Class<Object> clazz, int which)
  Throws a SecurityException if the calling thread is not allowed to access members.
public void checkMulticast (InetAddress maddr)
  Throws a SecurityException if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.
@Deprecated
public void checkMulticast (InetAddress maddr, byte ttl)
  Throws a SecurityException if the calling thread is not allowed to use (join/leave/send/receive) IP multicast.
public void checkPackageAccess (String pkg)
  Throws a SecurityException if the calling thread is not allowed to access the package specified by the argument.
public void checkPackageDefinition (String pkg)
  Throws a SecurityException if the calling thread is not allowed to define classes in the package specified by the argument.
public void checkPermission (Permission perm)
  Throws a SecurityException if the requested access, specified by the given permission, is not permitted based on the security policy currently in effect.
public void checkPermission (Permission perm, Object context)
  Throws a SecurityException if the specified security context is denied access to the resource specified by the given permission.
public void checkPrintJobAccess ()
  Throws a SecurityException if the calling thread is not allowed to initiate a print job request.
public void checkPropertiesAccess ()
  Throws a SecurityException if the calling thread is not allowed to access or modify the system properties.
public void checkPropertyAccess (String key)
  Throws a SecurityException if the calling thread is not allowed to access the system property with the specified key name.
public void checkRead (FileDescriptor fd)
  Throws a SecurityException if the calling thread is not allowed to read from the specified file descriptor.
public void checkRead (String file)
  Throws a SecurityException if the calling thread is not allowed to read the file specified by the string argument.
public void checkRead (String file, Object context)
  Throws a SecurityException if the specified security context is not allowed to read the file specified by the string argument.
public void checkSecurityAccess (String target)
  Determines whether the permission with the specified permission target name should be granted or denied.
public void checkSetFactory ()
  Throws a SecurityException if the calling thread is not allowed to set the socket factory used by ServerSocket or Socket, or the stream handler factory used by URL.
public void checkSystemClipboardAccess ()
  Throws a SecurityException if the calling thread is not allowed to access the system clipboard.
public boolean checkTopLevelWindow (Object window)
  Returns false if the calling thread is not trusted to bring up the top-level window indicated by the window argument.
public void checkWrite (FileDescriptor fd)
  Throws a SecurityException if the calling thread is not allowed to write to the specified file descriptor.
public void checkWrite (String file)
  Throws a SecurityException if the calling thread is not allowed to write to the file specified by the string argument.
@Deprecated
protectednative int classDepth (String name)
  Returns the stack depth of the specified class.
@Deprecated
protected int classLoaderDepth ()
  Returns the stack depth of the most recently executing method from a class defined using a non-system class loader.
@Deprecated
protected ClassLoader currentClassLoader ()
  Returns the class loader of the most recently executing method from a class defined using a non-system class loader.
@Deprecated
protected Class<Object> currentLoadedClass ()
  Returns the class of the most recently executing method from a class defined using a non-system class loader.
protectednative Class getClassContext ()
  Returns the current execution stack as an array of classes.
@Deprecated
public boolean getInCheck ()
  Tests if there is a security check in progress.
public Object getSecurityContext ()
  Creates an object that encapsulates the current execution environment.
public ThreadGroup getThreadGroup ()
  Returns the thread group into which to instantiate any new thread being created at the time this is being called.
@Deprecated
protected boolean inClass (String name)
  Tests if a method from a class with the specified name is on the execution stack.
@Deprecated
protected boolean inClassLoader ()
  Basically, tests if a method from a class defined using a class loader is on the execution stack.
Fields
Hide/Show inherited fields
@Deprecated
protected boolean inCheck
This field is true if there is a security check in progress; false otherwise.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar