org.ow2.jonas.management.extensions.base.api
Interface IBaseManagement

All Known Subinterfaces:
ICluster, IDomain
All Known Implementing Classes:
BaseManagement, ClusterdaemonManagement, ClusterManagement, DomainManagement, ManagementEntryPoint, ServerManagement, ServerMonitoring

public interface IBaseManagement


Method Summary
 Object getAttribute(ObjectName on, String attribute, String serverName)
          Gets the value of a specific attribute of a named MBean.
 J2EEMBeanAttributeInfo[] getAttributes(ObjectName objectName, String serverName)
          Get management attributes.
 String getDomainName()
           
 int getIntegerAttribute(ObjectName objectName, String attrName)
          Get the integer attribute value of an MBean in the current MBean Server.
 String getKeyValue(String objectName, String keyName)
          Return the value of a key property in an OBJECT_NAME.
 String[] getKeyValues(String[] objectNames, String keyName)
          Return the values of a key property in String OBJECT_NAMEs.
 List getListMbean(ObjectName p_On, String serverName)
          Return the list of ObjectName Mbean gotten by the query in the current MbeanServer.
 List<?> getRealmItems(String realmType, String sSecurityRealmUsed)
          Get realm items of the given type within the current server of the current domain.
 List<?> getRealmItems(String realmType, String sSecurityRealmUsed, String domainName, String serverName)
          Get realm items of the given type.
 MBeanServerConnection getServerConnection()
          Return the MBeanServer connection corresponding to a current server in the current domain.
 MBeanServerConnection getServerConnection(String serverName)
          Return the MBeanServer connection corresponding to a given server in the current domain.
 String getServerName()
           
 String getStringAttribute(ObjectName objectName, String attrName)
          Get the String attribute value of an MBean in the current MBean Server.
 ObjectName getTomcatRealm(String domainName, String serverName)
          Get the ObjectName of the Tomcat Realm MBean.
 List<?> getTomcatRealmItems(String usedSecurityRealm, String domainName, String serverName)
           
 Object invoke(ObjectName on, String operation, Object[] param, String[] signature, String serverName)
          Implementation of the invoke method to be applied to a server in the domain.
 boolean isRegistered(ObjectName on, String serverName)
          Implementation of the isRegistered method to be applied to a server in the domain.
 void setAttribute(ObjectName on, String attribute, Object value)
          Sets the value of a specific attribute of a named MBean within the current server.
 void setAttribute(ObjectName on, String attribute, Object value, String serverName)
          Sets the value of a specific attribute of a named MBean.
 

Method Detail

getServerName

String getServerName()
Returns:
The current server name.

getDomainName

String getDomainName()
Returns:
The current domain name.

getStringAttribute

String getStringAttribute(ObjectName objectName,
                          String attrName)
                          throws ManagementException
Get the String attribute value of an MBean in the current MBean Server.

Parameters:
objectName - The MBean's ObjectName
attrName - The attribute name
Returns:
The value of the attribute
Throws:
ManagementException

getIntegerAttribute

int getIntegerAttribute(ObjectName objectName,
                        String attrName)
                        throws ManagementException
Get the integer attribute value of an MBean in the current MBean Server.

Parameters:
objectName - The MBean's ObjectName
attrName - The attribute name
Returns:
The value of the attribute
Throws:
ManagementException

getKeyValue

String getKeyValue(String objectName,
                   String keyName)
                   throws ManagementException
Return the value of a key property in an OBJECT_NAME.

Parameters:
objectName - the OBJECT_NAME (String form)
keyName - key property name
Returns:
key value
Throws:
ManagementException

getKeyValues

String[] getKeyValues(String[] objectNames,
                      String keyName)
                      throws ManagementException
Return the values of a key property in String OBJECT_NAMEs.

Parameters:
objectNames - the OBJECT_NAMEs
keyName - key name
Returns:
array of key values
Throws:
ManagementException

getAttributes

J2EEMBeanAttributeInfo[] getAttributes(ObjectName objectName,
                                       String serverName)
                                       throws ManagementException
Get management attributes.

Parameters:
objectName -
serverName -
Returns:
attributes for the given objectName.
Throws:
ManagementException

getAttribute

