|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.cjdbc.controller.jmx.RmiConnector
This class defines a RmiConnector
Field Summary | |
private javax.management.remote.JMXAuthenticator |
authenticator
|
private JmxNotification |
cjdbcNotification
|
private javax.management.remote.JMXConnectorServer |
connection
we have to keep a reference to the server to avoid it from being garbage collected otherwise the client will throw a java.rmi.NoSuchObjectException (problem experienced with ssl connections) |
private java.lang.String |
controllerName
|
private java.lang.String |
hostName
|
(package private) static Trace |
logger
|
private java.util.Date |
myDate
|
private javax.management.Notification |
notification
|
private int |
port
|
private static java.util.List |
rmiConnectors
|
private java.rmi.Remote |
rmiRegistry
|
private static long |
sequence
|
private SSLConfiguration |
sslConfig
|
private long |
time
|
Constructor Summary | |
RmiConnector(java.lang.String controllerName,
java.lang.String hostName,
int port,
javax.management.remote.JMXAuthenticator authenticator,
SSLConfiguration sslConfig)
Creates a new RmiConnector.java object |
Method Summary | |
private static void |
addRmiConnector(RmiConnector pRmiConnector)
Adds an rmiConnector to the list. |
static void |
broadcastNotification(AbstractStandardMBean mbean,
java.lang.String type,
java.lang.String priority,
java.lang.String description,
java.util.Hashtable data)
Broadcast a jmx notification to any client connected to any RmiConnector registered in the static list. |
private void |
createJRMPAdaptor()
|
private void |
createNamingService()
Create naming service and starts rmi |
javax.management.remote.JMXAuthenticator |
getAuthenticator()
Returns the authenticator value. |
javax.management.remote.JMXConnectorServer |
getConnection()
Returns the connection value. |
java.lang.String |
getControllerName()
|
java.lang.String |
getHostName()
|
int |
getPort()
Returns the port value. |
static java.util.List |
getRmiConnectors()
Returns a list of rmiConnectors . |
SSLConfiguration |
getSslConfig()
Returns the sslConfig value. |
void |
sendNotification(AbstractStandardMBean mbean,
java.lang.String type,
java.lang.String priority,
java.lang.String description,
java.util.Hashtable data)
This method sends notification to all client registered to an instance of the RmiConnector class. |
void |
setAuthenticator(javax.management.remote.JMXAuthenticator authenticator)
Sets the authenticator value. |
void |
setPort(int port)
Sets the port value. |
void |
setSslConfig(SSLConfiguration sslConfig)
Sets the sslConfig value. |
void |
start()
start the rmi connector and the rmi naming service |
void |
stop()
stop the rmi connector and the rmi registry |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static Trace logger
private java.lang.String controllerName
private java.lang.String hostName
private int port
private javax.management.remote.JMXAuthenticator authenticator
private SSLConfiguration sslConfig
private javax.management.remote.JMXConnectorServer connection
private java.rmi.Remote rmiRegistry
private static java.util.List rmiConnectors
private java.util.Date myDate
private long time
private JmxNotification cjdbcNotification
private javax.management.Notification notification
private static long sequence
Constructor Detail |
public RmiConnector(java.lang.String controllerName, java.lang.String hostName, int port, javax.management.remote.JMXAuthenticator authenticator, SSLConfiguration sslConfig) throws JmxException
RmiConnector.java
object
controllerName
- for reference when sending notificationhostName
- the name of the host we bind to, if null the default
InetAddress.getLocalHost().getHostName() is usedport
- the port the rmi registry is listening onauthenticator
- the jmxauthenticator used for the connectionsslConfig
- ssl configuration
JmxException
- the name of the localhost could not be determinedMethod Detail |
public javax.management.remote.JMXAuthenticator getAuthenticator()
public void setAuthenticator(javax.management.remote.JMXAuthenticator authenticator)
authenticator
- The authenticator to set.public int getPort()
public void setPort(int port)
port
- The port to set.public SSLConfiguration getSslConfig()
public void setSslConfig(SSLConfiguration sslConfig)
sslConfig
- The sslConfig to set.public javax.management.remote.JMXConnectorServer getConnection()
public void start() throws JmxException
JmxException
- an exceptionpublic void stop() throws JmxException
JmxException
- an exceptionprivate void createNamingService() throws JmxException
JmxException
- if creation failsprivate void createJRMPAdaptor() throws JmxException
JmxException
public static java.util.List getRmiConnectors()
private static void addRmiConnector(RmiConnector pRmiConnector)
pRmiConnector
- The rmiConnector to add.public java.lang.String getControllerName()
public java.lang.String getHostName()
public void sendNotification(AbstractStandardMBean mbean, java.lang.String type, java.lang.String priority, java.lang.String description, java.util.Hashtable data)
RmiConnector
class. The JmxNotification
class is used here to create an object with all the information gathered in
parameters, and then is serialized in xml for interaction on the client
side.
mbean
- the mbean that is generating the notificationtype
- the type as seen in CjdbcNotificationList
priority
- notification level as seen in
CjdbcNotificationList
description
- a string description of the notificationdata
- a hashtable of data that can be used to give more information
on the notificationJmxNotification
public static void broadcastNotification(AbstractStandardMBean mbean, java.lang.String type, java.lang.String priority, java.lang.String description, java.util.Hashtable data)
mbean
- the mbean that is generating the notificationtype
- the type as seen in CjdbcNotificationList
priority
- notification level as seen in
CjdbcNotificationList
description
- a string description of the notificationdata
- a hashtable of data that can be used to give more information
on the notification
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |