/**
* Creates a DefaultMBeanServerInterceptor with the specified
* repository instance.
* <p>Do not forget to call <code>initialize(outer,delegate)</code>
* before using this object.
* @param outer A pointer to the MBeanServer object that must be
* passed to the MBeans when invoking their
* {@link javax.management.MBeanRegistration} interface.
* @param delegate A pointer to the MBeanServerDelegate associated
* with the new MBeanServer. The new MBeanServer must register
* this MBean in its MBean repository.
* @param instantiator The MBeanInstantiator that will be used to
* instantiate MBeans and take care of class loading issues.
* @param repository The repository to use for this MBeanServer.
*/
public DefaultMBeanServerInterceptor(MBeanServer outer,
MBeanServerDelegate delegate,
MBeanInstantiator instantiator,
Repository repository) {
if (outer == null) throw new
IllegalArgumentException("outer MBeanServer cannot be null");
if (delegate == null) throw new
IllegalArgumentException("MBeanServerDelegate cannot be null");
if (instantiator == null) throw new
IllegalArgumentException("MBeanInstantiator cannot be null");
if (repository == null) throw new
IllegalArgumentException("Repository cannot be null");
this.server = outer;
this.delegate = delegate;
this.instantiator = instantiator;
this.repository = repository;
this.domain = repository.getDefaultDomain();
}
java类javax.management.MBeanServerDelegate的实例源码
DefaultMBeanServerInterceptor.java 文件源码
项目:OpenJSharp
阅读 26
收藏 0
点赞 0
评论 0
DefaultMBeanServerInterceptor.java 文件源码
项目:OpenJSharp
阅读 20
收藏 0
点赞 0
评论 0
/**
* Sends an MBeanServerNotifications with the specified type for the
* MBean with the specified ObjectName
*/
private void sendNotification(String NotifType, ObjectName name) {
// ------------------------------
// ------------------------------
// ---------------------
// Create notification
// ---------------------
MBeanServerNotification notif = new MBeanServerNotification(
NotifType,MBeanServerDelegate.DELEGATE_NAME,0,name);
if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) {
MBEANSERVER_LOGGER.logp(Level.FINER,
DefaultMBeanServerInterceptor.class.getName(),
"sendNotification", NotifType + " " + name);
}
delegate.sendNotification(notif);
}
ArrayNotificationBuffer.java 文件源码
项目:OpenJSharp
阅读 23
收藏 0
点赞 0
评论 0
private void destroyListeners() {
checkNoLocks();
logger.debug("destroyListeners", "starts");
try {
removeNotificationListener(MBeanServerDelegate.DELEGATE_NAME,
creationListener);
} catch (Exception e) {
logger.warning("remove listener from MBeanServer delegate", e);
}
Set<ObjectName> names = queryNames(null, broadcasterQuery);
for (final ObjectName name : names) {
if (logger.debugOn())
logger.debug("destroyListeners",
"remove listener from " + name);
removeBufferListener(name);
}
logger.debug("destroyListeners", "ends");
}
RMIConnector.java 文件源码
项目:OpenJSharp
阅读 25
收藏 0
点赞 0
评论 0
protected void removeListenerForMBeanRemovedNotif(Integer id)
throws IOException, InstanceNotFoundException,
ListenerNotFoundException {
try {
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
} catch (IOException ioe) {
communicatorAdmin.gotIOException(ioe);
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
}
}
DefaultMBeanServerInterceptor.java 文件源码
项目:jdk8u-jdk
阅读 18
收藏 0
点赞 0
评论 0
/**
* Creates a DefaultMBeanServerInterceptor with the specified
* repository instance.
* <p>Do not forget to call <code>initialize(outer,delegate)</code>
* before using this object.
* @param outer A pointer to the MBeanServer object that must be
* passed to the MBeans when invoking their
* {@link javax.management.MBeanRegistration} interface.
* @param delegate A pointer to the MBeanServerDelegate associated
* with the new MBeanServer. The new MBeanServer must register
* this MBean in its MBean repository.
* @param instantiator The MBeanInstantiator that will be used to
* instantiate MBeans and take care of class loading issues.
* @param repository The repository to use for this MBeanServer.
*/
public DefaultMBeanServerInterceptor(MBeanServer outer,
MBeanServerDelegate delegate,
MBeanInstantiator instantiator,
Repository repository) {
if (outer == null) throw new
IllegalArgumentException("outer MBeanServer cannot be null");
if (delegate == null) throw new
IllegalArgumentException("MBeanServerDelegate cannot be null");
if (instantiator == null) throw new
IllegalArgumentException("MBeanInstantiator cannot be null");
if (repository == null) throw new
IllegalArgumentException("Repository cannot be null");
this.server = outer;
this.delegate = delegate;
this.instantiator = instantiator;
this.repository = repository;
this.domain = repository.getDefaultDomain();
}
DefaultMBeanServerInterceptor.java 文件源码
项目:jdk8u-jdk
阅读 25
收藏 0
点赞 0
评论 0
/**
* Sends an MBeanServerNotifications with the specified type for the
* MBean with the specified ObjectName
*/
private void sendNotification(String NotifType, ObjectName name) {
// ------------------------------
// ------------------------------
// ---------------------
// Create notification
// ---------------------
MBeanServerNotification notif = new MBeanServerNotification(
NotifType,MBeanServerDelegate.DELEGATE_NAME,0,name);
if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) {
MBEANSERVER_LOGGER.logp(Level.FINER,
DefaultMBeanServerInterceptor.class.getName(),
"sendNotification", NotifType + " " + name);
}
delegate.sendNotification(notif);
}
ArrayNotificationBuffer.java 文件源码
项目:jdk8u-jdk
阅读 22
收藏 0
点赞 0
评论 0
private void destroyListeners() {
checkNoLocks();
logger.debug("destroyListeners", "starts");
try {
removeNotificationListener(MBeanServerDelegate.DELEGATE_NAME,
creationListener);
} catch (Exception e) {
logger.warning("remove listener from MBeanServer delegate", e);
}
Set<ObjectName> names = queryNames(null, broadcasterQuery);
for (final ObjectName name : names) {
if (logger.debugOn())
logger.debug("destroyListeners",
"remove listener from " + name);
removeBufferListener(name);
}
logger.debug("destroyListeners", "ends");
}
RMIConnector.java 文件源码
项目:jdk8u-jdk
阅读 21
收藏 0
点赞 0
评论 0
protected void removeListenerForMBeanRemovedNotif(Integer id)
throws IOException, InstanceNotFoundException,
ListenerNotFoundException {
try {
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
} catch (IOException ioe) {
communicatorAdmin.gotIOException(ioe);
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
}
}
DelegateNameWildcardNameTest.java 文件源码
项目:jdk8u-jdk
阅读 15
收藏 0
点赞 0
评论 0
public static void main(String[] args) throws Exception {
System.out.println(
"Test that <MBeanServerDelegate.DELEGATE_NAME> equals " +
"<new ObjectName(\"JMImplementation:type=MBeanServerDelegate\")>");
final ObjectName delegateName =
new ObjectName("JMImplementation:type=MBeanServerDelegate");
if (!delegateName.equals(MBeanServerDelegate.DELEGATE_NAME))
throw new AssertionError("Unexpected value: " +
"MBeanServerDelegate.DELEGATE_NAME = " +
MBeanServerDelegate.DELEGATE_NAME);
System.out.println("MBeanServerDelegate.DELEGATE_NAME = " +
"new ObjectName(\"" + delegateName + "\")");
System.out.println("Test that <ObjectName.WILDCARD> " +
"equals <new ObjectName(\"*:*\")>");
final ObjectName wildcardName = new ObjectName("*:*");
if (!wildcardName.equals(ObjectName.WILDCARD))
throw new AssertionError("Unexpected value: " +
"ObjectName.WILDCARD = " +
ObjectName.WILDCARD);
System.out.println("ObjectName.WILDCARD = " +
"new ObjectName(\"" + wildcardName + "\")");
System.out.println("Test passes: constants were initialized properly");
}
RMIConnector.java 文件源码
项目:openjdk-jdk10
阅读 20
收藏 0
点赞 0
评论 0
protected void removeListenerForMBeanRemovedNotif(Integer id)
throws IOException, InstanceNotFoundException,
ListenerNotFoundException {
try {
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
} catch (IOException ioe) {
communicatorAdmin.gotIOException(ioe);
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
}
}
DefaultMBeanServerInterceptor.java 文件源码
项目:openjdk-jdk10
阅读 18
收藏 0
点赞 0
评论 0
/**
* Creates a DefaultMBeanServerInterceptor with the specified
* repository instance.
* <p>Do not forget to call <code>initialize(outer,delegate)</code>
* before using this object.
* @param outer A pointer to the MBeanServer object that must be
* passed to the MBeans when invoking their
* {@link javax.management.MBeanRegistration} interface.
* @param delegate A pointer to the MBeanServerDelegate associated
* with the new MBeanServer. The new MBeanServer must register
* this MBean in its MBean repository.
* @param instantiator The MBeanInstantiator that will be used to
* instantiate MBeans and take care of class loading issues.
* @param repository The repository to use for this MBeanServer.
*/
public DefaultMBeanServerInterceptor(MBeanServer outer,
MBeanServerDelegate delegate,
MBeanInstantiator instantiator,
Repository repository) {
if (outer == null) throw new
IllegalArgumentException("outer MBeanServer cannot be null");
if (delegate == null) throw new
IllegalArgumentException("MBeanServerDelegate cannot be null");
if (instantiator == null) throw new
IllegalArgumentException("MBeanInstantiator cannot be null");
if (repository == null) throw new
IllegalArgumentException("Repository cannot be null");
this.server = outer;
this.delegate = delegate;
this.instantiator = instantiator;
this.repository = repository;
this.domain = repository.getDefaultDomain();
}
DefaultMBeanServerInterceptor.java 文件源码
项目:openjdk-jdk10
阅读 26
收藏 0
点赞 0
评论 0
/**
* Sends an MBeanServerNotifications with the specified type for the
* MBean with the specified ObjectName
*/
private void sendNotification(String NotifType, ObjectName name) {
// ------------------------------
// ------------------------------
// ---------------------
// Create notification
// ---------------------
MBeanServerNotification notif = new MBeanServerNotification(
NotifType,MBeanServerDelegate.DELEGATE_NAME,0,name);
if (MBEANSERVER_LOGGER.isLoggable(Level.TRACE)) {
MBEANSERVER_LOGGER.log(Level.TRACE, NotifType + " " + name);
}
delegate.sendNotification(notif);
}
ArrayNotificationBuffer.java 文件源码
项目:openjdk-jdk10
阅读 25
收藏 0
点赞 0
评论 0
private void destroyListeners() {
checkNoLocks();
logger.debug("destroyListeners", "starts");
try {
removeNotificationListener(MBeanServerDelegate.DELEGATE_NAME,
creationListener);
} catch (Exception e) {
logger.warning("remove listener from MBeanServer delegate", e);
}
Set<ObjectName> names = queryNames(null, broadcasterQuery);
for (final ObjectName name : names) {
if (logger.debugOn())
logger.debug("destroyListeners",
"remove listener from " + name);
removeBufferListener(name);
}
logger.debug("destroyListeners", "ends");
}
DelegateNameWildcardNameTest.java 文件源码
项目:openjdk-jdk10
阅读 15
收藏 0
点赞 0
评论 0
public static void main(String[] args) throws Exception {
System.out.println(
"Test that <MBeanServerDelegate.DELEGATE_NAME> equals " +
"<new ObjectName(\"JMImplementation:type=MBeanServerDelegate\")>");
final ObjectName delegateName =
new ObjectName("JMImplementation:type=MBeanServerDelegate");
if (!delegateName.equals(MBeanServerDelegate.DELEGATE_NAME))
throw new AssertionError("Unexpected value: " +
"MBeanServerDelegate.DELEGATE_NAME = " +
MBeanServerDelegate.DELEGATE_NAME);
System.out.println("MBeanServerDelegate.DELEGATE_NAME = " +
"new ObjectName(\"" + delegateName + "\")");
System.out.println("Test that <ObjectName.WILDCARD> " +
"equals <new ObjectName(\"*:*\")>");
final ObjectName wildcardName = new ObjectName("*:*");
if (!wildcardName.equals(ObjectName.WILDCARD))
throw new AssertionError("Unexpected value: " +
"ObjectName.WILDCARD = " +
ObjectName.WILDCARD);
System.out.println("ObjectName.WILDCARD = " +
"new ObjectName(\"" + wildcardName + "\")");
System.out.println("Test passes: constants were initialized properly");
}
DefaultMBeanServerInterceptor.java 文件源码
项目:openjdk9
阅读 47
收藏 0
点赞 0
评论 0
/**
* Creates a DefaultMBeanServerInterceptor with the specified
* repository instance.
* <p>Do not forget to call <code>initialize(outer,delegate)</code>
* before using this object.
* @param outer A pointer to the MBeanServer object that must be
* passed to the MBeans when invoking their
* {@link javax.management.MBeanRegistration} interface.
* @param delegate A pointer to the MBeanServerDelegate associated
* with the new MBeanServer. The new MBeanServer must register
* this MBean in its MBean repository.
* @param instantiator The MBeanInstantiator that will be used to
* instantiate MBeans and take care of class loading issues.
* @param repository The repository to use for this MBeanServer.
*/
public DefaultMBeanServerInterceptor(MBeanServer outer,
MBeanServerDelegate delegate,
MBeanInstantiator instantiator,
Repository repository) {
if (outer == null) throw new
IllegalArgumentException("outer MBeanServer cannot be null");
if (delegate == null) throw new
IllegalArgumentException("MBeanServerDelegate cannot be null");
if (instantiator == null) throw new
IllegalArgumentException("MBeanInstantiator cannot be null");
if (repository == null) throw new
IllegalArgumentException("Repository cannot be null");
this.server = outer;
this.delegate = delegate;
this.instantiator = instantiator;
this.repository = repository;
this.domain = repository.getDefaultDomain();
}
DefaultMBeanServerInterceptor.java 文件源码
项目:openjdk9
阅读 22
收藏 0
点赞 0
评论 0
/**
* Sends an MBeanServerNotifications with the specified type for the
* MBean with the specified ObjectName
*/
private void sendNotification(String NotifType, ObjectName name) {
// ------------------------------
// ------------------------------
// ---------------------
// Create notification
// ---------------------
MBeanServerNotification notif = new MBeanServerNotification(
NotifType,MBeanServerDelegate.DELEGATE_NAME,0,name);
if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) {
MBEANSERVER_LOGGER.logp(Level.FINER,
DefaultMBeanServerInterceptor.class.getName(),
"sendNotification", NotifType + " " + name);
}
delegate.sendNotification(notif);
}
ArrayNotificationBuffer.java 文件源码
项目:openjdk9
阅读 26
收藏 0
点赞 0
评论 0
private void destroyListeners() {
checkNoLocks();
logger.debug("destroyListeners", "starts");
try {
removeNotificationListener(MBeanServerDelegate.DELEGATE_NAME,
creationListener);
} catch (Exception e) {
logger.warning("remove listener from MBeanServer delegate", e);
}
Set<ObjectName> names = queryNames(null, broadcasterQuery);
for (final ObjectName name : names) {
if (logger.debugOn())
logger.debug("destroyListeners",
"remove listener from " + name);
removeBufferListener(name);
}
logger.debug("destroyListeners", "ends");
}
RMIConnector.java 文件源码
项目:openjdk9
阅读 24
收藏 0
点赞 0
评论 0
protected void removeListenerForMBeanRemovedNotif(Integer id)
throws IOException, InstanceNotFoundException,
ListenerNotFoundException {
try {
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
} catch (IOException ioe) {
communicatorAdmin.gotIOException(ioe);
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
}
}
DelegateNameWildcardNameTest.java 文件源码
项目:openjdk9
阅读 17
收藏 0
点赞 0
评论 0
public static void main(String[] args) throws Exception {
System.out.println(
"Test that <MBeanServerDelegate.DELEGATE_NAME> equals " +
"<new ObjectName(\"JMImplementation:type=MBeanServerDelegate\")>");
final ObjectName delegateName =
new ObjectName("JMImplementation:type=MBeanServerDelegate");
if (!delegateName.equals(MBeanServerDelegate.DELEGATE_NAME))
throw new AssertionError("Unexpected value: " +
"MBeanServerDelegate.DELEGATE_NAME = " +
MBeanServerDelegate.DELEGATE_NAME);
System.out.println("MBeanServerDelegate.DELEGATE_NAME = " +
"new ObjectName(\"" + delegateName + "\")");
System.out.println("Test that <ObjectName.WILDCARD> " +
"equals <new ObjectName(\"*:*\")>");
final ObjectName wildcardName = new ObjectName("*:*");
if (!wildcardName.equals(ObjectName.WILDCARD))
throw new AssertionError("Unexpected value: " +
"ObjectName.WILDCARD = " +
ObjectName.WILDCARD);
System.out.println("ObjectName.WILDCARD = " +
"new ObjectName(\"" + wildcardName + "\")");
System.out.println("Test passes: constants were initialized properly");
}
RMIConnector.java 文件源码
项目:Java8CN
阅读 19
收藏 0
点赞 0
评论 0
protected void removeListenerForMBeanRemovedNotif(Integer id)
throws IOException, InstanceNotFoundException,
ListenerNotFoundException {
try {
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
} catch (IOException ioe) {
communicatorAdmin.gotIOException(ioe);
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
}
}
DefaultMBeanServerInterceptor.java 文件源码
项目:jdk8u_jdk
阅读 24
收藏 0
点赞 0
评论 0
/**
* Creates a DefaultMBeanServerInterceptor with the specified
* repository instance.
* <p>Do not forget to call <code>initialize(outer,delegate)</code>
* before using this object.
* @param outer A pointer to the MBeanServer object that must be
* passed to the MBeans when invoking their
* {@link javax.management.MBeanRegistration} interface.
* @param delegate A pointer to the MBeanServerDelegate associated
* with the new MBeanServer. The new MBeanServer must register
* this MBean in its MBean repository.
* @param instantiator The MBeanInstantiator that will be used to
* instantiate MBeans and take care of class loading issues.
* @param repository The repository to use for this MBeanServer.
*/
public DefaultMBeanServerInterceptor(MBeanServer outer,
MBeanServerDelegate delegate,
MBeanInstantiator instantiator,
Repository repository) {
if (outer == null) throw new
IllegalArgumentException("outer MBeanServer cannot be null");
if (delegate == null) throw new
IllegalArgumentException("MBeanServerDelegate cannot be null");
if (instantiator == null) throw new
IllegalArgumentException("MBeanInstantiator cannot be null");
if (repository == null) throw new
IllegalArgumentException("Repository cannot be null");
this.server = outer;
this.delegate = delegate;
this.instantiator = instantiator;
this.repository = repository;
this.domain = repository.getDefaultDomain();
}
DefaultMBeanServerInterceptor.java 文件源码
项目:jdk8u_jdk
阅读 19
收藏 0
点赞 0
评论 0
/**
* Sends an MBeanServerNotifications with the specified type for the
* MBean with the specified ObjectName
*/
private void sendNotification(String NotifType, ObjectName name) {
// ------------------------------
// ------------------------------
// ---------------------
// Create notification
// ---------------------
MBeanServerNotification notif = new MBeanServerNotification(
NotifType,MBeanServerDelegate.DELEGATE_NAME,0,name);
if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) {
MBEANSERVER_LOGGER.logp(Level.FINER,
DefaultMBeanServerInterceptor.class.getName(),
"sendNotification", NotifType + " " + name);
}
delegate.sendNotification(notif);
}
ArrayNotificationBuffer.java 文件源码
项目:jdk8u_jdk
阅读 26
收藏 0
点赞 0
评论 0
private void destroyListeners() {
checkNoLocks();
logger.debug("destroyListeners", "starts");
try {
removeNotificationListener(MBeanServerDelegate.DELEGATE_NAME,
creationListener);
} catch (Exception e) {
logger.warning("remove listener from MBeanServer delegate", e);
}
Set<ObjectName> names = queryNames(null, broadcasterQuery);
for (final ObjectName name : names) {
if (logger.debugOn())
logger.debug("destroyListeners",
"remove listener from " + name);
removeBufferListener(name);
}
logger.debug("destroyListeners", "ends");
}
RMIConnector.java 文件源码
项目:jdk8u_jdk
阅读 32
收藏 0
点赞 0
评论 0
protected void removeListenerForMBeanRemovedNotif(Integer id)
throws IOException, InstanceNotFoundException,
ListenerNotFoundException {
try {
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
} catch (IOException ioe) {
communicatorAdmin.gotIOException(ioe);
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
}
}
DelegateNameWildcardNameTest.java 文件源码
项目:jdk8u_jdk
阅读 15
收藏 0
点赞 0
评论 0
public static void main(String[] args) throws Exception {
System.out.println(
"Test that <MBeanServerDelegate.DELEGATE_NAME> equals " +
"<new ObjectName(\"JMImplementation:type=MBeanServerDelegate\")>");
final ObjectName delegateName =
new ObjectName("JMImplementation:type=MBeanServerDelegate");
if (!delegateName.equals(MBeanServerDelegate.DELEGATE_NAME))
throw new AssertionError("Unexpected value: " +
"MBeanServerDelegate.DELEGATE_NAME = " +
MBeanServerDelegate.DELEGATE_NAME);
System.out.println("MBeanServerDelegate.DELEGATE_NAME = " +
"new ObjectName(\"" + delegateName + "\")");
System.out.println("Test that <ObjectName.WILDCARD> " +
"equals <new ObjectName(\"*:*\")>");
final ObjectName wildcardName = new ObjectName("*:*");
if (!wildcardName.equals(ObjectName.WILDCARD))
throw new AssertionError("Unexpected value: " +
"ObjectName.WILDCARD = " +
ObjectName.WILDCARD);
System.out.println("ObjectName.WILDCARD = " +
"new ObjectName(\"" + wildcardName + "\")");
System.out.println("Test passes: constants were initialized properly");
}
DefaultMBeanServerInterceptor.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 21
收藏 0
点赞 0
评论 0
/**
* Creates a DefaultMBeanServerInterceptor with the specified
* repository instance.
* <p>Do not forget to call <code>initialize(outer,delegate)</code>
* before using this object.
* @param outer A pointer to the MBeanServer object that must be
* passed to the MBeans when invoking their
* {@link javax.management.MBeanRegistration} interface.
* @param delegate A pointer to the MBeanServerDelegate associated
* with the new MBeanServer. The new MBeanServer must register
* this MBean in its MBean repository.
* @param instantiator The MBeanInstantiator that will be used to
* instantiate MBeans and take care of class loading issues.
* @param repository The repository to use for this MBeanServer.
*/
public DefaultMBeanServerInterceptor(MBeanServer outer,
MBeanServerDelegate delegate,
MBeanInstantiator instantiator,
Repository repository) {
if (outer == null) throw new
IllegalArgumentException("outer MBeanServer cannot be null");
if (delegate == null) throw new
IllegalArgumentException("MBeanServerDelegate cannot be null");
if (instantiator == null) throw new
IllegalArgumentException("MBeanInstantiator cannot be null");
if (repository == null) throw new
IllegalArgumentException("Repository cannot be null");
this.server = outer;
this.delegate = delegate;
this.instantiator = instantiator;
this.repository = repository;
this.domain = repository.getDefaultDomain();
}
DefaultMBeanServerInterceptor.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 30
收藏 0
点赞 0
评论 0
/**
* Sends an MBeanServerNotifications with the specified type for the
* MBean with the specified ObjectName
*/
private void sendNotification(String NotifType, ObjectName name) {
// ------------------------------
// ------------------------------
// ---------------------
// Create notification
// ---------------------
MBeanServerNotification notif = new MBeanServerNotification(
NotifType,MBeanServerDelegate.DELEGATE_NAME,0,name);
if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) {
MBEANSERVER_LOGGER.logp(Level.FINER,
DefaultMBeanServerInterceptor.class.getName(),
"sendNotification", NotifType + " " + name);
}
delegate.sendNotification(notif);
}
ArrayNotificationBuffer.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 27
收藏 0
点赞 0
评论 0
private void destroyListeners() {
checkNoLocks();
logger.debug("destroyListeners", "starts");
try {
removeNotificationListener(MBeanServerDelegate.DELEGATE_NAME,
creationListener);
} catch (Exception e) {
logger.warning("remove listener from MBeanServer delegate", e);
}
Set<ObjectName> names = queryNames(null, broadcasterQuery);
for (final ObjectName name : names) {
if (logger.debugOn())
logger.debug("destroyListeners",
"remove listener from " + name);
removeBufferListener(name);
}
logger.debug("destroyListeners", "ends");
}
RMIConnector.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 26
收藏 0
点赞 0
评论 0
protected void removeListenerForMBeanRemovedNotif(Integer id)
throws IOException, InstanceNotFoundException,
ListenerNotFoundException {
try {
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
} catch (IOException ioe) {
communicatorAdmin.gotIOException(ioe);
connection.removeNotificationListeners(
MBeanServerDelegate.DELEGATE_NAME,
new Integer[] {id},
null);
}
}
DelegateNameWildcardNameTest.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 17
收藏 0
点赞 0
评论 0
public static void main(String[] args) throws Exception {
System.out.println(
"Test that <MBeanServerDelegate.DELEGATE_NAME> equals " +
"<new ObjectName(\"JMImplementation:type=MBeanServerDelegate\")>");
final ObjectName delegateName =
new ObjectName("JMImplementation:type=MBeanServerDelegate");
if (!delegateName.equals(MBeanServerDelegate.DELEGATE_NAME))
throw new AssertionError("Unexpected value: " +
"MBeanServerDelegate.DELEGATE_NAME = " +
MBeanServerDelegate.DELEGATE_NAME);
System.out.println("MBeanServerDelegate.DELEGATE_NAME = " +
"new ObjectName(\"" + delegateName + "\")");
System.out.println("Test that <ObjectName.WILDCARD> " +
"equals <new ObjectName(\"*:*\")>");
final ObjectName wildcardName = new ObjectName("*:*");
if (!wildcardName.equals(ObjectName.WILDCARD))
throw new AssertionError("Unexpected value: " +
"ObjectName.WILDCARD = " +
ObjectName.WILDCARD);
System.out.println("ObjectName.WILDCARD = " +
"new ObjectName(\"" + wildcardName + "\")");
System.out.println("Test passes: constants were initialized properly");
}