FileDocCategorySizeDatePackage
ObjectNames.javaAPI DocGlassfish v2 API43461Fri May 04 22:33:16 BST 2007com.sun.enterprise.admin.common

ObjectNames

public class ObjectNames extends Object
A convenience class to create the object names of various MBeans that are of interest. Note that all the Object Names will be created in domain with name "ias", unless specified otherwise. Clients of this class need not worry of details of creating valid Object Names.

Note that if any of the methods of this class returns a null Object Name, then it implies that the input parameters specified were not valid.

author
Kedar Mhaswade
version
1.0

Fields Summary
public static final String
kDefaultIASDomainName
public static final char
kWildcardChar
public static final char
kDomainNameSeparatorChar
public static final char
kPropertySeparatorChar
public static final char
kNameValueSeparatorChar
public static final char
kSingleMatchChar
public static final String
kDomainNameInvalidatorString
public static final String
kTypeKeyName
public static final String
kNameKeyName
public static final String
kGroupIdKeyName
public static final String
kCategoryKeyName
public static final String
kClassIdKeyName
public static final String
kServerIdKeyName
public static final String
kDeployment
public static final String
kModuleTypeKeyName
public static final String
kServerInstanceKeyName
public static final String
kApplicationNameKeyName
public static final String
kModuleNameKeyName
public static final String
kController
public static final String
kConfig
public static final String
kServer
public static final String
kGenericConfigurator
public static final String
kSystemServices
public static final String
kServerInstance
public static final String
kApplication
public static final String
kModule
public static final String
kJMSAdminHandler
public static final String
kLogService
public static final String
kComponentKeyName
public static final String
kOrbType
public static final String
kOrbListenerType
public static final String
kHTTPServiceType
public static final String
kHTTPListenerType
public static final String
kHTTPListenerIdKeyName
public static final String
kSecurityServiceType
public static final String
kVirtualServerClassType
public static final String
kVirtualServerClassDefaultName
public static final String
kVirtualServerClassIdKeyName
public static final String
kVirtualServerType
public static final String
kVirtualServerIdKeyName
public static final String
kMimeType
public static final String
kMimeIdKeyName
public static final String
kAclType
public static final String
kAclIdKeyName
public static final String
kAuthDbType
public static final String
kAuthDbIdKeyName
public static final String
kAuthRealmType
public static final String
kHTTPQosType
public static final String
kJdbcConnectionPoolType
public static final String
kJdbcResourceType
public static final String
kMailResourceType
public static final String
kJmsResourceType
public static final String
kJndiResourceType
public static final String
kCustomResourceType
public static final String
kPersistenceManagerFactoryResourceType
public static final String
kWebContainer
public static final String
kEjbContainer
public static final String
kMdbContainer
public static final String
kJtsComponent
public static final String
kJvmType
public static final String
kEjbModule
public static final String
kWebModule
public static final String
kStandaloneEjbModule
public static final String
kStandaloneWebModule
public static final String
kConnectorModule
public static final String
kLifecycleModule
public static final String
kEjbType
public static final String
kServletType
public static final String
kMonitoringType
public static final String
kMonitoringClassName
public static final String
kMonitoringRootClass
public static final String
kProfiler
public static final String
kConfigCategory
public static final String
kCategoryConfig
private static final ObjectName
HADB_CONFIG_OBJECT_NAME
public static final String
kDottedNameDomainName
ObjectNames for the MBeans supporting dotted names-- registry -- associates dotted names with ObjectNames resolver -- resolves a dotted name to an ObjectName get-set -- supports the get/set/list commands within CLI
public static final String
kDottedNameType
public static final String
kDottedNameRegistryNameKeyName
public static final String
kDottedNameMonitoringRegistryNameKeyName
public static final String
kDottedNameGetSetNameKeyName
private static final String
USE_DEPLOYMENT_MBEAN
System property name used to toggle between DeploymentMBean and ManagedServerInstance. Just Temporary till DeplMBean is tested. will be removed and DeploymentMBean will remain
Constructors Summary
private ObjectNames()
Making the only default constructor private.

    
                          
     
    
    
Methods Summary
public static javax.management.ObjectNamegetAclObjectName(java.lang.String instanceName, java.lang.String id)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kAclType, id, 
                             instanceName}));
    
