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.
-
RMISecurityManager()
- Construct and initialize.
-
checkAccept(String, int)
- For now stubs can't accept connections on any port.
-
checkAccess(Thread)
- Stubs are not allowed to manipulate threads.
-
checkAccess(ThreadGroup)
- Stubs are not allowed to manipulate thread groups.
-
checkAwtEventQueueAccess()
- Checks to see if an client can get access to the AWT event queue
(disallowed from stubs).
-
checkConnect(String, int)
- Stubs can make connections if called through the RMI transport.
-
checkConnect(String, int, Object)
- Downloaded classes (including stubs) can make connections if
called through the RMI transport.
-
checkCreateClassLoader()
- Stubs are not allowed to create class loaders, or even execute any
of ClassLoader's methods.
-
checkDelete(String)
- Check if a file with the specified system dependent
file name can be deleted.
-
checkExec(String)
- Stubs are not allowed to fork processes.
-
checkExit(int)
- Stubs are not allowed to exit the VM.
-
checkLink(String)
- Stubs are not allowed to link dynamic libraries.
-
checkListen(int)
- For now stubs can't listen on any port.
-
checkMemberAccess(Class, int)
- Checks to see if client code can access class members.
-
checkMulticast(InetAddress)
- Checks to see if current execution context is allowed to use
(join/leave/send/receive) IP multicast (disallowed from stubs).
-
checkMulticast(InetAddress, byte)
- Checks to see if current execution context is allowed to use
(join/leave/send/receive) IP multicast (disallowed from stubs).
-
checkPackageAccess(String)
- Check if a stub can access a package.
-
checkPackageDefinition(String)
- Check if a stub can define classes in a package.
-
checkPrintJobAccess()
- Disallow printing from stubs.
-
checkPropertiesAccess()
- Stubs are not allowed to access the entire system properties
list, only properties explicitly labeled as accessible to stubs.
-
checkPropertyAccess(String)
- Stubs can access the system property named by key
only if its twin key.stub property is set to true.
-
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.
-
checkRead(String)
- Check if a stub can read a particular file.
-
checkRead(String, Object)
- No file reads are valid from a stub.
-
checkSecurityAccess(String)
- Stubs cannot perform security provider operations.
-
checkSetFactory()
- Check if a stub can set a networking-related object factory.
-
checkSystemClipboardAccess()
- Checks to see if an client can get access to the System Clipboard
(disallowed from stubs).
-
checkTopLevelWindow(Object)
- Allow caller to create top-level windows.
-
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.
-
checkWrite(String)
- Check if a Stub can write a particular file.
-
getSecurityContext()
- Returns the security context (e.g., a URL).
RMISecurityManager
public RMISecurityManager()
- Construct and initialize.
getSecurityContext
public Object getSecurityContext()
- Returns the security context (e.g., a URL).
- Overrides:
- getSecurityContext in class SecurityManager
checkCreateClassLoader
public synchronized void checkCreateClassLoader()
- Stubs are not allowed to create class loaders, or even execute any
of ClassLoader's methods.
- Overrides:
- checkCreateClassLoader in class SecurityManager
checkAccess
public synchronized void checkAccess(Thread t)
- Stubs are not allowed to manipulate threads.
- Overrides:
- checkAccess in class SecurityManager
checkAccess
public synchronized void checkAccess(ThreadGroup g)
- Stubs are not allowed to manipulate thread groups.
- Overrides:
- checkAccess in class SecurityManager
checkExit
public synchronized void checkExit(int status)
- Stubs are not allowed to exit the VM.
- Overrides:
- checkExit in class SecurityManager
checkExec
public synchronized void checkExec(String cmd)
- Stubs are not allowed to fork processes.
- Overrides:
- checkExec in class SecurityManager
checkLink
public synchronized void checkLink(String lib)
- Stubs are not allowed to link dynamic libraries.
- Overrides:
- checkLink in class SecurityManager
checkPropertiesAccess
public synchronized void checkPropertiesAccess()
- Stubs are not allowed to access the entire system properties
list, only properties explicitly labeled as accessible to stubs.
- Overrides:
- checkPropertiesAccess in class SecurityManager
checkPropertyAccess
public synchronized void checkPropertyAccess(String key)
- 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
checkRead
public synchronized void checkRead(String file)
- Check if a stub can read a particular file.
- Overrides:
- checkRead in class SecurityManager
checkRead
public void checkRead(String file,
Object context)
- No file reads are valid from a stub.
- Throws: SecurityException
- If called from a stub class.
- Overrides:
- checkRead in class SecurityManager
checkWrite
public synchronized void checkWrite(String file)
- Check if a Stub can write a particular file.
- Throws: SecurityException
- If called from a stub class.
- Overrides:
- checkWrite in class SecurityManager
checkDelete
public void checkDelete(String file)
- 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
checkRead
public synchronized void checkRead(FileDescriptor fd)
- 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
checkWrite
public synchronized void checkWrite(FileDescriptor fd)
- 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
checkListen
public synchronized void checkListen(int port)
- For now stubs can't listen on any port.
- Overrides:
- checkListen in class SecurityManager
checkAccept
public synchronized void checkAccept(String host,
int port)
- For now stubs can't accept connections on any port.
- Overrides:
- checkAccept in class SecurityManager
checkMulticast
public void checkMulticast(InetAddress maddr)
- 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
checkMulticast
public void checkMulticast(InetAddress maddr,
byte ttl)
- 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
checkConnect
public synchronized void checkConnect(String host,
int port)
- Stubs can make connections if called through the RMI transport.
- Overrides:
- checkConnect in class SecurityManager
checkConnect
public void checkConnect(String host,
int port,
Object context)
- Downloaded classes (including stubs) can make connections if
called through the RMI transport.
- Overrides:
- checkConnect in class SecurityManager
checkTopLevelWindow
public synchronized boolean checkTopLevelWindow(Object window)
- Allow caller to create top-level windows.
Allow stubs to create windows with warnings.
- Overrides:
- checkTopLevelWindow in class SecurityManager
checkPackageAccess
public synchronized void checkPackageAccess(String pkg)
- Check if a stub can access a package.
- Overrides:
- checkPackageAccess in class SecurityManager
checkPackageDefinition
public synchronized void checkPackageDefinition(String pkg)
- Check if a stub can define classes in a package.
- Overrides:
- checkPackageDefinition in class SecurityManager
checkSetFactory
public synchronized void checkSetFactory()
- Check if a stub can set a networking-related object factory.
- Overrides:
- checkSetFactory in class SecurityManager
checkPrintJobAccess
public void checkPrintJobAccess()
- Disallow printing from stubs.
- Overrides:
- checkPrintJobAccess in class SecurityManager
checkSystemClipboardAccess
public void checkSystemClipboardAccess()
- Checks to see if an client can get access to the System Clipboard
(disallowed from stubs).
- Overrides:
- checkSystemClipboardAccess in class SecurityManager
checkAwtEventQueueAccess
public void checkAwtEventQueueAccess()
- Checks to see if an client can get access to the AWT event queue
(disallowed from stubs).
- Overrides:
- checkAwtEventQueueAccess in class SecurityManager
checkMemberAccess
public void checkMemberAccess(Class clazz,
int which)
- 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
checkSecurityAccess
public void checkSecurityAccess(String provider)
- Stubs cannot perform security provider operations.
- Overrides:
- checkSecurityAccess in class SecurityManager
All Packages Class Hierarchy This Package Previous Next Index