forked from wupeixuan/JDKSourceCode1.8
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRMISecurityManager.java
More file actions
67 lines (63 loc) · 1.6 KB
/
RMISecurityManager.java
File metadata and controls
67 lines (63 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.rmi;
import java.security.*;
/**
* {@code RMISecurityManager} implements a policy identical to the policy
* implemented by {@link SecurityManager}. RMI applications
* should use the {@code SecurityManager} class or another appropriate
* {@code SecurityManager} implementation instead of this class. RMI's class
* loader will download classes from remote locations only if a security
* manager has been set.
*
* @implNote
* <p>Applets typically run in a container that already has a security
* manager, so there is generally no need for applets to set a security
* manager. If you have a standalone application, you might need to set a
* {@code SecurityManager} in order to enable class downloading. This can be
* done by adding the following to your code. (It needs to be executed before
* RMI can download code from remote hosts, so it most likely needs to appear
* in the {@code main} method of your application.)
*
* <pre>{@code
* if (System.getSecurityManager() == null) {
* System.setSecurityManager(new SecurityManager());
* }
* }</pre>
*
* @author Roger Riggs
* @author Peter Jones
* @since JDK1.1
* @deprecated Use {@link SecurityManager} instead.
*/
@Deprecated
public class RMISecurityManager extends SecurityManager {
/**
* Constructs a new {@code RMISecurityManager}.
* @since JDK1.1
*/
public RMISecurityManager() {
}
}