public static javax.management.ObjectNamegetAllObjectNamesPattern()

        String name = kDefaultIASDomainName + kDomainNameSeparatorChar + kWildcardChar;
        try
        {
           return new ObjectName(name);
        }
        catch (Exception e)
        {
            return null;
        }
    
public static javax.management.ObjectNamegetApplicationObjectName(java.lang.String instanceName, java.lang.String appName)
Returns the ObjectName of MBean that represents a managed J2EE application, with given name and deployed to given Server Instance.

param
instanceName String representing name of holding Server Instance.
param
appName String representing the name of application.
return
ObjectName of Application MBean or null if input is invalid.

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, 
                             kServerInstanceKeyName},
                new String[]{kApplication, appName, instanceName}) );
    
public static javax.management.ObjectNamegetApplicationObjectNamePattern(java.lang.String instanceName)
Returns a patterned ObjectName that can be used to query the MBeanServer for all the application mbeans that match this pattern. This method uses the default domain to construct the ObjectName. For example given an instance name "ias1" this method should return an ObjectName with pattern - "ias:type=application,instance-name=ias1,*"

param
instanceName The name of the instance for which the application pattern name will be generated.
throws
IllegalArgumentException if the inastanceName is null or of 0 length.
return
Returns a valid ObjectName or null if unable to construct an ObjectName.

        ObjectName pattern = null;
        ObjectName tmp = getObjectName(kDefaultIASDomainName,
        new String[] {kTypeKeyName, kServerInstanceKeyName},
        new String[] {kApplication, instanceName});
        if (tmp != null)
        {
            String strPattern = tmp.toString() + kPropertySeparatorChar;
            strPattern += kWildcardChar;
            try
            {
                pattern = new ObjectName(strPattern);
            }
            catch (MalformedObjectNameException mfone)
            {
                Debug.printStackTrace(mfone);
                pattern = null;
            }
        }
        return pattern;
    
public static javax.management.ObjectNamegetAuthRealmObjectName(java.lang.String instanceName, java.lang.String realmName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kServerInstanceKeyName, 
                             kNameKeyName},
                new String[]{kAuthRealmType, instanceName, realmName}));
    
public static javax.management.ObjectNamegetConnectorModuleObjectName(java.lang.String instanceName, java.lang.String moduleName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName,  
                             kServerInstanceKeyName, kModuleTypeKeyName},
                new String[]{kModule, moduleName, instanceName, 
                             kConnectorModule}) );
    
public static javax.management.ObjectNamegetConnectorModuleObjectName(java.lang.String instanceName, java.lang.String moduleName, java.lang.String applicationName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, 
                             kServerInstanceKeyName, kModuleTypeKeyName, 
                             kApplicationNameKeyName},
                new String[]{kModule, moduleName, instanceName, 
                             kConnectorModule, applicationName}) );
    
public static javax.management.ObjectNamegetControllerObjectName()
Returns the ObjectName of MBean representing Server Controller. This is the Object Name of the entity that makes all Server side entities manageable.

return
controller's ObjectName or null if something went wrong.

        return ( getObjectName(kDefaultIASDomainName,
                new String[]{kTypeKeyName},
                new String[]{kController}) );
    
public static javax.management.ObjectNamegetCustomResourceObjectName(java.lang.String instanceName, java.lang.String jndiName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName, 
                             kNameKeyName},
                new String[]{kCustomResourceType, instanceName, jndiName}));
    
public static javax.management.ObjectNamegetDeploymentServiceObjectName(java.lang.String instanceName)
Returns objectName of the mbean representing deployment interface

