|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.objectweb.cjdbc.console.jmx.RmiJmxClient
This class defines a RmiJmxClient that uses Jmx 2.0 specifications to connect to the RmiSever
| Field Summary | |
private DatabaseBackendMBean |
backendMBean
|
private javax.management.remote.JMXConnector |
connector
|
private ControllerMBean |
controllerMBean
|
private java.lang.Object |
credentials
|
private DataCollectorMBean |
dataMBean
|
private javax.management.NotificationListener |
notificationListener
|
private java.lang.String |
remoteHostAddress
|
private java.lang.String |
remoteHostPort
|
(package private) javax.security.auth.Subject |
subject
|
private VirtualDatabaseMBean |
virtualDbMBean
|
| Constructor Summary | |
RmiJmxClient(java.lang.String url,
java.lang.Object credentials)
Creates a new RmiJmxClient object |
|
RmiJmxClient(java.lang.String port,
java.lang.String host,
java.lang.Object credentials)
Creates a new RmiJmxClient.java object |
|
RmiJmxClient(java.lang.String port,
java.lang.String host,
java.lang.String jmxUser,
java.lang.String jmxPassword)
Creates a new RmiJmxClient.java object |
|
| Method Summary | |
void |
connect(java.lang.String port,
java.lang.String host,
java.lang.Object credentials)
Connect to the MBean server |
java.lang.Object |
getAttributeValue(javax.management.ObjectName mbean,
java.lang.String attribute)
Get the value of an attribute on the given mbean |
ControllerMBean |
getControllerProxy()
Get a proxy to the ControllerMBean |
java.lang.Object |
getCredentials()
Returns the credentials value. |
DatabaseBackendMBean |
getDatabaseBackendProxy(java.lang.String vdb,
java.lang.String backend,
java.lang.String user,
java.lang.String password)
Get a proxy to the DatabaseBackendMBean |
DataCollectorMBean |
getDataCollectorProxy()
Get a proxy to the DataCollectorMBean |
javax.management.MBeanInfo |
getMBeanInfo(javax.management.ObjectName mbean)
Get the mbean information |
javax.management.NotificationListener |
getNotificationListener()
Returns the notificationListener value. |
java.lang.String |
getRemoteHostAddress()
Returns the remoteHostAddress value. |
java.lang.String |
getRemoteHostPort()
Returns the remoteHostPort value. |
java.lang.String |
getRemoteName()
Get the controller name used for jmx connection This is [hostname]:[jmxServerPort] |
private java.lang.String[] |
getSignature(javax.management.MBeanOperationInfo operation)
|
VirtualDatabaseMBean |
getVirtualDatabaseProxy(java.lang.String database,
java.lang.String user,
java.lang.String password)
Get a reference to the virtualdatabaseMbean with the given authentication |
java.lang.Object |
invokeOperation(javax.management.ObjectName name,
javax.management.MBeanOperationInfo operation,
java.lang.Object[] args)
|
boolean |
isSubjectSet()
|
boolean |
isValidConnection()
Test if the connection with the mbean server is still valid |
java.util.Set |
listCJDBCMBeans()
List of all the mbean on the current server |
void |
reconnect()
Reconnect to the same mbean server |
void |
setAttributeValue(javax.management.ObjectName mbean,
java.lang.String attribute,
java.lang.Object value)
Change an attribute value |
void |
setCurrentSubject(java.lang.String user,
java.lang.String password)
|
void |
setNotificationListener(javax.management.NotificationListener notificationListener)
Sets the notificationListener value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private javax.management.remote.JMXConnector connector
private java.lang.Object credentials
private java.lang.String remoteHostAddress
private java.lang.String remoteHostPort
private javax.management.NotificationListener notificationListener
private ControllerMBean controllerMBean
private VirtualDatabaseMBean virtualDbMBean
private DatabaseBackendMBean backendMBean
private DataCollectorMBean dataMBean
javax.security.auth.Subject subject
| Constructor Detail |
public RmiJmxClient(java.lang.String port,
java.lang.String host,
java.lang.String jmxUser,
java.lang.String jmxPassword)
throws java.io.IOException
RmiJmxClient.java object
port - the port of the host to connect tohost - the host name to connect tojmxUser - the jmxUser if one, to be authenticated withjmxPassword - the jmxPassword if one, to be authenticated with
java.io.IOException - if cannot connect
public RmiJmxClient(java.lang.String url,
java.lang.Object credentials)
throws java.io.IOException
RmiJmxClient object
url - the jmx connector urlcredentials - to use for the connection
java.io.IOException - if connect fails
public RmiJmxClient(java.lang.String port,
java.lang.String host,
java.lang.Object credentials)
throws java.io.IOException
RmiJmxClient.java object
port - the port of the host to connect tohost - the host name to connect tocredentials - to use for the connection
java.io.IOException - if connect fails| Method Detail |
public javax.management.NotificationListener getNotificationListener()
public void setNotificationListener(javax.management.NotificationListener notificationListener)
notificationListener - The notificationListener to set.public java.lang.Object getCredentials()
public void connect(java.lang.String port,
java.lang.String host,
java.lang.Object credentials)
throws java.io.IOException
port - the port of the host to connect tohost - the host name to connect tocredentials - to use for the connection
java.io.IOException - if connect fails
public java.util.Set listCJDBCMBeans()
throws java.lang.Exception
java.lang.Exception - if fails
public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName mbean)
throws java.lang.Exception
mbean - the ObjectName of the mbean to access
java.lang.Exception - if fails
public java.lang.Object getAttributeValue(javax.management.ObjectName mbean,
java.lang.String attribute)
throws java.lang.Exception
mbean - the ObjectName of the mbean to accessattribute - the attribute name
java.lang.Exception - if fails
public void setAttributeValue(javax.management.ObjectName mbean,
java.lang.String attribute,
java.lang.Object value)
throws java.lang.Exception
mbean - the ObjectName of the mbean to accessattribute - the attribute namevalue - the attribute new value
java.lang.Exception - if fails
public void setCurrentSubject(java.lang.String user,
java.lang.String password)
public boolean isSubjectSet()
public java.lang.Object invokeOperation(javax.management.ObjectName name,
javax.management.MBeanOperationInfo operation,
java.lang.Object[] args)
throws java.lang.Exception
java.lang.Exceptionprivate java.lang.String[] getSignature(javax.management.MBeanOperationInfo operation)
public VirtualDatabaseMBean getVirtualDatabaseProxy(java.lang.String database,
java.lang.String user,
java.lang.String password)
throws javax.management.InstanceNotFoundException,
java.io.IOException,
VirtualDatabaseException
database - the virtual database nameuser - the user recognized as the VirtualDatabaseUserpassword - the password for the VirtualDatabaseUser
VirtualDatabaseMBean instance
java.io.IOException - if cannot connect to MBean
javax.management.InstanceNotFoundException - if cannot locate MBean
VirtualDatabaseException - if virtual database fails
public ControllerMBean getControllerProxy()
throws java.io.IOException
ControllerMBean instance
java.io.IOException - if cannot connect to MBean
javax.management.InstanceNotFoundException - if cannot locate MBean
public DataCollectorMBean getDataCollectorProxy()
throws java.io.IOException
DataCollectorMBean instance
java.io.IOException - if fails
public DatabaseBackendMBean getDatabaseBackendProxy(java.lang.String vdb,
java.lang.String backend,
java.lang.String user,
java.lang.String password)
throws javax.management.InstanceNotFoundException,
java.io.IOException
vdb - virtual database namebackend - backend nameuser - user namepassword - password name
DatabaseBackendMBean instance
java.io.IOException - if cannot connect to MBean
javax.management.InstanceNotFoundException - if cannot locate MBeanpublic java.lang.String getRemoteName()
remoteHostName+":"+remoteHostPortpublic java.lang.String getRemoteHostAddress()
public java.lang.String getRemoteHostPort()
public void reconnect()
throws java.io.IOException
java.io.IOException - if reconnection failedpublic boolean isValidConnection()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||