本文整理汇总了Java中org.springframework.jmx.access.MBeanProxyFactoryBean.getObject方法的典型用法代码示例。如果您正苦于以下问题:Java MBeanProxyFactoryBean.getObject方法的具体用法?Java MBeanProxyFactoryBean.getObject怎么用?Java MBeanProxyFactoryBean.getObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.jmx.access.MBeanProxyFactoryBean
的用法示例。
在下文中一共展示了MBeanProxyFactoryBean.getObject方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildProxy
import org.springframework.jmx.access.MBeanProxyFactoryBean; //导入方法依赖的package包/类
private ServiceDaemon buildProxy(ObjectName mBeanName) {
MBeanProxyFactoryBean mBeanProxyFactoryBean = new MBeanProxyFactoryBean();
try {
mBeanProxyFactoryBean.setObjectName(mBeanName.getCanonicalName());
} catch (MalformedObjectNameException e) {
throw new JmxObjectNameException("Object name '"
+ mBeanName.getCanonicalName() + "' was malformed!", e);
}
mBeanProxyFactoryBean.setProxyInterface(ServiceDaemon.class);
mBeanProxyFactoryBean.afterPropertiesSet();
return (ServiceDaemon) mBeanProxyFactoryBean.getObject();
}
示例2: productQueueView
import org.springframework.jmx.access.MBeanProxyFactoryBean; //导入方法依赖的package包/类
@Bean
public QueueViewMBean productQueueView() {
MBeanProxyFactoryBean bean = new MBeanProxyFactoryBean();
try {
bean.setProxyInterface(org.apache.activemq.broker.jmx.QueueViewMBean.class);
bean.setObjectName("org.apache.activemq:BrokerName=embedded,Type=Queue,Destination=sbia.queue.product");
bean.afterPropertiesSet();
} catch (MalformedObjectNameException e) {
log.error("ActiveMQ의 ObjectName이 잘못되었습니다.", e);
throw new RuntimeException(e);
}
return (QueueViewMBean) bean.getObject();
}
示例3: shippedOrderQueueView
import org.springframework.jmx.access.MBeanProxyFactoryBean; //导入方法依赖的package包/类
@Bean
public QueueViewMBean shippedOrderQueueView() {
MBeanProxyFactoryBean bean = new MBeanProxyFactoryBean();
try {
bean.setProxyInterface(org.apache.activemq.broker.jmx.QueueViewMBean.class);
bean.setObjectName(new ObjectName("org.apache.activemq:BrokerName=embedded,Type=Queue,Destination=spring.batch.queue.shipped.order"));
bean.afterPropertiesSet();
} catch (MalformedObjectNameException e) {
log.error("에러", e);
}
bean.prepare();
return (QueueViewMBean) bean.getObject();
}
示例4: orderQueueView
import org.springframework.jmx.access.MBeanProxyFactoryBean; //导入方法依赖的package包/类
@Bean
public QueueViewMBean orderQueueView() {
MBeanProxyFactoryBean bean = new MBeanProxyFactoryBean();
try {
bean.setProxyInterface(org.apache.activemq.broker.jmx.QueueViewMBean.class);
bean.setObjectName(new ObjectName("org.apache.activemq:BrokerName=embedded,Type=Queue,Destination=spring.batch.queue.order"));
bean.afterPropertiesSet();
} catch (MalformedObjectNameException e) {
log.error("에러", e);
}
bean.prepare();
return (QueueViewMBean) bean.getObject();
}