param
instanceName name of the instance to which this mbean belongs to
return
objectName of deploymentMBean

   
                                 
        
    
        if(System.getProperty(USE_DEPLOYMENT_MBEAN,"false").equals("true"))
        { 
             return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kServerInstanceKeyName},
                new String[]{kDeployment, instanceName}));
        }
        else {
            return getServerInstanceObjectName(instanceName);
        }
    
public static javax.management.ObjectNamegetDottedNameGetSetObjectName()

    	return( getDottedNameObjectName( kDottedNameGetSetNameKeyName ) );
    
public static javax.management.ObjectNamegetDottedNameMonitoringRegistryObjectName()

    	return( getDottedNameObjectName( kDottedNameMonitoringRegistryNameKeyName ) );
    
private static javax.management.ObjectNamegetDottedNameObjectName(java.lang.String name)

    
	       
	
		return( getObjectName( kDottedNameDomainName,
				new String []	{ kNameKeyName, kTypeKeyName },
				new String []	{ name,			kDottedNameType }  )
				);
	
public static javax.management.ObjectNamegetDottedNameRegistryObjectName()

    	return( getDottedNameObjectName( kDottedNameRegistryNameKeyName ) );
    
public static javax.management.ObjectNamegetEjbContainerObjectName(java.lang.String instanceName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kEjbContainer, instanceName}));
    
public static javax.management.ObjectNamegetEjbModuleObjectName(java.lang.String instanceName, java.lang.String moduleName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, 
                             kServerInstanceKeyName, kModuleTypeKeyName},
                new String[]{kModule, moduleName, instanceName, kEjbModule}) );
    
public static javax.management.ObjectNamegetEjbModuleObjectName(java.lang.String instanceName, java.lang.String moduleName, java.lang.String applicationName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, 
                             kServerInstanceKeyName, kModuleTypeKeyName, 
                             kApplicationNameKeyName},
                new String[]{kModule, moduleName, instanceName, kEjbModule, 
                             applicationName}) );
    
public static javax.management.ObjectNamegetEjbObjectName(java.lang.String instanceName, java.lang.String moduleName, java.lang.String ejbName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, kModuleNameKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kEjbType, ejbName, moduleName, instanceName}));
    
public static javax.management.ObjectNamegetEjbObjectName(java.lang.String instanceName, java.lang.String appName, java.lang.String moduleName, java.lang.String ejbName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, kModuleNameKeyName, 
                             kApplicationNameKeyName, kServerInstanceKeyName}, 
                new String[]{kEjbType, ejbName, moduleName, appName, 
                             instanceName}));
    
public static javax.management.ObjectNamegetGenericConfiguratorObjectName()
Returns the ObjectName of Generic Configurator.

        return ( getObjectName(kDefaultIASDomainName,
                new String[]{kTypeKeyName},
                new String[]{kGenericConfigurator}) );
    
public static javax.management.ObjectNamegetHADBConfigObjectName()

            
              return HADB_CONFIG_OBJECT_NAME; 
public static javax.management.ObjectNamegetHttpListenerObjectName(java.lang.String instanceName, java.lang.String id)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kHTTPListenerType, id, instanceName}));
    
public static javax.management.ObjectNamegetHttpServiceObjectName(java.lang.String instanceName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kServerInstanceKeyName}, 
                new String[]{kHTTPServiceType, instanceName}));
    
public static javax.management.ObjectNamegetIiopListenerObjectName(java.lang.String instanceName, java.lang.String listenerId)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName, 
                             kNameKeyName},
                new String[]{kOrbListenerType, instanceName, listenerId}));
    
public static javax.management.ObjectNamegetJDBCConnectionPoolObjectName(java.lang.String instanceName, java.lang.String poolName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName, 
                             kNameKeyName},
                new String[]{kJdbcConnectionPoolType, instanceName, poolName}));
    
