本文整理汇总了Java中mx4j.tools.adaptor.http.HttpAdaptor类的典型用法代码示例。如果您正苦于以下问题:Java HttpAdaptor类的具体用法?Java HttpAdaptor怎么用?Java HttpAdaptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HttpAdaptor类属于mx4j.tools.adaptor.http包,在下文中一共展示了HttpAdaptor类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startHtmlAdapter
import mx4j.tools.adaptor.http.HttpAdaptor; //导入依赖的package包/类
public void startHtmlAdapter(int port)
{
try
{
HttpAdaptor adapter = new HttpAdaptor();
ObjectName adapterName = new ObjectName("Gemlite:name=HtmlAdapter,port=" + port);
adapter.setPort(port);
ManagementFactory.getPlatformMBeanServer().registerMBean(adapter, adapterName);
adapter.start();
LogUtil.getCoreLog().info("HtmlAdapter started on port: "+port);
}
catch (Exception e)
{
e.printStackTrace();
}
}
示例2: setHttpAdaptor
import mx4j.tools.adaptor.http.HttpAdaptor; //导入依赖的package包/类
public void setHttpAdaptor(HttpAdaptor httpAdaptor) {
this.httpAdaptor = httpAdaptor;
}
示例3: getMBeanServer
import mx4j.tools.adaptor.http.HttpAdaptor; //导入依赖的package包/类
/**
* @param idx Index.
* @return MBean server.
* @throws Exception If failed.
*/
private MBeanServer getMBeanServer(int idx) throws Exception {
HttpAdaptor adaptor = new HttpAdaptor();
MBeanServer srv = MBeanServerFactory.createMBeanServer();
adaptor.setPort(Integer.valueOf(GridTestProperties.getProperty("discovery.mbeanserver.selftest.baseport")) +
idx);
srv.registerMBean(adaptor, new ObjectName(HTTP_ADAPTOR_MBEAN_NAME));
adaptor.start();
httpAdaptors.add(adaptor);
return srv;
}
示例4: getMBeanServer
import mx4j.tools.adaptor.http.HttpAdaptor; //导入依赖的package包/类
/**
* @return Configured MBean server.
* @throws Exception If failed.
*/
private MBeanServer getMBeanServer() throws Exception {
HttpAdaptor mbeanAdaptor = new HttpAdaptor();
MBeanServer mbeanSrv = MBeanServerFactory.createMBeanServer();
mbeanAdaptor.setPort(
Integer.valueOf(GridTestProperties.getProperty("comm.mbeanserver.selftest.baseport")));
mbeanSrv.registerMBean(mbeanAdaptor, new ObjectName("mbeanAdaptor:protocol=HTTP"));
mbeanAdaptor.start();
return mbeanSrv;
}