org.apache.activemq.broker.jmx.QueueView.<init>()方法的使用及代码示例

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

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

QueueView.<init>介绍

暂无

代码示例

代码示例来源: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.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类方法