public static javax.management.ObjectNamegetJDBCResourceObjectName(java.lang.String instanceName, java.lang.String jndiName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName, 
                             kNameKeyName},
                new String[]{kJdbcResourceType, instanceName, jndiName}));
    
public static javax.management.ObjectNamegetJMSAdminHandlerObjectName(java.lang.String instanceName)
Returns the ObjectName of MBean representing JMS Admin handler. This is the Object Name of the entity that does all JMS related admin tasks.

return
JMSAdminHandler's ObjectName or null if something went wrong.

        return ( getObjectName(kDefaultIASDomainName,
                new String[]{kTypeKeyName, kServerInstanceKeyName},
                new String[]{kJMSAdminHandler, instanceName}) );
    
public static javax.management.ObjectNamegetJMSAdminHandlerObjectName()

        Debug.println("This method is deprecated. Use the overloaded method" + 
                      " instead.", Debug.LOW);
        return ( getObjectName(kDefaultIASDomainName,
                new String[]{kTypeKeyName},
                new String[]{kJMSAdminHandler}) );
    
public static javax.management.ObjectNamegetJMSResourceObjectName(java.lang.String instanceName, java.lang.String jndiName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName, 
                             kNameKeyName},
                new String[]{kJmsResourceType, instanceName, jndiName}));
    
public static javax.management.ObjectNamegetJNDIResourceObjectName(java.lang.String instanceName, java.lang.String jndiName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName, 
                             kNameKeyName},
                new String[]{kJndiResourceType, instanceName, jndiName}));
    
public static javax.management.ObjectNamegetJTSComponentObjectName(java.lang.String instanceName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kJtsComponent, instanceName}));
    
public static javax.management.ObjectNamegetJVMComponentObjectName(java.lang.String instanceName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[] {kTypeKeyName, 
                              kServerInstanceKeyName}, 
                new String[] {kJvmType, instanceName}));
    
public static javax.management.ObjectNamegetLifeCycleModuleObjectName(java.lang.String instanceName, java.lang.String name)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kLifecycleModule, name, 
                             instanceName}));
    
public static javax.management.ObjectNamegetLogServiceObjectName(java.lang.String instanceName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kLogService, instanceName}));
    
public static javax.management.ObjectNamegetMailResourceObjectName(java.lang.String instanceName, java.lang.String jndiName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName, 
                             kNameKeyName},
                new String[]{kMailResourceType, instanceName, jndiName}));
    
public static javax.management.ObjectNamegetMdbContainerObjectName(java.lang.String instanceName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kMdbContainer, instanceName}));
    
public static javax.management.ObjectNamegetMimeObjectName(java.lang.String instanceName, java.lang.String id)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kMimeType, id, 
                             instanceName}));
    
public static javax.management.ObjectNamegetModuleObjectName(java.lang.String instanceName, java.lang.String appName, java.lang.String moduleName)
Returns the ObjectName of MBean that represents a managed J2EE module, with given name and deployed to given Server Instance as a part of given application ( not a standalone module).

param
instanceName String representing name of holding Server Instance.
param
appName String representing the name of enveloping application.
param
moduleName name of the module.
return
ObjectName of Application MBean or null if input is invalid.

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, kApplicationNameKeyName, 
                             kServerInstanceKeyName},
                new String[]{kModule, moduleName, appName, instanceName}) );
    
public static javax.management.ObjectNamegetModuleObjectName(java.lang.String instanceName, java.lang.String moduleName)
Returns the ObjectName of MBean that represents a managed J2EE module, with given name and deployed to given Server Instance as a standalone module . Note that this is an overloaded method.

param
instanceName String representing name of holding Server Instance.
param
moduleName name of the module.
return
ObjectName of Application MBean or null if input is invalid.

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, kServerInstanceKeyName},
                new String[]{kModule, moduleName, instanceName}) );
    
