Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
InstrumentationAgent |
|
| 1.0;1 |
1 | /** |
|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
|
3 | * contributor license agreements. See the NOTICE file distributed with |
|
4 | * this work for additional information regarding copyright ownership. |
|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
6 | * (the "License"); you may not use this file except in compliance with |
|
7 | * the License. You may obtain a copy of the License at |
|
8 | * |
|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
10 | * |
|
11 | * Unless required by applicable law or agreed to in writing, software |
|
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 | * See the License for the specific language governing permissions and |
|
15 | * limitations under the License. |
|
16 | */ |
|
17 | package org.apache.camel; |
|
18 | ||
19 | import javax.management.JMException; |
|
20 | import javax.management.MBeanServer; |
|
21 | import javax.management.ObjectName; |
|
22 | ||
23 | public interface InstrumentationAgent { |
|
24 | ||
25 | /** |
|
26 | * Registers object with management infrastructure with a specific name. Object must be annotated or |
|
27 | * implement standard MBean interface. |
|
28 | * @param obj |
|
29 | * @param name |
|
30 | * @throws JMException |
|
31 | */ |
|
32 | void register(Object obj, ObjectName name) throws JMException; |
|
33 | ||
34 | /** |
|
35 | * Registers object with management infrastructure with a specific name. Object must be annotated or |
|
36 | * implement standard MBean interface. |
|
37 | * @param obj |
|
38 | * @param name |
|
39 | * @param forceRegistration if set to true, then component will be registered despite existing component. |
|
40 | * @throws JMException |
|
41 | */ |
|
42 | void register(Object obj, ObjectName name, boolean forceRegistration) throws JMException; |
|
43 | ||
44 | /** |
|
45 | * Unregisters component based upon registered name |
|
46 | * @param name |
|
47 | * @throws JMException |
|
48 | */ |
|
49 | void unregister(ObjectName name) throws JMException; |
|
50 | ||
51 | /** |
|
52 | * Get the MBeanServer which hosts managed components |
|
53 | * NOTE: if the configuration is not set the JMXEnabled to be true, this method |
|
54 | * will return null |
|
55 | * @return the MBeanServer |
|
56 | */ |
|
57 | MBeanServer getMBeanServer(); |
|
58 | ||
59 | } |