KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > rmi > RMISecurityManager


1 /*
2  * @(#)RMISecurityManager.java 1.31 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.rmi;
9
10 import java.security.*;
11
12 /**
13  * A subclass of {@link SecurityManager} used by RMI applications that use
14  * downloaded code. RMI's class loader will not download any classes from
15  * remote locations if no security manager has been set.
16  * <code>RMISecurityManager</code> does not apply to applets, which run
17  * under the protection of their browser's security manager.
18  *
19  * <code>RMISecurityManager</code> implements a policy that
20  * is no different than the policy implemented by {@link SecurityManager}.
21  * Therefore an RMI application should use the <code>SecurityManager</code>
22  * class or another application-specific <code>SecurityManager</code>
23  * implementation instead of this class.
24  *
25  * <p>To use a <code>SecurityManager</code> in your application, add
26  * the following statement to your code (it needs to be executed before RMI
27  * can download code from remote hosts, so it most likely needs to appear
28  * in the <code>main</code> method of your application):
29  *
30  * <pre>
31  * System.setSecurityManager(new SecurityManager());
32  * </pre>
33  *
34  * @version 1.31, 12/19/03
35  * @author Roger Riggs
36  * @author Peter Jones
37  * @since JDK1.1
38  **/

39 public class RMISecurityManager extends SecurityManager JavaDoc {
40
41     /**
42      * Constructs a new <code>RMISecurityManager</code>.
43      * @since JDK1.1
44      */

45     public RMISecurityManager() {
46     }
47 }
48
Popular Tags