public static javax.management.ObjectNamegetModuleObjectNamePattern(java.lang.String instanceName, java.lang.String appName)

        ObjectName pattern = null;

        ObjectName tmp = getObjectName(kDefaultIASDomainName,
            new String[] {kTypeKeyName, kServerInstanceKeyName, 
                kApplicationNameKeyName},
            new String[] {kModule, instanceName, appName});

        if (tmp != null)
        {
            String strPattern = tmp.toString() + kPropertySeparatorChar;
            strPattern += kWildcardChar;
            try
            {
                pattern = new ObjectName(strPattern);
            }
            catch (MalformedObjectNameException mfone)
            {
                pattern = null;
            }
        }
        return pattern;
    
public static javax.management.ObjectNamegetModuleObjectNamePattern(java.lang.String instanceName)

        ObjectName pattern = null;
        ObjectName tmp = getObjectName(kDefaultIASDomainName,
        new String[] {kTypeKeyName, kServerInstanceKeyName},
        new String[] {kModule, instanceName});
        if (tmp != null)
        {
            try
            {
                String strPattern = tmp.toString() + kPropertySeparatorChar;
                strPattern += kWildcardChar;
                pattern = new ObjectName(strPattern);
            }
            catch (MalformedObjectNameException mfone)
            {
                pattern = null;
                Debug.printStackTrace(mfone);
            }
        }
        return pattern;
    
public static javax.management.ObjectNamegetORBObjectName(java.lang.String instanceName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kServerInstanceKeyName},
                new String[]{kOrbType, instanceName}));
    
public static javax.management.ObjectNamegetObjectName(java.lang.String domainName, java.lang.String[] keyNames, java.lang.String[] keyValues)
A generic method to create the Object Name of an MBean in given domain with specified arrays of Property Names-Values.

param
domainName String representing the name of domain. May not be null. May not contain any DomainInvalidator characters.
param
keyNames Array of Strings representing the Property Key Names.
param
keyValues Array of Strings representing the Property Key Values. None of the names, values (and arrays themseleves) may be null.
return
valid ObjectName with given params, null if there is any error.

        ObjectName validObjectName = null;

        try
        {
            if (domainName                      == null	||
                !isDomainNameValid(domainName)          ||
                keyNames                        == null ||
                keyValues                       == null ||
                keyNames.length < 1                     ||
                keyNames.length != keyValues.length)
            {
                throw new IllegalArgumentException();
            }
            StringBuffer nameBuffer = new StringBuffer();
            nameBuffer.append(domainName);
            nameBuffer.append(kDomainNameSeparatorChar);
            for (int i = 0 ; i < keyNames.length ; i++)
            {
                if (keyNames[i] == null || keyValues[i] == null)
                {
                    throw new IllegalArgumentException();
                }
                nameBuffer.append(keyNames[i]);
                nameBuffer.append(kNameValueSeparatorChar);
                nameBuffer.append(keyValues[i]);
                if (i != (keyNames.length-1))
                {
                    nameBuffer.append(kPropertySeparatorChar);
                }
            }
            validObjectName = new ObjectName(nameBuffer.toString());
        }
        catch(Exception e)
        {
            Debug.printStackTrace(e);
        }
        return ( validObjectName );
    
public static javax.management.ObjectNamegetPerInstanceSystemServicesObjectName(java.lang.String instanceId)
Returns the ObjectName of the system services MBean that would be available in a given server instance name.

param
instanceId String representing the id of instance - may not be null
return
the ObjectName of such an MBean

         final ObjectName on = getObjectName(kDefaultIASDomainName,
                new String[]{kTypeKeyName, kServerIdKeyName},
                new String[]{kSystemServices, instanceId}) ;
         //System.out.println("[[DELETE]] Getting the System Services MBean ObjectName for instance: " + instanceId + ", and it is: " + on.toString());
         return ( on );
    
public static javax.management.ObjectNamegetPersistenceManagerFactoryResourceObjectName(java.lang.String instanceName, java.lang.String jndiName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName, 
                             kNameKeyName},
                new String[]{kPersistenceManagerFactoryResourceType, 
                             instanceName, jndiName}));
    
