|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2012 the original author or authors. |
| 2 | + * Copyright 2002-2025 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
33 | 33 | public interface JmxAttributeSource {
|
34 | 34 |
|
35 | 35 | /**
|
36 |
| - * Implementations should return an instance of {@code ManagedResource} |
37 |
| - * if the supplied {@code Class} has the appropriate metadata. |
38 |
| - * Otherwise, should return {@code null}. |
39 |
| - * @param clazz the class to read the attribute data from |
40 |
| - * @return the attribute, or {@code null} if not found |
41 |
| - * @throws InvalidMetadataException in case of invalid attributes |
| 36 | + * Implementations should return an instance of {@link ManagedResource} |
| 37 | + * if the supplied {@code Class} has the corresponding metadata. |
| 38 | + * @param clazz the class to read the resource data from |
| 39 | + * @return the resource, or {@code null} if not found |
| 40 | + * @throws InvalidMetadataException in case of invalid metadata |
42 | 41 | */
|
43 | 42 | @Nullable ManagedResource getManagedResource(Class<?> clazz) throws InvalidMetadataException;
|
44 | 43 |
|
45 | 44 | /**
|
46 |
| - * Implementations should return an instance of {@code ManagedAttribute} |
| 45 | + * Implementations should return an instance of {@link ManagedAttribute} |
47 | 46 | * if the supplied {@code Method} has the corresponding metadata.
|
48 |
| - * Otherwise, should return {@code null}. |
49 | 47 | * @param method the method to read the attribute data from
|
50 | 48 | * @return the attribute, or {@code null} if not found
|
51 |
| - * @throws InvalidMetadataException in case of invalid attributes |
| 49 | + * @throws InvalidMetadataException in case of invalid metadata |
52 | 50 | */
|
53 | 51 | @Nullable ManagedAttribute getManagedAttribute(Method method) throws InvalidMetadataException;
|
54 | 52 |
|
55 | 53 | /**
|
56 |
| - * Implementations should return an instance of {@code ManagedMetric} |
| 54 | + * Implementations should return an instance of {@link ManagedMetric} |
57 | 55 | * if the supplied {@code Method} has the corresponding metadata.
|
58 |
| - * Otherwise, should return {@code null}. |
59 |
| - * @param method the method to read the attribute data from |
| 56 | + * @param method the method to read the metric data from |
60 | 57 | * @return the metric, or {@code null} if not found
|
61 |
| - * @throws InvalidMetadataException in case of invalid attributes |
| 58 | + * @throws InvalidMetadataException in case of invalid metadata |
62 | 59 | */
|
63 | 60 | @Nullable ManagedMetric getManagedMetric(Method method) throws InvalidMetadataException;
|
64 | 61 |
|
65 | 62 | /**
|
66 |
| - * Implementations should return an instance of {@code ManagedOperation} |
| 63 | + * Implementations should return an instance of {@link ManagedOperation} |
67 | 64 | * if the supplied {@code Method} has the corresponding metadata.
|
68 |
| - * Otherwise, should return {@code null}. |
69 |
| - * @param method the method to read the attribute data from |
70 |
| - * @return the attribute, or {@code null} if not found |
71 |
| - * @throws InvalidMetadataException in case of invalid attributes |
| 65 | + * @param method the method to read the operation data from |
| 66 | + * @return the operation, or {@code null} if not found |
| 67 | + * @throws InvalidMetadataException in case of invalid metadata |
72 | 68 | */
|
73 | 69 | @Nullable ManagedOperation getManagedOperation(Method method) throws InvalidMetadataException;
|
74 | 70 |
|
75 | 71 | /**
|
76 |
| - * Implementations should return an array of {@code ManagedOperationParameter} |
77 |
| - * if the supplied {@code Method} has the corresponding metadata. Otherwise, |
78 |
| - * should return an empty array if no metadata is found. |
| 72 | + * Implementations should return an array of {@link ManagedOperationParameter |
| 73 | + * ManagedOperationParameters} if the supplied {@code Method} has the corresponding |
| 74 | + * metadata. |
79 | 75 | * @param method the {@code Method} to read the metadata from
|
80 |
| - * @return the parameter information. |
81 |
| - * @throws InvalidMetadataException in the case of invalid attributes. |
| 76 | + * @return the parameter information, or an empty array if no metadata is found |
| 77 | + * @throws InvalidMetadataException in case of invalid metadata |
82 | 78 | */
|
83 | 79 | @Nullable ManagedOperationParameter[] getManagedOperationParameters(Method method) throws InvalidMetadataException;
|
84 | 80 |
|
85 | 81 | /**
|
86 | 82 | * Implementations should return an array of {@link ManagedNotification ManagedNotifications}
|
87 |
| - * if the supplied {@code Class} has the corresponding metadata. Otherwise, |
88 |
| - * should return an empty array. |
| 83 | + * if the supplied {@code Class} has the corresponding metadata. |
89 | 84 | * @param clazz the {@code Class} to read the metadata from
|
90 |
| - * @return the notification information |
91 |
| - * @throws InvalidMetadataException in the case of invalid metadata |
| 85 | + * @return the notification information, or an empty array if no metadata is found |
| 86 | + * @throws InvalidMetadataException in case of invalid metadata |
92 | 87 | */
|
93 | 88 | @Nullable ManagedNotification[] getManagedNotifications(Class<?> clazz) throws InvalidMetadataException;
|
94 | 89 |
|
95 |
| - |
96 |
| - |
97 | 90 | }
|
0 commit comments