Object getAttribute(ObjectName on,
                    String attribute,
                    String serverName)
                    throws ManagementException
Gets the value of a specific attribute of a named MBean.

Parameters:
on - The ObjectName of the MBean.
attribute - A String specifying the name of the attribute to be retrieved.
serverName - The server name
Returns:
The value of the attribute.
Throws:
ManagementException - management operation failed

isRegistered

boolean isRegistered(ObjectName on,
                     String serverName)
                     throws ManagementException
Implementation of the isRegistered method to be applied to a server in the domain.

Parameters:
on - ObjectName of the MBean we are looking for
serverName - The server name
Returns:
True if the MBean is already registered in the MBean server, false otherwise or if an exception is catched.
Throws:
ManagementException - management operation failed

invoke

Object invoke(ObjectName on,
              String operation,
              Object[] param,
              String[] signature,
              String serverName)
              throws ManagementException
Implementation of the invoke method to be applied to a server in the domain.

Parameters:
on - the ObjectName of the MBean that is the target of the invoke.
operation - operation to invoke
param - invoke parameters
signature - invoke parameters signature
serverName - The server's name
Returns:
The object returned by the operation
Throws:
ManagementException - management operation failed

getListMbean

List getListMbean(ObjectName p_On,
                  String serverName)
                  throws ManagementException
Return the list of ObjectName Mbean gotten by the query in the current MbeanServer.

Parameters:
p_On - Query Mbeans to search
Returns:
The list of ObjectName
Throws:
ManagementException

getServerConnection

MBeanServerConnection getServerConnection(String serverName)
                                          throws ManagementException
Return the MBeanServer connection corresponding to a given server in the current domain. The connection for servers in the domain are provided by the DomainMonitor.

Parameters:
serverName - The managed server name
Returns:
The MBeanServerConnection corresponding to the managed server
Throws:
ManagementException - Couldn't get the connection

setAttribute

void setAttribute(ObjectName on,
                  String attribute,
                  Object value,
                  String serverName)
                  throws ManagementException
Sets the value of a specific attribute of a named MBean.

Parameters:
on - The ObjectName of the MBean.
serverName - The server name
attribute - A String specifying the name of the attribute to be set.
value - The value to set to the attribute.
Throws:
ManagementException - management operation failed

getServerConnection

MBeanServerConnection getServerConnection()
                                          throws ManagementException
Return the MBeanServer connection corresponding to a current server in the current domain. The connection for servers in the domain are provided by the DomainMonitor.

Returns:
The MBeanServerConnection corresponding to the managed server
Throws:
ManagementException - Couldn't get the connection

setAttribute

void setAttribute(ObjectName on,
                  String attribute,
                  Object value)
                  throws ManagementException
Sets the value of a specific attribute of a named MBean within the current server.

Parameters:
on - The ObjectName of the MBean.
attribute - A String specifying the name of the attribute to be set.
value - The value to set to the attribute.
Throws:
ManagementException - management operation failed

getTomcatRealm

ObjectName getTomcatRealm(String domainName,
                          String serverName)
                          throws ManagementException
Get the ObjectName of the Tomcat Realm MBean.

Parameters:
domainName - the domain's name
serverName - the server's name
Returns:
ObjectName of the Tomcat Realm MBean.
Throws:
ManagementException

getRealmItems

List<?> getRealmItems(String realmType,
                      String sSecurityRealmUsed,
                      String domainName,
                      String serverName)
                      throws ManagementException
Get realm items of the given type.

Parameters:
realmType - realm type.
sSecurityRealmUsed - the used security realm.
domainName - the domain's name
serverName - server's name
Returns:
real items of the given type
Throws:
ManagementException - any.

getTomcatRealmItems

List<?> getTomcatRealmItems(String usedSecurityRealm,
                            String domainName,
                            String serverName)
                            throws ManagementException
Throws:
ManagementException

getRealmItems

List<?> getRealmItems(String realmType,
                      String sSecurityRealmUsed)
                      throws ManagementException
Get realm items of the given type within the current server of the current domain.

Parameters:
realmType - realm type.
sSecurityRealmUsed - the used security realm.
Returns:
realm items of the given type
Throws:
ManagementException - any.


Copyright © 2010 OW2 Consortium. All Rights Reserved.