public static javax.management.ObjectNamegetProfilerObjectName(java.lang.String instanceName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kServerInstanceKeyName},
                new String[]{kProfiler, instanceName}));
    
public static javax.management.ObjectNamegetRootMonitorMBeanName(java.lang.String instanceName)
Get ObjectName for root monitoring mBean.

param
instanceName name of the server instance
return
jmx ObjectName for root monitoring MBean

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kMonitoringClassName,
                             kServerInstanceKeyName, kNameKeyName},
                new String[]{kMonitoringType, kMonitoringRootClass,
                             instanceName, kMonitoringRootClass}));
    
public static javax.management.ObjectNamegetSecurityServiceObjectName(java.lang.String instanceName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kSecurityServiceType, instanceName}));
    
public static javax.management.ObjectNamegetServerInstanceObjectName(java.lang.String instanceName)
Returns ObjectName of MBean that represents a managed Server Instance, with given name.

param
instanceName String representing name of the Server Instance.
return
ObjectName of Server Instance MBean or null if input is invalid.

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName},
                new String[]{kServerInstance, instanceName}) );
    
public static javax.management.ObjectNamegetServerInstanceObjectNamePattern()

        ObjectName pattern = null;
        ObjectName tmp = getObjectName(kDefaultIASDomainName, 
        new String[] {kTypeKeyName}, new String[] {kServerInstance});
        if (tmp != null)
        {
            String strPattern = tmp.toString() + kPropertySeparatorChar;
            strPattern += kWildcardChar;
            try
            {
                pattern = new ObjectName(strPattern);
            }
            catch (MalformedObjectNameException mfone)
            {
                pattern = null;
                Debug.printStackTrace(mfone);
            }
        }
        return pattern;
    
public static javax.management.ObjectNamegetServerObjectName(java.lang.String serverName)
Returns the ObjectName of MBean representing a element.

return
element's ObjectName, or null

		return ( getObjectName(kDefaultIASDomainName,
			new String[]{kTypeKeyName, kNameKeyName, kCategoryKeyName},
			new String[]{kServer, serverName, kConfig}) );
	
public static javax.management.ObjectNamegetServletObjectName(java.lang.String instanceName, java.lang.String moduleName, java.lang.String servletName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, kModuleNameKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kServletType, servletName, moduleName, 
                             instanceName}));
    
public static javax.management.ObjectNamegetServletObjectName(java.lang.String instanceName, java.lang.String appName, java.lang.String moduleName, java.lang.String servletName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, kModuleNameKeyName, 
                             kApplicationNameKeyName, kServerInstanceKeyName}, 
                new String[]{kServletType, servletName, moduleName, appName, 
                             instanceName}));
    
public static javax.management.ObjectNamegetSystemServicesObjectName()
Gets the System Service MBean Object Name in the Admin Server aka DAS. This method has been deprecated. Use #getPerInstanceSystemServicesObjectName instead.

deprecated
return
the ObjectName of MBean responsible for System Services in the DAS. The MBean returned has the ObjectName of the form

com.sun.appserv:type=system-services,server=server

This is because the server-id of admin server (DAS) is "server".

see
SystemPropertyConstants

        return ( getPerInstanceSystemServicesObjectName(SystemPropertyConstants.DEFAULT_SERVER_INSTANCE_NAME) );
    
public static javax.management.ObjectNamegetVirtualServerAuthDBObjectName(java.lang.String instanceName, java.lang.String virtualServerClassId, java.lang.String virtualServerId, java.lang.String authDBId)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kNameKeyName, 
                             kVirtualServerIdKeyName, 
                             kVirtualServerClassIdKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kAuthDbType, 
                             authDBId, 
                             virtualServerId, 
                             virtualServerClassId, 
                             instanceName}));
    
public static javax.management.ObjectNamegetVirtualServerClassObjectName(java.lang.String instanceName, java.lang.String classId)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kNameKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kVirtualServerClassType, classId, instanceName}));
    
public static javax.management.ObjectNamegetVirtualServerObjectName(java.lang.String instanceName, java.lang.String virtualServerClassId, java.lang.String virtualServerId)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, 
                             kVirtualServerClassIdKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kVirtualServerType, 
                             virtualServerId, 
                             virtualServerClassId, 
                             instanceName}));
    
public static javax.management.ObjectNamegetWebContainerObjectName(java.lang.String instanceName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, 
                             kServerInstanceKeyName}, 
                new String[]{kWebContainer, instanceName}));
    
public static javax.management.ObjectNamegetWebModuleObjectName(java.lang.String instanceName, java.lang.String moduleName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName,  
                             kServerInstanceKeyName, kModuleTypeKeyName},
                new String[]{kModule, moduleName, instanceName, kWebModule}) );
    
public static javax.management.ObjectNamegetWebModuleObjectName(java.lang.String instanceName, java.lang.String moduleName, java.lang.String applicationName)

        return ( getObjectName (kDefaultIASDomainName,
                new String[]{kTypeKeyName, kNameKeyName, 
                             kServerInstanceKeyName, kModuleTypeKeyName, 
                             kApplicationNameKeyName},
                new String[]{kModule, moduleName, instanceName, kWebModule, 
                             applicationName}) );
    
private static booleanisDomainNameValid(java.lang.String name)

        boolean isValid = false;

        isValid =   (name.indexOf(kWildcardChar)                == -1) &&
                    (name.indexOf(kDomainNameSeparatorChar)	== -1) &&
                    (name.indexOf(kPropertySeparatorChar)	== -1) &&
                    (name.indexOf(kNameValueSeparatorChar)	== -1) &&
                    (name.indexOf(kSingleMatchChar)		== -1); 

        return ( isValid );
    
public static voidmain(java.lang.String[] args)

        Logger.log(ObjectNames.getServerInstanceObjectName("ias1"));
        Logger.log(ObjectNames.getApplicationObjectName("ias1", "app1"));
        Logger.log(ObjectNames.getControllerObjectName());
        Logger.log(ObjectNames.getModuleObjectName("ias1", "standalone"));
        Logger.log(ObjectNames.getModuleObjectName("ias1", "app1", "inner"));
        Logger.log(ObjectNames.getObjectName("ias111",
                new String[]{"key1", "key2", "key3"},
                new String[]{"v1", "v2", "v3"}));

        //Testers for patterns
        ObjectName pattern =  
            ObjectNames.getServerInstanceObjectNamePattern();
        Logger.log("" + pattern.isPropertyPattern());
        pattern = ObjectNames.getApplicationObjectNamePattern("ias1");
        Logger.log("" + pattern.isPropertyPattern());
        pattern = ObjectNames.getModuleObjectNamePattern("ias1");
        Logger.log("" + pattern.isPropertyPattern());
        pattern = ObjectNames.getModuleObjectNamePattern("ias1", "bank");
        Logger.log("" + pattern.isPropertyPattern());
        
        ObjectName jmsObjectName = 
            ObjectNames.getJMSAdminHandlerObjectName("ias1");
        Logger.log("JMS Objectname = " + jmsObjectName.toString());
        jmsObjectName = ObjectNames.getJMSAdminHandlerObjectName();
        Logger.log("JMS Objectname = " + jmsObjectName.toString());

        ObjectName httpListener = ObjectNames.getHttpListenerObjectName(
                                    "ias1", "listener1");
        Logger.log("Http listener object name = " + httpListener);

        
        ObjectName mime = ObjectNames.getMimeObjectName("ias1", "text/html");
        Logger.log("Mime object name = " + mime);

        ObjectName acl = ObjectNames.getAclObjectName("ias1", "acl1");
        Logger.log("ACL object name = " + acl);