equal
deleted
inserted
replaced
27 |
27 |
28 import com.sun.jmx.event.DaemonThreadFactory; |
28 import com.sun.jmx.event.DaemonThreadFactory; |
29 import com.sun.jmx.event.LeaseRenewer; |
29 import com.sun.jmx.event.LeaseRenewer; |
30 import com.sun.jmx.event.ReceiverBuffer; |
30 import com.sun.jmx.event.ReceiverBuffer; |
31 import com.sun.jmx.event.RepeatedSingletonJob; |
31 import com.sun.jmx.event.RepeatedSingletonJob; |
|
32 import com.sun.jmx.namespace.JMXNamespaceUtils; |
32 import com.sun.jmx.mbeanserver.PerThreadGroupPool; |
33 import com.sun.jmx.mbeanserver.PerThreadGroupPool; |
33 import com.sun.jmx.remote.util.ClassLogger; |
34 import com.sun.jmx.remote.util.ClassLogger; |
34 |
35 |
35 import java.io.IOException; |
36 import java.io.IOException; |
36 import java.lang.reflect.Method; |
37 import java.lang.reflect.Method; |
1061 */ |
1062 */ |
1062 public String getClientId() { |
1063 public String getClientId() { |
1063 return clientId; |
1064 return clientId; |
1064 } |
1065 } |
1065 |
1066 |
|
1067 /** |
|
1068 * Returns a JMX Connector that will use an {@link EventClient} |
|
1069 * to subscribe for notifications. If the server doesn't have |
|
1070 * an {@link EventClientDelegateMBean}, then the connector will |
|
1071 * use the legacy notification mechanism instead. |
|
1072 * |
|
1073 * @param wrapped The underlying JMX Connector wrapped by the returned |
|
1074 * connector. |
|
1075 * |
|
1076 * @return A JMX Connector that will uses an {@link EventClient}, if |
|
1077 * available. |
|
1078 * |
|
1079 * @see EventClient#getEventClientConnection(MBeanServerConnection) |
|
1080 */ |
|
1081 public static JMXConnector withEventClient(final JMXConnector wrapped) { |
|
1082 return JMXNamespaceUtils.withEventClient(wrapped); |
|
1083 } |
|
1084 |
1066 private static final PerThreadGroupPool<ScheduledThreadPoolExecutor> |
1085 private static final PerThreadGroupPool<ScheduledThreadPoolExecutor> |
1067 leaseRenewerThreadPool = PerThreadGroupPool.make(); |
1086 leaseRenewerThreadPool = PerThreadGroupPool.make(); |
1068 } |
1087 } |