|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.lib.management.extensions.base.BaseManagement
public class BaseManagement
Base class for JOnAS management. This class is extended by classes specialized for specific management aspects.
| Field Summary | |
|---|---|
protected static org.ow2.util.log.Log |
logger
create logger |
protected static Object |
s_Synchro
Object used for synchronization. |
| Constructor Summary | |
|---|---|
BaseManagement()
Base constructor. |
|
| Method Summary | |
|---|---|
protected void |
addRealmItem(ArrayList p_Realms,
String p_Type,
String p_SecurityRealmUsed,
String domainName,
String serverName)
Add RealmItem in the list. |
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()
|
static IBaseManagement |
getInstance()
Get singleton instance of base management. |
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<RealmItem> |
getRealmItems(String realmType,
String sSecurityRealmUsed)
Get realm items of the given type within the current server of the current domain. |
List<RealmItem> |
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<RealmItem> |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.ow2.util.log.Log logger
protected static Object s_Synchro
| Constructor Detail |
|---|
public BaseManagement()
| Method Detail |
|---|
public static IBaseManagement getInstance()
public String getServerName()
getServerName in interface IBaseManagementpublic String getDomainName()
getDomainName in interface IBaseManagement
public String getStringAttribute(ObjectName objectName,
String attrName)
throws ManagementException
getStringAttribute in interface IBaseManagementobjectName - The MBean's ObjectNameattrName - The attribute name
ManagementException
public int getIntegerAttribute(ObjectName objectName,
String attrName)
throws ManagementException
getIntegerAttribute in interface IBaseManagementobjectName - The MBean's ObjectNameattrName - The attribute name
ManagementException
public String getKeyValue(String objectName,
String keyName)
throws ManagementException
getKeyValue in interface IBaseManagementobjectName - the OBJECT_NAME (String form)keyName - key property name
ManagementException
public String[] getKeyValues(String[] objectNames,
String keyName)
throws ManagementException
getKeyValues in interface IBaseManagementobjectNames - the OBJECT_NAMEskeyName - key name
ManagementException
public J2EEMBeanAttributeInfo[] getAttributes(ObjectName objectName,
String serverName)
throws ManagementException
getAttributes in interface IBaseManagementobjectName - the ObjectNameserverName - server name.
ManagementException - management operation failed
public Object getAttribute(ObjectName on,
String attribute,
String serverName)
throws ManagementException
getAttribute in interface IBaseManagementon - The ObjectName of the MBean.attribute - A String specifying the name of the attribute to be
retrieved.serverName - The server name
ManagementException - management operation failed
public boolean isRegistered(ObjectName on,
String serverName)
throws ManagementException
isRegistered method to be applied to a
server in the domain.
isRegistered in interface IBaseManagementon - ObjectName of the MBean we are looking forserverName - The server name
ManagementException - management operation failed
public Object invoke(ObjectName on,
String operation,
Object[] param,
String[] signature,
String serverName)
throws ManagementException
invoke method to be applied to a
server in the domain.
invoke in interface IBaseManagementon - the ObjectName of the MBean that is the target of the invoke.operation - operation to invokeparam - invoke parameterssignature - invoke parameters signatureserverName - The server's name
ManagementException - management operation failed
public List getListMbean(ObjectName p_On,
String serverName)
throws ManagementException
ObjectName Mbean gotten by the query in
the current MbeanServer.
getListMbean in interface IBaseManagementp_On - Query Mbeans to search
ObjectName
ManagementException
public MBeanServerConnection getServerConnection(String serverName)
throws ManagementException
getServerConnection in interface IBaseManagementserverName - The managed server name
ManagementException - Couldn't get the connection
public MBeanServerConnection getServerConnection()
throws ManagementException
getServerConnection in interface IBaseManagementManagementException - Couldn't get the connection
public void setAttribute(ObjectName on,
String attribute,
Object value,
String serverName)
throws ManagementException
setAttribute in interface IBaseManagementon - The ObjectName of the MBean.serverName - The server nameattribute - A String specifying the name of the attribute to be set.value - The value to set to the attribute.
ManagementException - management operation failed
public void setAttribute(ObjectName on,
String attribute,
Object value)
throws ManagementException
setAttribute in interface IBaseManagementon - 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.
ManagementException - management operation failed
public List<RealmItem> getRealmItems(String realmType,
String sSecurityRealmUsed,
String domainName,
String serverName)
throws ManagementException
getRealmItems in interface IBaseManagementrealmType - realm type.sSecurityRealmUsed - the used security realm.domainName - serverName - server's name
ManagementException - any.
public List<RealmItem> getRealmItems(String realmType,
String sSecurityRealmUsed)
throws ManagementException
getRealmItems in interface IBaseManagementrealmType - realm type.sSecurityRealmUsed - the used security realm.
ManagementException - any.
public List<RealmItem> getTomcatRealmItems(String usedSecurityRealm,
String domainName,
String serverName)
throws ManagementException
getTomcatRealmItems in interface IBaseManagementManagementException
public ObjectName getTomcatRealm(String domainName,
String serverName)
throws ManagementException
IBaseManagement
getTomcatRealm in interface IBaseManagementdomainName - the domain's nameserverName - the server's name
ManagementException
protected void addRealmItem(ArrayList p_Realms,
String p_Type,
String p_SecurityRealmUsed,
String domainName,
String serverName)
throws Exception
RealmItem in the list.
p_Realms - List to add found itemsp_Type - Type item to add (memory or datasource or ldap)p_SecurityRealmUsed - Name of realm used by the security service
or null if nothing used
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||