author | weijun |
Thu, 11 Dec 2014 15:23:02 +0800 | |
changeset 27957 | 24b4e6082f19 |
parent 25859 | 3317bb8137f4 |
child 29099 | 766801b4d95d |
permissions | -rw-r--r-- |
2 | 1 |
/* |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
17197
diff
changeset
|
2 |
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package sun.management; |
|
27 |
||
28 |
/** |
|
29 |
* Configuration Error thrown by a management agent. |
|
30 |
*/ |
|
31 |
public class AgentConfigurationError extends Error { |
|
32 |
public static final String AGENT_EXCEPTION = |
|
33 |
"agent.err.exception"; |
|
34 |
public static final String CONFIG_FILE_NOT_FOUND = |
|
35 |
"agent.err.configfile.notfound"; |
|
36 |
public static final String CONFIG_FILE_OPEN_FAILED = |
|
37 |
"agent.err.configfile.failed"; |
|
38 |
public static final String CONFIG_FILE_CLOSE_FAILED = |
|
39 |
"agent.err.configfile.closed.failed"; |
|
40 |
public static final String CONFIG_FILE_ACCESS_DENIED = |
|
41 |
"agent.err.configfile.access.denied"; |
|
42 |
public static final String EXPORT_ADDRESS_FAILED = |
|
43 |
"agent.err.exportaddress.failed"; |
|
44 |
public static final String AGENT_CLASS_NOT_FOUND = |
|
45 |
"agent.err.agentclass.notfound"; |
|
46 |
public static final String AGENT_CLASS_FAILED = |
|
47 |
"agent.err.agentclass.failed"; |
|
48 |
public static final String AGENT_CLASS_PREMAIN_NOT_FOUND = |
|
49 |
"agent.err.premain.notfound"; |
|
50 |
public static final String AGENT_CLASS_ACCESS_DENIED = |
|
51 |
"agent.err.agentclass.access.denied"; |
|
52 |
public static final String AGENT_CLASS_INVALID = |
|
53 |
"agent.err.invalid.agentclass"; |
|
54 |
public static final String INVALID_JMXREMOTE_PORT = |
|
55 |
"agent.err.invalid.jmxremote.port"; |
|
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
5506
diff
changeset
|
56 |
public static final String INVALID_JMXREMOTE_RMI_PORT = |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
5506
diff
changeset
|
57 |
"agent.err.invalid.jmxremote.rmi.port"; |
2 | 58 |
public static final String PASSWORD_FILE_NOT_SET = |
59 |
"agent.err.password.file.notset"; |
|
60 |
public static final String PASSWORD_FILE_NOT_READABLE = |
|
61 |
"agent.err.password.file.not.readable"; |
|
62 |
public static final String PASSWORD_FILE_READ_FAILED = |
|
63 |
"agent.err.password.file.read.failed"; |
|
64 |
public static final String PASSWORD_FILE_NOT_FOUND = |
|
65 |
"agent.err.password.file.notfound"; |
|
66 |
public static final String ACCESS_FILE_NOT_SET = |
|
67 |
"agent.err.access.file.notset"; |
|
68 |
public static final String ACCESS_FILE_NOT_READABLE = |
|
69 |
"agent.err.access.file.not.readable"; |
|
70 |
public static final String ACCESS_FILE_READ_FAILED = |
|
71 |
"agent.err.access.file.read.failed"; |
|
72 |
public static final String ACCESS_FILE_NOT_FOUND = |
|
73 |
"agent.err.access.file.notfound"; |
|
74 |
public static final String PASSWORD_FILE_ACCESS_NOT_RESTRICTED = |
|
75 |
"agent.err.password.file.access.notrestricted"; |
|
76 |
public static final String FILE_ACCESS_NOT_RESTRICTED = |
|
77 |
"agent.err.file.access.not.restricted"; |
|
78 |
public static final String FILE_NOT_FOUND = |
|
79 |
"agent.err.file.not.found"; |
|
80 |
public static final String FILE_NOT_READABLE = |
|
81 |
"agent.err.file.not.readable"; |
|
82 |
public static final String FILE_NOT_SET = |
|
83 |
"agent.err.file.not.set"; |
|
84 |
public static final String FILE_READ_FAILED = |
|
85 |
"agent.err.file.read.failed"; |
|
86 |
public static final String CONNECTOR_SERVER_IO_ERROR = |
|
87 |
"agent.err.connector.server.io.error"; |
|
88 |
public static final String INVALID_OPTION = |
|
89 |
"agent.err.invalid.option"; |
|
90 |
public static final String INVALID_SNMP_PORT = |
|
91 |
"agent.err.invalid.snmp.port"; |
|
92 |
public static final String INVALID_SNMP_TRAP_PORT = |
|
93 |
"agent.err.invalid.snmp.trap.port"; |
|
94 |
public static final String UNKNOWN_SNMP_INTERFACE = |
|
95 |
"agent.err.unknown.snmp.interface"; |
|
96 |
public static final String SNMP_ACL_FILE_NOT_SET = |
|
97 |
"agent.err.acl.file.notset"; |
|
98 |
public static final String SNMP_ACL_FILE_NOT_FOUND = |
|
99 |
"agent.err.acl.file.notfound"; |
|
100 |
public static final String SNMP_ACL_FILE_NOT_READABLE = |
|
101 |
"agent.err.acl.file.not.readable"; |
|
102 |
public static final String SNMP_ACL_FILE_READ_FAILED = |
|
103 |
"agent.err.acl.file.read.failed"; |
|
104 |
public static final String SNMP_ACL_FILE_ACCESS_NOT_RESTRICTED = |
|
105 |
"agent.err.acl.file.access.notrestricted"; |
|
106 |
public static final String SNMP_ADAPTOR_START_FAILED = |
|
107 |
"agent.err.snmp.adaptor.start.failed"; |
|
108 |
public static final String SNMP_MIB_INIT_FAILED = |
|
109 |
"agent.err.snmp.mib.init.failed"; |
|
11991
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
5506
diff
changeset
|
110 |
public static final String INVALID_STATE = |
800d0ff7b043
7110104: It should be possible to stop and start JMX Agent at runtime
dsamersoff
parents:
5506
diff
changeset
|
111 |
"agent.err.invalid.state"; |
2 | 112 |
|
113 |
private final String error; |
|
114 |
private final String[] params; |
|
115 |
||
116 |
public AgentConfigurationError(String error) { |
|
117 |
super(); |
|
118 |
this.error = error; |
|
119 |
this.params = null; |
|
120 |
} |
|
121 |
||
122 |
public AgentConfigurationError(String error, Throwable cause) { |
|
123 |
super(cause); |
|
124 |
this.error = error; |
|
125 |
this.params = null; |
|
126 |
} |
|
127 |
||
128 |
public AgentConfigurationError(String error, String... params) { |
|
129 |
super(); |
|
130 |
this.error = error; |
|
17197
8ee6909f1320
8003671: [findbugs] sun.management.AgentConfigurationError.getParams() may expose internal representation by returning AgentConfigurationError.params
sla
parents:
11991
diff
changeset
|
131 |
this.params = params.clone(); |
2 | 132 |
} |
133 |
||
134 |
public AgentConfigurationError(String error, Throwable cause, String... params) { |
|
135 |
super(cause); |
|
136 |
this.error = error; |
|
17197
8ee6909f1320
8003671: [findbugs] sun.management.AgentConfigurationError.getParams() may expose internal representation by returning AgentConfigurationError.params
sla
parents:
11991
diff
changeset
|
137 |
this.params = params.clone(); |
2 | 138 |
} |
139 |
||
140 |
public String getError() { |
|
141 |
return error; |
|
142 |
} |
|
143 |
||
144 |
public String[] getParams() { |
|
17197
8ee6909f1320
8003671: [findbugs] sun.management.AgentConfigurationError.getParams() may expose internal representation by returning AgentConfigurationError.params
sla
parents:
11991
diff
changeset
|
145 |
return params.clone(); |
2 | 146 |
} |
4173
d01972926813
6895875: Missing serialVersionUID in sun.management classes
mchung
parents:
2
diff
changeset
|
147 |
|
d01972926813
6895875: Missing serialVersionUID in sun.management classes
mchung
parents:
2
diff
changeset
|
148 |
private static final long serialVersionUID = 1211605593516195475L; |
2 | 149 |
} |