| java.lang.Object | |
| ↳ | java.lang.SecurityManager |
SecurityManager is the abstract superclass of the classes which can provide security verification for a running program.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| inCheck | This field is deprecated. Use checkPermission(Permission) | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance of this class.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Checks whether the running program is allowed to accept socket
connections.
| |||||||||||
Checks whether the running program is allowed to modify the thread group.
| |||||||||||
Checks whether the running program is allowed to modify the thread.
| |||||||||||
Checks whether the running program is allowed to access the AWT Event
queue.
| |||||||||||
Checks whether the given security context is allowed to establish socket
connections.
| |||||||||||
Checks whether the running program is allowed to establish socket
connections.
| |||||||||||
Checks whether the running program is allowed to create a class loader.
| |||||||||||
Checks whether the running program is allowed to delete the file named by
the argument, which should be passed in canonical form.
| |||||||||||
Checks whether the running program is allowed to execute the specified
platform specific command.
| |||||||||||
Checks whether the running program is allowed to terminate itself.
| |||||||||||
Checks whether the running program is allowed to load the specified
native library.
| |||||||||||
Checks whether the running program is allowed to listen on the specified
port.
| |||||||||||
Checks whether the running program is allowed to access members.
| |||||||||||
Checks whether the running program is allowed to join, leave or send to a
multicast address.
| |||||||||||
This method is deprecated.
use checkMulticast(java.net.InetAddress)
| |||||||||||
Checks whether the running program is allowed to access the specified
package.
| |||||||||||
Checks whether the running program is allowed to define new classes in
the specified package.
| |||||||||||
Checks whether the running program is allowed to access the resource
being guarded by the given Permission argument.
| |||||||||||
Checks whether the running program is allowed to access the resource
being guarded by the given Permission argument.
| |||||||||||
Checks whether the running program is allowed to start a new print job.
| |||||||||||
Checks whether the running program is allowed to access the system
properties.
| |||||||||||
Checks whether the running program is allowed to access a particular
system property.
| |||||||||||
Checks whether the running program is allowed to read from the file whose
descriptor is the argument.
| |||||||||||
Checks whether the given security context is allowed to read from the
file named by the argument, which should be passed in canonical form.
| |||||||||||
Checks whether the running program is allowed to read from the file named
by the argument, which should be passed in canonical form.
| |||||||||||
Checks whether the running program is allowed to perform the security
operation named by the target.
| |||||||||||
Checks whether the running program is allowed to set the net object
factories.
| |||||||||||
Checks whether the running program is allowed to access the system
clipboard.
| |||||||||||
Checks whether the running program is allowed to create a top level
window.
| |||||||||||
Checks whether the running program is allowed to write to the file named
by the argument, which should be passed in canonical form.
| |||||||||||
Checks whether the running program is allowed to read from the file whose
descriptor is the argument.
| |||||||||||
This method is deprecated.
Use checkPermission(Permission)
| |||||||||||
Returns an object which encapsulates the security state of the current
point in the execution.
| |||||||||||
Returns the thread group which should be used to instantiate new threads.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Use checkPermission(Permission)
| |||||||||||
This method is deprecated.
Use checkPermission(Permission)
| |||||||||||
This method is deprecated.
Use checkPermission(Permission)
| |||||||||||
This method is deprecated.
Use checkPermission(Permission)
| |||||||||||
Returns an array containing one entry for each method in the stack.
| |||||||||||
This method is deprecated.
Use checkPermission(Permission)
| |||||||||||
This method is deprecated.
Use checkPermission(Permission)
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
This field is deprecated.Use checkPermission(Permission)
Flag to indicate whether a security check is in progress.
Constructs a new instance of this class.
Checks whether the running program is allowed to accept socket connections.
| host | the address of the host which is attempting to connect |
|---|---|
| port | the port number to check |
Checks whether the running program is allowed to modify the thread group.
| group | the thread group we are attempting to modify |
|---|
Checks whether the running program is allowed to modify the thread.
| thread | the thread we are attempting to modify |
|---|
Checks whether the running program is allowed to access the AWT Event queue. Since we don't support AWT, the answer is no.
Checks whether the given security context is allowed to establish socket connections. A -1 port indicates the caller is trying to resolve the hostname.
| host | String the address of the host to connect to. |
|---|---|
| port | int the port number to check, or -1 for resolve. |
| context | Object the security context to use for the check. |
Checks whether the running program is allowed to establish socket connections. A -1 port indicates the caller is trying to resolve the hostname.
| host | String the address of the host to connect to. |
|---|---|
| port | int the port number to check, or -1 for resolve. |
Checks whether the running program is allowed to create a class loader.
Checks whether the running program is allowed to delete the file named by the argument, which should be passed in canonical form.
| file | the name of the file to check |
|---|
| SecurityException | if the caller is not allowed to delete the given file. |
|---|
Checks whether the running program is allowed to execute the specified platform specific command.
| cmd | the command line |
|---|
Checks whether the running program is allowed to terminate itself.
| status | the status to return from the exit. |
|---|
Checks whether the running program is allowed to load the specified native library.
| libName | the name of the library to load |
|---|
Checks whether the running program is allowed to listen on the specified port.
| port | int the port number to check |
|---|
Checks whether the running program is allowed to access members. The default is to allow access to public members (i.e. java.lang.reflect.PUBLIC) and to classes loaded by the same loader as the original caller (i.e. the method that called the reflect API). Due to the nature of the check, overriding implementations cannot call super.checkMemberAccess() since the stack would no longer be of the expected shape.
| cls | ? |
|---|---|
| type | Either java.lang.reflect.Member.PUBLIC or DECLARED |
Checks whether the running program is allowed to join, leave or send to a multicast address.
This method is deprecated.use checkMulticast(java.net.InetAddress)
Checks whether the running program is allowed to join, leave or send to a multicast address.
Checks whether the running program is allowed to access the specified package.
| packageName | the name of the package to be accessed. |
|---|
Checks whether the running program is allowed to define new classes in the specified package.
| packageName | the name of the package to add a class to. |
|---|
Checks whether the running program is allowed to access the resource being guarded by the given Permission argument.
| permission | the permission to check |
|---|
Checks whether the running program is allowed to access the resource being guarded by the given Permission argument.
| permission | the permission to check |
|---|
Checks whether the running program is allowed to start a new print job.
Checks whether the running program is allowed to access the system properties.
Checks whether the running program is allowed to access a particular system property.
| key | the name of the property to be accessed. |
|---|
Checks whether the running program is allowed to read from the file whose descriptor is the argument.
| fd | the file descriptor of the file to check |
|---|
Checks whether the given security context is allowed to read from the file named by the argument, which should be passed in canonical form.
| file | String the name of the file or directory to check. |
|---|---|
| context | Object the security context to use for the check. |
Checks whether the running program is allowed to read from the file named by the argument, which should be passed in canonical form.
| file | String the name of the file or directory to check. |
|---|
Checks whether the running program is allowed to perform the security operation named by the target.
| target | String the name of the operation to perform. |
|---|
Checks whether the running program is allowed to set the net object factories.
Checks whether the running program is allowed to access the system clipboard.
Checks whether the running program is allowed to create a top level window.
| window | The non-null window for which to check access |
|---|
Checks whether the running program is allowed to write to the file named by the argument, which should be passed in canonical form.
| file | the name of the file to check |
|---|
Checks whether the running program is allowed to read from the file whose descriptor is the argument.
| fd | the file descriptor of the file to check |
|---|
This method is deprecated.Use checkPermission(Permission)
Returns true if the security manager is currently checking something.
Returns an object which encapsulates the security state of the current point in the execution. In our case, this is an AccessControlContext.
Returns the thread group which should be used to instantiate new threads. By default, this is the same as the thread group of the thread running this method.
This method is deprecated.Use checkPermission(Permission)
Returns the index in the stack of the first method which is contained in
a class called name. If no methods from this class are in
the stack, return -1.
| name | String the name of the class to look for. |
|---|
This method is deprecated.Use checkPermission(Permission)
Returns the index in the stack of three first class whose class loader is not a system class loader.
This method is deprecated.Use checkPermission(Permission)
Returns the class loader of the first class in the stack whose class loader is not a system class loader.
This method is deprecated.Use checkPermission(Permission)
Returns the first class in the stack which was loaded by a class loader which is not a system class loader.
Returns an array containing one entry for each method in the stack. Each entry is the java.lang.Class which represents the class in which the method is defined.
This method is deprecated.Use checkPermission(Permission)
Returns true if there is a method on the stack from the specified class, and false otherwise.
| name | String the name of the class to look for. |
|---|
This method is deprecated.Use checkPermission(Permission)
Returns true if there is a method on the stack from a class which was defined by a non-system classloader.