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
RMISecurityManager()
- Construct a new
RMISecurityManager
object.
checkAccept(String, int)
- Check if a network connection can be accepted from the
given host on the given port.
checkAccess(Thread)
- Check access to threads.
checkAccess(ThreadGroup)
- Check access to threads.
checkConnect(String, int)
- Check if a network connection can be made to the given
host and port.
checkConnect(String, int, Object)
- Check if a network connection can be made to the given
host and port on behalf of the given context.
checkPackageAccess(String)
- Check access to classes of a given package.
checkPackageDefinition(String)
- Check access to defining classes of a given package.
checkRead(String)
- Check file read access.
checkRead(String, Object)
- Check file read access on behalf of the given context.
getSecurityContext()
- Return the security context (e.g., a
URL
).
getThreadGroup()
- Return the thread group that new threads should be created in.
RMISecurityManager
public RMISecurityManager()
- Construct a new
RMISecurityManager
object.
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
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature