Public Member Functions | |
RmiConnector (String controllerName, String hostName, int port, JMXAuthenticator authenticator, SSLConfiguration sslConfig) throws JmxException | |
JMXAuthenticator | getAuthenticator () |
void | setAuthenticator (JMXAuthenticator authenticator) |
int | getPort () |
void | setPort (int port) |
SSLConfiguration | getSslConfig () |
void | setSslConfig (SSLConfiguration sslConfig) |
JMXConnectorServer | getConnection () |
void | start () throws JmxException |
void | stop () throws JmxException |
String | getControllerName () |
String | getHostName () |
synchronized void | sendNotification (AbstractStandardMBean mbean, String type, String priority, String description, Hashtable data) |
Static Public Member Functions | |
List | getRmiConnectors () |
void | broadcastNotification (AbstractStandardMBean mbean, String type, String priority, String description, Hashtable data) |
Static Package Attributes | |
Trace | logger |
Definition at line 60 of file RmiConnector.java.
|
Creates a new
TODO: dssmith - determine applicability of getLocalHost() Definition at line 92 of file RmiConnector.java. 00095 { 00096 if (hostName != null) 00097 { 00098 this.hostName = hostName; 00099 } 00100 else 00101 { 00102 try 00103 { 00104 /** TODO: dssmith - determine applicability of getLocalHost() */ 00105 this.hostName = InetAddress.getLocalHost().getHostName(); 00106 } 00107 catch (UnknownHostException ex) 00108 { 00109 throw new JmxException(ex); 00110 } 00111 } 00112 this.controllerName = controllerName; 00113 this.port = port; 00114 this.authenticator = authenticator; 00115 this.sslConfig = sslConfig; 00116 00117 addRmiConnector(this); 00118 }
|
|
Broadcast a jmx notification to any client connected to any RmiConnector registered in the static list. The method is static because it is sending notifications to all rmi connectors.
Definition at line 388 of file RmiConnector.java. References org.objectweb.cjdbc.controller.jmx.RmiConnector.sendNotification(). 00390 { 00391 sequence++; 00392 logger.info("Sending notification:" + description + "(Message No:" 00393 + sequence + ")"); 00394 Iterator iter = rmiConnectors.iterator(); 00395 RmiConnector rmi; 00396 while (iter.hasNext()) 00397 { 00398 rmi = ((RmiConnector) iter.next()); 00399 rmi.sendNotification(mbean, type, priority, description, data); 00400 } 00401 }
|
|
Returns the authenticator value.
Definition at line 125 of file RmiConnector.java. 00126 {
00127 return authenticator;
00128 }
|
|
Returns the connection value.
Definition at line 185 of file RmiConnector.java. 00186 {
00187 return connection;
00188 }
|
|
Definition at line 324 of file RmiConnector.java. 00325 {
00326 return controllerName;
00327 }
|
|
Definition at line 332 of file RmiConnector.java. Referenced by org.objectweb.cjdbc.controller.core.Controller.getJmxName(), and org.objectweb.cjdbc.controller.virtualdatabase.protocol.VirtualDatabaseConfiguration.VirtualDatabaseConfiguration(). 00333 {
00334 return hostName;
00335 }
|
|
Returns the port value.
Definition at line 145 of file RmiConnector.java. Referenced by org.objectweb.cjdbc.controller.core.Controller.getJmxName(), and org.objectweb.cjdbc.controller.virtualdatabase.protocol.VirtualDatabaseConfiguration.VirtualDatabaseConfiguration(). 00146 {
00147 return port;
00148 }
|
|
Returns a list of rmiConnectors .
Definition at line 306 of file RmiConnector.java. 00307 {
00308 return rmiConnectors;
00309 }
|
|
Returns the sslConfig value.
Definition at line 165 of file RmiConnector.java. 00166 {
00167 return sslConfig;
00168 }
|
|
This method sends notification to all client registered to an instance of the
Definition at line 359 of file RmiConnector.java. References org.objectweb.cjdbc.controller.jmx.AbstractStandardMBean.sendNotification(). Referenced by org.objectweb.cjdbc.controller.jmx.RmiConnector.broadcastNotification(). 00361 { 00362 00363 myDate = new Date(); 00364 time = myDate.getTime(); 00365 00366 cjdbcNotification = new JmxNotification(priority, "" + sequence, type, 00367 description, "" + time, controllerName, mbean.getClass().getName(), 00368 "mbeanName", hostName, "" + port, data); 00369 notification = new Notification(type, mbean, sequence, myDate.getTime(), 00370 description); 00371 notification.setUserData(cjdbcNotification.toString()); 00372 mbean.sendNotification(notification); 00373 }
|
|
Sets the authenticator value.
Definition at line 135 of file RmiConnector.java. 00136 {
00137 this.authenticator = authenticator;
00138 }
|
|
Sets the port value.
Definition at line 155 of file RmiConnector.java. 00156 {
00157 this.port = port;
00158 }
|
|
Sets the sslConfig value.
Definition at line 175 of file RmiConnector.java. 00176 {
00177 this.sslConfig = sslConfig;
00178 }
|
|
start the rmi connector and the rmi naming service
Definition at line 195 of file RmiConnector.java. Referenced by org.objectweb.cjdbc.controller.core.ControllerFactory.setUpJmx(). 00196 { 00197 createNamingService(); 00198 createJRMPAdaptor(); 00199 }
|
|
stop the rmi connector and the rmi registry
Definition at line 206 of file RmiConnector.java. Referenced by org.objectweb.cjdbc.controller.jmx.MBeanServerManager.setJmxEnabled(). 00207 { 00208 try 00209 { 00210 if (connection != null) 00211 connection.stop(); 00212 if (rmiRegistry != null) 00213 UnicastRemoteObject.unexportObject(rmiRegistry, true); 00214 } 00215 catch (Exception e) 00216 { 00217 throw new JmxException(e); 00218 } 00219 finally 00220 { 00221 connection = null; 00222 rmiRegistry = null; 00223 } 00224 }
|
|
Initial value: Trace
.getLogger("org.objectweb.cjdbc.controller.jmx")
Definition at line 62 of file RmiConnector.java. |