All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.rmi.RMISecurityManager

java.lang.Object
    |
    +----java.lang.SecurityManager
            |
            +----java.rmi.RMISecurityManager

public class RMISecurityManager
extends SecurityManager
RMISecurityManager provides a default security manager for use by RMI applications that need one because they use downloaded code. RMI's class loader will not download any classes if no security manager has been set. RMISecurityManager does not apply to applets, which run under the protection of their browser's security manager.

To set the RMISecurityManager, add the following to an application's main() method:

 System.setSecurityManager(new RMISecurityManager());
 

The RMISecurityManager follows the same policy as the java.lang.SecurityManager class for security check methods that it does not override.

Since:
JDK1.1

Constructor Index

 o RMISecurityManager()
Construct a new RMISecurityManager object.

Method Index

 o checkAccept(String, int)
Check if a network connection can be accepted from the given host on the given port.
 o checkAccess(Thread)
Check access to threads.
 o checkAccess(ThreadGroup)
Check access to threads.
 o checkConnect(String, int)
Check if a network connection can be made to the given host and port.
 o checkConnect(String, int, Object)
Check if a network connection can be made to the given host and port on behalf of the given context.
 o checkPackageAccess(String)
Check access to classes of a given package.
 o checkPackageDefinition(String)
Check access to defining classes of a given package.
 o checkRead(String)
Check file read access.
 o checkRead(String, Object)
Check file read access on behalf of the given context.
 o getSecurityContext()
Return the security context (e.g., a URL).
 o getThreadGroup()
Return the thread group that new threads should be created in.

Constructors

 o RMISecurityManager
public RMISecurityManager()
Construct a new RMISecurityManager object.

Methods

 o getSecurityContext
public Object getSecurityContext()
Return the security context (e.g., a URL).

Overrides:
getSecurityContext in class SecurityManager
 o checkAccess
public void checkAccess(Thread t)
Check access to threads.

Overrides:
checkAccess in class SecurityManager
 o checkAccess
public void checkAccess(ThreadGroup g)
Check access to threads.

Overrides:
checkAccess in class SecurityManager
 o checkRead
public void checkRead(String file)
Check file read access.

Overrides:
checkRead in class SecurityManager
 o checkRead
public void checkRead(String file,
                      Object context)
Check file read access on behalf of the given context.

Overrides:
checkRead in class SecurityManager
 o checkConnect
public void checkConnect(String host,
                         int port)
Check if a network connection can be made to the given host and port.

Overrides:
checkConnect in class SecurityManager
 o checkConnect
public void checkConnect(String host,
                         int port,
                         Object context)
Check if a network connection can be made to the given host and port on behalf of the given context.

Overrides:
checkConnect in class SecurityManager
 o checkAccept
public void checkAccept(String host,
                        int port)
Check if a network connection can be accepted from the given host on the given port.

Overrides:
checkAccept in class SecurityManager
 o checkPackageAccess
public void checkPackageAccess(String pkg)
Check access to classes of a given package.

Overrides:
checkPackageAccess in class SecurityManager
 o checkPackageDefinition
public void checkPackageDefinition(String pkg)
Check access to defining classes of a given package.

Overrides:
checkPackageDefinition in class SecurityManager
 o getThreadGroup
public ThreadGroup getThreadGroup()
Return the thread group that new threads should be created in.

Overrides:
getThreadGroup in class SecurityManager

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature