|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.lib.management.extensions.base.AdminJmxHelper
public class AdminJmxHelper
Jmx helper for administration.
Field Summary | |
---|---|
protected static String |
AppClientModule
Constant for client module. |
protected static String |
EJBModule
Constant for ejb module. |
protected static String |
J2EEApplication
J2ee application constant. |
protected static String |
ResourceAdapterModule
Constant for rar module. |
protected static Object |
s_Synchro
Object used for synchronization. |
protected static String |
WebModule
Constant for web module. |
Constructor Summary | |
---|---|
protected |
AdminJmxHelper()
Default constructor. |
Method Summary | |
---|---|
static String |
extractFilename(String p_Path)
Extract the filename of complete path. |
static String |
extractValueMbeanName(String pName,
String pMBeanName)
Extract the value of a key property from the MBean name. |
static String |
findDeployedPath(ArrayList<String> filesDeployed,
String resourceName)
|
static String |
findSecurityFactorySubType(String p_NameFactory,
String domainName,
String serverName)
Return the SubType of a Security Factory in the current server. |
static ObjectName |
getArchiveConfigObjectName(String domainName,
String serverName)
Object name of archive configuration. |
static String |
getConnectionUrl(String remoteServerName,
String domainName,
String serverName)
Gives the JMX connection Url used in the domain to connect to a remote server. |
static ArrayList |
getDatasourceDependences(String pDatasourceName,
String domainName,
String serverName)
Return the list of Datasource dependences for a given datasource name in the current server. |
static ArrayList |
getDatasourceFilesDeployable(String domainName,
String serverName)
Return the list of Datasource properties files ready to deploy in the current server. |
static ArrayList |
getDatasourceFilesDeployed(String domainName,
String serverName)
Return the list of deployed Datasources in the current server. |
static ArrayList<String> |
getDeployed(ArrayList<String> filesDeployed)
Transform file names with absolute path on mave2 repositories to module (resource) names. |
static String[] |
getDepmonitorDirs(String domainName,
String serverName)
Get the deployment repositories from 'depmonitor' MBean. |
static ArrayList |
getEarFilesDeployable(String domainName,
String serverName)
Return the list of EAR filename ready to deploy in the current server. |
static ArrayList |
getEarFilesDeployed(String domainName,
String serverName)
Return the list of deployed EAR filename in the current server. |
static ArrayList[] |
getFamiliesMbeansLists(String serverName)
Create a list for each family of Mbean. |
static ArrayList |
getFilesDeployable(String domainName,
String serverName)
|
static ArrayList |
getFilesDeployed(String domainName,
String serverName)
Return the list of deployed filename in the current server. |
static ObjectName |
getFirstMbean(ObjectName p_On,
String serverName)
Return the first ObjectName Mbean gotten by the query
in the current MbeanServer. |
static String |
getFirstMBeanName(ObjectName p_On,
String serverName)
Return the first MBean name found by the query in the current MBeanServer. |
static ArrayList |
getGroups(String domainName,
String p_Resource,
String serverName)
Return the list of all groups in a resource. |
static ObjectName |
getJ2eeServerObjectName(String serverName)
Return the ObjectName corresponding to the J2EEServer managed object registered in the current MBeanServer. |
static ObjectName |
getJ2eeServerObjectName(String p_DomainName,
String serverName)
Return the ObjectName corresponding to the J2EEServer managed object registered in the current MBeanServer and belonging to a domain. |
static ArrayList |
getJarFilesDeployable(String domainName,
String serverName)
Return the list of JAR filename ready to deploy in the current server. |
static ArrayList |
getJarFilesDeployed(String domainName,
String serverName)
Return the list of deployed JAR filename in the current server. |
static List |
getListMbean(ObjectName p_On,
String serverName)
Return the list of ObjectName Mbean gotten by the query
in the current MbeanServer. |
static List |
getListMBeanName(ObjectName p_On,
String serverName)
Return the list of Mbean name gotten by the query in the current MbeanServer. |
static ArrayList |
getMailFactoryDependences(String p_MailFactoryName,
AdminHelper p_AdminHelper)
Return the list of Mail factory dependences in the current server for a given factory name. |
static ArrayList |
getMailFilesDeployable(String domainName,
String serverName)
Return the list of Mail factory files ready to deploy in the current server. |
static ArrayList |
getMailFilesDeployed(AdminHelper p_AdminHelper)
Return the list of deployed Mail factories in the current server. |
static ArrayList |
getMbeansLists(String serverName)
Create a list for each family of Mbean. |
static ArrayList |
getMimeMailPartFactoriesDeployed(AdminHelper p_AdminHelper)
Return the list of deployed MimePartDatasource Mail Factories in the current server. |
static ArrayList |
getMimePartMailFilesDeployable(String domainName,
String serverName)
Return the list of MimePartDataSource Mail factory files ready to deploy in the current server. |
static ArrayList |
getMimePartMailFilesDeployed(AdminHelper p_AdminHelper)
Return the list of deployed MimePartDataSource Mail factories in the current server. |
static ArrayList |
getQueuesList(String domainName,
String serverName)
Return the Queue destinations list. |
static ObjectName |
getRarConfigObjectName(String domainName,
String serverName)
Object name of rar configuration. |
static ArrayList |
getRarFilesDeployable(String domainName,
String serverName)
Return the list of RAR filename ready to deploy in the current server. |
static ArrayList |
getRarFilesDeployed(String domainName,
String serverName)
Return the list of deployed RAR filename in the current server. |
static String[] |
getRepositoryDirs(String domainName,
String serverName)
Get the deployment repositories from 'repository' MBean. |
static ArrayList |
getRoles(String domainName,
String p_Resource,
String serverName)
Return the list of all roles in a resource. |
static ArrayList |
getSecurityDatasourceFactories(String domainName,
String serverName)
Return the list of Security Datasource Factories in the current server. |
static ArrayList |
getSecurityLdapFactories(String domainName,
String serverName)
Return the list of Security Ldap Factories in the current server. |
static ArrayList |
getSecurityMemoryFactories(String domainName,
String serverName)
Return the list of Security Memory Factories in the current server. |
static ArrayList |
getSessionMailFactoriesDeployed(AdminHelper p_AdminHelper)
Return the list of deployed Session Mail Factories in the current server. |
static ArrayList |
getSessionMailFilesDeployable(String domainName,
String serverName)
Return the list of Session Mail factory files ready to deploy in the current server. |
static ArrayList |
getSessionMailFilesDeployed(AdminHelper p_AdminHelper)
Return the list of deployed Session Mail factories in the current server. |
static ObjectName |
getTomcatSecurityRealm(String domainName,
String serverName)
Return the ObjectName corresponding to the J2EEServer managed object registered in the current MBeanServer. |
static ArrayList<RealmItem> |
getTomcatSecurityRealms(String usedRealmName,
String domainName,
String serverName)
|
static ArrayList |
getTopicsList(String domainName,
String serverName)
Return the Topic destinations list. |
static Map |
getTotalEJB(ObjectName moduleOn)
Get the total number of EJBs in a EJBModule |
static Map |
getTotalEJB(String domainName,
String serverName)
Get the total number of EJBs in a server |
static int |
getTotalNbStatefulSessionBeans(String domainName,
String serverName)
Get all StatefulSessionBeans in a server |
static ArrayList |
getUsers(String domainName,
String p_Resource,
String serverName)
Return the list of all users in a resource. |
static ArrayList |
getWarFilesDeployable(String domainName,
String serverName)
Return the list of WAR filename ready to deploy in the current server. |
static ArrayList |
getWarFilesDeployed(String domainName,
String serverName)
Return the list of deployed WAR filename in the current server. |
static boolean |
hasMBeanName(ObjectName p_On,
String serverName)
Verify if the Mbean gotten by the query in the current MbeanServer exists. |
static boolean |
isAppClientModule(ObjectName pObjectName)
|
static boolean |
isDepmonitorDir(String dir,
String domainName,
String serverName)
Check with 'depmonitor' MBean if a given directory is a depmonitor directory |
static boolean |
isEJBModule(ObjectName pObjectName)
|
static boolean |
isJ2EEApplication(ObjectName pObjectName)
|
static boolean |
isResourceAdapterModule(ObjectName pObjectName)
|
static boolean |
isWebModule(ObjectName pObjectName)
|
static ArrayList |
prepareContainersToDisplay(ArrayList p_Containers,
String p_ContainerDir,
String p_EarDir)
Prepare a list of containers to diplay. |
static String |
replace(String template,
String placeholder,
String value)
Replace any occurrence of the specified placeholder in the specified template string with the specified replacement value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Object s_Synchro
protected static final String J2EEApplication
protected static final String AppClientModule
protected static final String EJBModule
protected static final String WebModule
protected static final String ResourceAdapterModule
Constructor Detail |
---|
protected AdminJmxHelper()
Method Detail |
---|
public static String replace(String template, String placeholder, String value)
template
- Pattern string possibly containing the placeholderplaceholder
- Placeholder expression to be replacedvalue
- Replacement value for the placeholder
public static ObjectName getArchiveConfigObjectName(String domainName, String serverName)
domainName
- The domain nameserverName
- The server name
public static ObjectName getRarConfigObjectName(String domainName, String serverName)
domainName
- The domain nameserverName
- The server name
public static ObjectName getJ2eeServerObjectName(String p_DomainName, String serverName) throws ManagementException
p_DomainName
- The name of the management domain.
j2eeType
key property equal to J2EEServer
)
ManagementException
- if could not connect to the MBean serverpublic static ObjectName getJ2eeServerObjectName(String serverName)
j2eeType
key property equal to J2EEServer
)public static boolean isJ2EEApplication(ObjectName pObjectName)
pObjectName
- The objectName
public static boolean isAppClientModule(ObjectName pObjectName)
pObjectName
- The objectName
public static boolean isEJBModule(ObjectName pObjectName)
pObjectName
- The objectName.
public static boolean isWebModule(ObjectName pObjectName)
pObjectName
- The objectName.
public static boolean isResourceAdapterModule(ObjectName pObjectName)
pObjectName
- true if ejb module.
public static boolean hasMBeanName(ObjectName p_On, String serverName) throws ManagementException
p_On
- Query Mbean name to search
ManagementException
public static String getFirstMBeanName(ObjectName p_On, String serverName) throws ManagementException
p_On
- Query MBean name to search
ManagementException
public static List getListMBeanName(ObjectName p_On, String serverName)
p_On
- Query Mbean name to search
public static ObjectName getFirstMbean(ObjectName p_On, String serverName) throws ManagementException
ObjectName
Mbean gotten by the query
in the current MbeanServer.
p_On
- Query Mbean name to search
ObjectName
or null if not found
ManagementException
public static List getListMbean(ObjectName p_On, String serverName) throws ManagementException
ObjectName
Mbean gotten by the query
in the current MbeanServer.
p_On
- Query Mbeans to search
ObjectName
ManagementException
public static String extractValueMbeanName(String pName, String pMBeanName)
pName
- Name of the key propertypMBeanName
- Stringified ObjectName
public static String extractFilename(String p_Path)
p_Path
- Complete path (directory and filename)
public static boolean isDepmonitorDir(String dir, String domainName, String serverName) throws ManagementException
dir
- the name of the given directorydomainName
- current domain nameserverName
- current server name
ManagementException
public static String[] getDepmonitorDirs(String domainName, String serverName) throws ManagementException
domainName
- serverName
-
ManagementException
public static String[] getRepositoryDirs(String domainName, String serverName) throws ManagementException
domainName
- serverName
-
ManagementException
public static ArrayList getFilesDeployable(String domainName, String serverName) throws ManagementException
domainName
- the domainserverName
- the server
ManagementException
- any.public static ArrayList getJarFilesDeployable(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList getJarFilesDeployed(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList getEarFilesDeployable(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList getWarFilesDeployable(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList getRarFilesDeployable(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList getWarFilesDeployed(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList getEarFilesDeployed(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList getRarFilesDeployed(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList getFilesDeployed(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList prepareContainersToDisplay(ArrayList p_Containers, String p_ContainerDir, String p_EarDir)
p_Containers
- The list of containersp_ContainerDir
- The root container directoryp_EarDir
- The root ear directory or null
public static ArrayList getMailFilesDeployable(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList getMimePartMailFilesDeployable(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList getSessionMailFilesDeployable(String domainName, String serverName) throws ManagementException
ManagementException
- any.public static ArrayList getMimePartMailFilesDeployed(AdminHelper p_AdminHelper) throws ManagementException
p_AdminHelper
- The container AdminHelper
ManagementException
- any.public static ArrayList<String> getDeployed(ArrayList<String> filesDeployed)
filesDeployed
- list of file names
public static String findDeployedPath(ArrayList<String> filesDeployed, String resourceName)
public static ArrayList getSessionMailFilesDeployed(AdminHelper p_AdminHelper) throws ManagementException
p_AdminHelper
- The container AdminHelper
ManagementException
- any.public static ArrayList getMailFilesDeployed(AdminHelper p_AdminHelper) throws ManagementException
p_AdminHelper
- The container AdminHelper
ManagementException
- any.public static ArrayList getDatasourceFilesDeployable(String domainName, String serverName) throws ManagementException
ManagementException
- Could not get management info from the MBeanServerpublic static ArrayList getDatasourceFilesDeployed(String domainName, String serverName) throws ManagementException
domainName
- Current domain nameserverName
- Current server name
ManagementException
- Could not get management info from the MBeanServerpublic static ArrayList getDatasourceDependences(String pDatasourceName, String domainName, String serverName) throws ManagementException
pDatasourceName
- The name of the datasourcedomainName
- Current domain nameserverName
- Current server name
ManagementException
- Could not get management info from the MBeanServer
MalformedObjectNameException
- any.public static ArrayList getMailFactoryDependences(String p_MailFactoryName, AdminHelper p_AdminHelper) throws ManagementException
p_MailFactoryName
- The name of the mail factoryp_AdminHelper
- The container AdminHelper
ManagementException
- any.public static ArrayList getSessionMailFactoriesDeployed(AdminHelper p_AdminHelper) throws ManagementException
p_AdminHelper
- The container AdminHelper
ManagementException
- any.public static ArrayList getMimeMailPartFactoriesDeployed(AdminHelper p_AdminHelper) throws ManagementException
p_AdminHelper
- The container AdminHelper
ManagementException
- any.public static ObjectName getTomcatSecurityRealm(String domainName, String serverName) throws MalformedObjectNameException
j2eeType
key property equal to J2EEServer
)
MalformedObjectNameException
public static ArrayList<RealmItem> getTomcatSecurityRealms(String usedRealmName, String domainName, String serverName) throws MalformedObjectNameException
MalformedObjectNameException
public static ArrayList getSecurityMemoryFactories(String domainName, String serverName) throws MalformedObjectNameException
MalformedObjectNameException
- any.public static ArrayList getSecurityDatasourceFactories(String domainName, String serverName) throws MalformedObjectNameException
MalformedObjectNameException
- any.public static ArrayList getSecurityLdapFactories(String domainName, String serverName) throws MalformedObjectNameException
MalformedObjectNameException
- any.public static String findSecurityFactorySubType(String p_NameFactory, String domainName, String serverName) throws MalformedObjectNameException
p_NameFactory
- The factory name to find
ManagementException
- any.
MalformedObjectNameException
- if the objectName is malformedpublic static ArrayList getUsers(String domainName, String p_Resource, String serverName) throws ManagementException, MalformedObjectNameException
domainName
- the domain namep_Resource
- The resource
ManagementException
- any.
MalformedObjectNameException
- if the objectName is malformedpublic static ArrayList getRoles(String domainName, String p_Resource, String serverName) throws ManagementException, MalformedObjectNameException
domainName
- the domain namep_Resource
- The resource
ManagementException
- any.
MalformedObjectNameException
- if the objectName is malformedpublic static ArrayList getGroups(String domainName, String p_Resource, String serverName) throws ManagementException, MalformedObjectNameException
domainName
- the domain namep_Resource
- The resource
ManagementException
- any.
MalformedObjectNameException
- if the objectName is malformedpublic static ArrayList getQueuesList(String domainName, String serverName)
public static ArrayList getTopicsList(String domainName, String serverName)
public static ArrayList getMbeansLists(String serverName) throws ManagementException
ManagementException
public static ArrayList[] getFamiliesMbeansLists(String serverName) throws ManagementException
ManagementException
public static int getTotalNbStatefulSessionBeans(String domainName, String serverName)
serverName
- the server name
public static Map getTotalEJB(String domainName, String serverName)
serverName
- the server namedomainName
- the domain name
public static Map getTotalEJB(ObjectName moduleOn)
moduleOn
- the EJBModule's ObjectName
public static String getConnectionUrl(String remoteServerName, String domainName, String serverName) throws MalformedObjectNameException
remoteServerName
- name of the remote serverdomainName
- domain nameserverName
- local server name
MalformedObjectNameException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |