Public Member Functions | |
HttpAdaptor (String hostName, int port, JMXAuthenticator authenticator, SSLConfiguration sslConfig) throws JmxException | |
void | start () throws JmxException |
void | stop () throws JmxException |
Static Public Member Functions | |
List | getHttpAdaptors () |
Static Package Attributes | |
Trace | logger |
Definition at line 48 of file HttpAdaptor.java.
|
Creates a new
TODO: dssmith - determine applicability of getLocalHost() Definition at line 75 of file HttpAdaptor.java. 00077 { 00078 if (hostName != null) 00079 { 00080 this.hostName = hostName; 00081 } 00082 else 00083 { 00084 try 00085 { 00086 /** TODO: dssmith - determine applicability of getLocalHost() */ 00087 this.hostName = InetAddress.getLocalHost().getHostName(); 00088 } 00089 catch (UnknownHostException ex) 00090 { 00091 throw new JmxException(ex); 00092 } 00093 } 00094 this.port = port; 00095 //this.authenticator = authenticator; 00096 this.sslConfig = sslConfig; 00097 addHttpAdaptor(this); 00098 }
|
|
Returns a list of HttpAdaptor .
Definition at line 165 of file HttpAdaptor.java. 00166 {
00167 return httpAdaptors;
00168 }
|
|
start the http adaptor
Definition at line 105 of file HttpAdaptor.java. Referenced by org.objectweb.cjdbc.controller.core.ControllerFactory.setUpJmx(). 00106 { 00107 try 00108 { 00109 00110 MBeanServer server = MBeanServerManager.getInstance(); 00111 // register the HTTP adaptor MBean to the agent 00112 logger.info(Translate.get("jmx.create.http.adaptor", new Object[]{ 00113 hostName, String.valueOf(port)})); 00114 adaptor = new mx4j.tools.adaptor.http.HttpAdaptor(); 00115 objectName = new ObjectName("Server:name=HttpAdaptor"); 00116 server.registerMBean(adaptor, objectName); 00117 adaptor.setHost(hostName); 00118 adaptor.setPort(port); 00119 // set XSLT processor 00120 logger.debug(Translate.get("jmx.create.xslt.processor")); 00121 processorName = new ObjectName("Server:name=XSLTProcessor"); 00122 server.createMBean(mx4j.tools.adaptor.http.XSLTProcessor.class.getName(), 00123 processorName, null); 00124 server.setAttribute(objectName, new Attribute("ProcessorName", 00125 processorName)); 00126 if (this.sslConfig != null) 00127 { 00128 //:TODO 00129 throw new JmxException("ssl for http not implemented"); 00130 } 00131 adaptor.start(); 00132 } 00133 catch (Exception e) 00134 { 00135 e.printStackTrace(); 00136 throw new JmxException(e); 00137 } 00138 }
|
|
stop the http adaptor
Definition at line 145 of file HttpAdaptor.java. Referenced by org.objectweb.cjdbc.controller.jmx.MBeanServerManager.setJmxEnabled(). 00146 { 00147 try 00148 { 00149 MBeanServer server = MBeanServerManager.getInstance(); 00150 adaptor.stop(); 00151 server.unregisterMBean(objectName); 00152 server.unregisterMBean(processorName); 00153 } 00154 catch (Exception e) 00155 { 00156 throw new JmxException(e); 00157 } 00158 }
|
|
Initial value: Trace
.getLogger("org.objectweb.cjdbc.controller.jmx")
Definition at line 51 of file HttpAdaptor.java. |