org.apache.activemq.broker.jmx.QueueView类的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(59)

本文整理了Java中org.apache.activemq.broker.jmx.QueueView类的一些代码示例,展示了QueueView类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueueView类的具体详情如下:
包路径:org.apache.activemq.broker.jmx.QueueView
类名称:QueueView

QueueView介绍

[英]Provides a JMX Management view of a Queue.
[中]提供队列的JMX管理视图。

代码示例

代码示例来源:origin: apache/activemq

public void register(ActiveMQDestination destName, Destination destination) {
  // TODO refactor to allow views for custom destinations
  try {
    ObjectName objectName = BrokerMBeanSupport.createDestinationName(brokerObjectName, destName);
    DestinationView view;
    if (destination instanceof Queue) {
      view = new QueueView(this, (Queue)destination);
    } else if (destination instanceof Topic) {
      view = new TopicView(this, (Topic)destination);
    } else {
      view = null;
      LOG.warn("JMX View is not supported for custom destination {}", destination);
    }
    if (view != null) {
      registerDestination(objectName, destName, view);
    }
  } catch (Exception e) {
    LOG.error("Failed to register destination {}", destName, e);
  }
}

代码示例来源:origin: org.codehaus.fabric3/fabric3-activemq

try {
  name = new ObjectName(DOMAIN + ":SubDomain=runtime, type=resource, group=ActiveMQ, brokerName="
      + brokerName + ", subgroup=queues, queueName=" + JMXSupport.encodeObjectNamePart(view.getName()));
} catch (MalformedObjectNameException e) {
  throw new MBeanRegistrationException(e);

代码示例来源:origin: com.carecon.fabric3/fabric3-activemq

try {
  name = new ObjectName(DOMAIN + ":SubDomain=runtime, type=resource, group=ActiveMQ, brokerName="
      + brokerName + ", subgroup=queues, queueName=" + JMXSupport.encodeObjectNamePart(view.getName()));
} catch (MalformedObjectNameException e) {
  throw new MBeanRegistrationException(e);

代码示例来源:origin: org.apache.activemq/activemq-broker

public void register(ActiveMQDestination destName, Destination destination) {
  // TODO refactor to allow views for custom destinations
  try {
    ObjectName objectName = BrokerMBeanSupport.createDestinationName(brokerObjectName, destName);
    DestinationView view;
    if (destination instanceof Queue) {
      view = new QueueView(this, (Queue)destination);
    } else if (destination instanceof Topic) {
      view = new TopicView(this, (Topic)destination);
    } else {
      view = null;
      LOG.warn("JMX View is not supported for custom destination {}", destination);
    }
    if (view != null) {
      registerDestination(objectName, destName, view);
    }
  } catch (Exception e) {
    LOG.error("Failed to register destination {}", destName, e);
  }
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

public void register(ActiveMQDestination destName, Destination destination) {
  // TODO refactor to allow views for custom destinations
  try {
    ObjectName objectName = BrokerMBeanSupport.createDestinationName(brokerObjectName, destName);
    DestinationView view;
    if (destination instanceof Queue) {
      view = new QueueView(this, (Queue)destination);
    } else if (destination instanceof Topic) {
      view = new TopicView(this, (Topic)destination);
    } else {
      view = null;
      LOG.warn("JMX View is not supported for custom destination {}", destination);
    }
    if (view != null) {
      registerDestination(objectName, destName, view);
    }
  } catch (Exception e) {
    LOG.error("Failed to register destination {}", destName, e);
  }
}

代码示例来源:origin: org.apache.activemq/activemq-all

public void register(ActiveMQDestination destName, Destination destination) {
  // TODO refactor to allow views for custom destinations
  try {
    ObjectName objectName = BrokerMBeanSupport.createDestinationName(brokerObjectName, destName);
    DestinationView view;
    if (destination instanceof Queue) {
      view = new QueueView(this, (Queue)destination);
    } else if (destination instanceof Topic) {
      view = new TopicView(this, (Topic)destination);
    } else {
      view = null;
      LOG.warn("JMX View is not supported for custom destination {}", destination);
    }
    if (view != null) {
      registerDestination(objectName, destName, view);
    }
  } catch (Exception e) {
    LOG.error("Failed to register destination {}", destName, e);
  }
}

代码示例来源:origin: pierre/meteo

public void register(ActiveMQDestination destName, Destination destination) {
  // TODO refactor to allow views for custom destinations
  try {
    ObjectName objectName = createObjectName(destName);
    DestinationView view;
    if (destination instanceof Queue) {
      view = new QueueView(this, (Queue)destination);
    } else if (destination instanceof Topic) {
      view = new TopicView(this, (Topic)destination);
    } else {
      view = null;
      LOG.warn("JMX View is not supported for custom destination: " + destination);
    }
    if (view != null) {
      registerDestination(objectName, destName, view);
    }
  } catch (Exception e) {
    LOG.error("Failed to register destination " + destName, e);
  }
}

相关文章

微信公众号

最新文章

更多

QueueView类方法