Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

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

Fields inherited from class java.lang.SecurityManager
 inCheck
 

Constructor Summary
 RMISecurityManager()
Construct a new RMISecurityManager object.
 

Method Summary
void  checkAccept(String host, int port)
Check if a network connection can be accepted from the given host on the given port.
void  checkAccess(Thread t)
Check access to threads.
void  checkAccess(ThreadGroup g)
Check access to threads.
void  checkConnect(String host, int port)
Check if a network connection can be made to the given host and port.
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.
void  checkPackageAccess(String pkg)
Check access to classes of a given package.
void  checkPackageDefinition(String pkg)
Check access to defining classes of a given package.
void  checkRead(String file)
Check file read access.
void  checkRead(String file, Object context)
Check file read access on behalf of the given context.
Object  getSecurityContext()
Return the security context (e.g., a URL).
ThreadGroup  getThreadGroup()
Return the thread group that new threads should be created in.
 
Methods inherited from class java.lang.SecurityManager
 checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPermission, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMISecurityManager

public RMISecurityManager()
Construct a new RMISecurityManager object.
Method Detail

getSecurityContext

public Object getSecurityContext()
Return the security context (e.g., a URL).
Overrides:
getSecurityContext in class SecurityManager

checkAccess

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

checkAccess

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

checkRead

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

checkRead

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

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

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

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

checkPackageAccess

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

checkPackageDefinition

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

getThreadGroup

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

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.