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
This class defines the RMI Stub security policy for applications (not applets). For code loaded as a Stub, the security manager disables all functions except class definition and access. To set a RMISecurityManager, add the following to an application's main() method:
System.setSecurityManager(new RMISecurityManager()); If no security manager has been set, RMI will load stub classes only from the local files as defined by CLASSPATH.


Constructor Index

 o RMISecurityManager()
Construct and initialize.

Method Index

 o checkAccept(String, int)
For now stubs can't accept connections on any port.
 o checkAccess(Thread)
Stubs are not allowed to manipulate threads.
 o checkAccess(ThreadGroup)
Stubs are not allowed to manipulate thread groups.
 o checkAwtEventQueueAccess()
Checks to see if an client can get access to the AWT event queue (disallowed from stubs).
 o checkConnect(String, int)
Stubs can make connections if called through the RMI transport.
 o checkConnect(String, int, Object)
Downloaded classes (including stubs) can make connections if called through the RMI transport.
 o checkCreateClassLoader()
Stubs are not allowed to create class loaders, or even execute any of ClassLoader's methods.
 o checkDelete(String)
Check if a file with the specified system dependent file name can be deleted.
 o checkExec(String)
Stubs are not allowed to fork processes.
 o checkExit(int)
Stubs are not allowed to exit the VM.
 o checkLink(String)
Stubs are not allowed to link dynamic libraries.
 o checkListen(int)
For now stubs can't listen on any port.
 o checkMemberAccess(Class, int)
Checks to see if client code can access class members.
 o checkMulticast(InetAddress)
Checks to see if current execution context is allowed to use (join/leave/send/receive) IP multicast (disallowed from stubs).
 o checkMulticast(InetAddress, byte)
Checks to see if current execution context is allowed to use (join/leave/send/receive) IP multicast (disallowed from stubs).
 o checkPackageAccess(String)
Check if a stub can access a package.
 o checkPackageDefinition(String)
Check if a stub can define classes in a package.
 o checkPrintJobAccess()
Disallow printing from stubs.
 o checkPropertiesAccess()
Stubs are not allowed to access the entire system properties list, only properties explicitly labeled as accessible to stubs.
 o checkPropertyAccess(String)
Stubs can access the system property named by key only if its twin key.stub property is set to true.
 o checkRead(FileDescriptor)
Stubs are not allowed to open file descriptors for reading unless it is done through a socket, in which case other access restrictions still apply.
 o checkRead(String)
Check if a stub can read a particular file.
 o checkRead(String, Object)
No file reads are valid from a stub.
 o checkSecurityAccess(String)
Stubs cannot perform security provider operations.
 o checkSetFactory()
Check if a stub can set a networking-related object factory.
 o checkSystemClipboardAccess()
Checks to see if an client can get access to the System Clipboard (disallowed from stubs).
 o checkTopLevelWindow(Object)
Allow caller to create top-level windows.
 o checkWrite(FileDescriptor)
Stubs are not allowed to open file descriptors for writing unless it is done through a socket, in which case other access restrictions still apply.
 o checkWrite(String)
Check if a Stub can write a particular file.
 o getSecurityContext()
Returns the security context (e.g., a URL).

Constructors

 o RMISecurityManager
    method RMISecurityManager() public 
Construct and initialize.

Methods

 o getSecurityContext
    method getSecurityContext() returns Object public     
Returns the security context (e.g., a URL).

Overrides:
getSecurityContext in class SecurityManager
 o checkCreateClassLoader
    method checkCreateClassLoader()  public    protect 
Stubs are not allowed to create class loaders, or even execute any of ClassLoader's methods.

Overrides:
checkCreateClassLoader in class SecurityManager
 o checkAccess
    method checkAccess(t=Thread)  public    protect 
Stubs are not allowed to manipulate threads.

Overrides:
checkAccess in class SecurityManager
 o checkAccess
    method checkAccess(g=ThreadGroup)  public    protect 
Stubs are not allowed to manipulate thread groups.

Overrides:
checkAccess in class SecurityManager
 o checkExit
    method checkExit(status=int)  public    protect 
Stubs are not allowed to exit the VM.

Overrides:
checkExit in class SecurityManager
 o checkExec
    method checkExec(cmd=String)  public    protect 
Stubs are not allowed to fork processes.

Overrides:
checkExec in class SecurityManager
 o checkLink
    method checkLink(lib=String)  public    protect 
Stubs are not allowed to link dynamic libraries.

Overrides:
checkLink in class SecurityManager
 o checkPropertiesAccess
    method checkPropertiesAccess()  public    protect 
Stubs are not allowed to access the entire system properties list, only properties explicitly labeled as accessible to stubs.

Overrides:
checkPropertiesAccess in class SecurityManager
 o checkPropertyAccess
    method checkPropertyAccess(key=String)  public    protect 
Stubs can access the system property named by key only if its twin key.stub property is set to true. For example, the property java.home can be read by stubs only if java.home.stub is true.

Overrides:
checkPropertyAccess in class SecurityManager
 o checkRead
    method checkRead(file=String)  public    protect 
Check if a stub can read a particular file.

Overrides:
checkRead in class SecurityManager
 o checkRead
    method checkRead(file=String, -
                     context=Object)  public     
No file reads are valid from a stub.

Throws: SecurityException
If called from a stub class.
Overrides:
checkRead in class SecurityManager
 o checkWrite
    method checkWrite(file=String)  public    protect 
Check if a Stub can write a particular file.

Throws: SecurityException
If called from a stub class.
Overrides:
checkWrite in class SecurityManager
 o checkDelete
    method checkDelete(file=String)  public     
Check if a file with the specified system dependent file name can be deleted.

Parameters:
file - the system dependent file name
Throws: SecurityException
If the file is not found.
Overrides:
checkDelete in class SecurityManager
 o checkRead
    method checkRead(fd=FileDescriptor)  public    protect 
Stubs are not allowed to open file descriptors for reading unless it is done through a socket, in which case other access restrictions still apply.

Overrides:
checkRead in class SecurityManager
 o checkWrite
    method checkWrite(fd=FileDescriptor)  public    protect 
Stubs are not allowed to open file descriptors for writing unless it is done through a socket, in which case other access restrictions still apply.

Overrides:
checkWrite in class SecurityManager
 o checkListen
    method checkListen(port=int)  public    protect 
For now stubs can't listen on any port.

Overrides:
checkListen in class SecurityManager
 o checkAccept
    method checkAccept(host=String, -
                       port=int)  public    protect 
For now stubs can't accept connections on any port.

Overrides:
checkAccept in class SecurityManager
 o checkMulticast
    method checkMulticast(maddr=InetAddress)  public     
Checks to see if current execution context is allowed to use (join/leave/send/receive) IP multicast (disallowed from stubs).

Overrides:
checkMulticast in class SecurityManager
 o checkMulticast
    method checkMulticast(maddr=InetAddress, -
                          ttl=byte)  public     
Checks to see if current execution context is allowed to use (join/leave/send/receive) IP multicast (disallowed from stubs).

Overrides:
checkMulticast in class SecurityManager
 o checkConnect
    method checkConnect(host=String, -
                        port=int)  public    protect 
Stubs can make connections if called through the RMI transport.

Overrides:
checkConnect in class SecurityManager
 o checkConnect
    method checkConnect(host=String, -
                        port=int, -
                        context=Object)  public     
Downloaded classes (including stubs) can make connections if called through the RMI transport.

Overrides:
checkConnect in class SecurityManager
 o checkTopLevelWindow
    method checkTopLevelWindow(window=Object) returns boolean public    protect 
Allow caller to create top-level windows. Allow stubs to create windows with warnings.

Overrides:
checkTopLevelWindow in class SecurityManager
 o checkPackageAccess
    method checkPackageAccess(pkg=String)  public    protect 
Check if a stub can access a package.

Overrides:
checkPackageAccess in class SecurityManager
 o checkPackageDefinition
    method checkPackageDefinition(pkg=String)  public    protect 
Check if a stub can define classes in a package.

Overrides:
checkPackageDefinition in class SecurityManager
 o checkSetFactory
    method checkSetFactory()  public    protect 
Check if a stub can set a networking-related object factory.

Overrides:
checkSetFactory in class SecurityManager
 o checkPrintJobAccess
    method checkPrintJobAccess()  public     
Disallow printing from stubs.

Overrides:
checkPrintJobAccess in class SecurityManager
 o checkSystemClipboardAccess
    method checkSystemClipboardAccess()  public     
Checks to see if an client can get access to the System Clipboard (disallowed from stubs).

Overrides:
checkSystemClipboardAccess in class SecurityManager
 o checkAwtEventQueueAccess
    method checkAwtEventQueueAccess()  public     
Checks to see if an client can get access to the AWT event queue (disallowed from stubs).

Overrides:
checkAwtEventQueueAccess in class SecurityManager
 o checkMemberAccess
    method checkMemberAccess(clazz=Class, -
                             which=int)  public     
Checks to see if client code can access class members. Allow access to all public information. Allow non-stubs to access default, package, and private declarations (and data).

Overrides:
checkMemberAccess in class SecurityManager
 o checkSecurityAccess
    method checkSecurityAccess(provider=String)  public     
Stubs cannot perform security provider operations.

Overrides:
checkSecurityAccess in class SecurityManager

All Packages  Class Hierarchy  This Package  Previous  Next  Index