FileDocCategorySizeDatePackage
DottedNameFactory.javaAPI DocGlassfish v2 API14527Fri May 04 22:24:20 BST 2007com.sun.enterprise.admin.monitor.registry.spi

DottedNameFactory

public class DottedNameFactory extends Object
Provides methods to get DottedNames pertaining to various components in the monitoring tree hierarchy
author
Shreedhar Ganapathy
revision
$Revision: 1.4 $

Fields Summary
private static final Logger
logger
private static final com.sun.enterprise.util.i18n.StringManager
sm
private static String
instanceName
private static final String
DELIMITER
Constructors Summary
Methods Summary
static java.lang.StringgetAppDottedName(java.lang.String app)

		app = DottedName.escapePart(app);
		return getApplicationsDottedName() + DELIMITER + app;
	
static java.lang.StringgetAppModuleDottedName(java.lang.String app, java.lang.String module)

		module = DottedName.escapePart(module);
		return getAppDottedName(app) + DELIMITER + module;
	
static java.lang.StringgetApplicationsDottedName()

		return getInstanceName() + DELIMITER +  MonitoredObjectType.APPLICATIONS;
	
static java.lang.StringgetConnectionFactoriesDottedName()

        return getJmsServiceDottedName() + DELIMITER + MonitoredObjectType.CONNECTION_FACTORIES;
    
static java.lang.StringgetConnectionFactoryDottedName(java.lang.String factoryName)

        return getConnectionFactoriesDottedName() + DELIMITER + DottedName.escapePart(factoryName);
    
static java.lang.StringgetConnectionManagersDottedName()

		return getOrbDottedName() + DELIMITER + MonitoredObjectType.CONNECTION_MANAGERS;
	
static java.lang.StringgetConnectionPoolDottedName(java.lang.String poolName, java.lang.String type)

		poolName = DottedName.escapePart(poolName);
		return getResourcesDottedName() + DELIMITER + poolName;
	
static java.lang.StringgetConnectionPoolDottedName(java.lang.String poolName, java.lang.String j2eeAppName, java.lang.String moduleName)

        return getConnectionPoolsDottedName(j2eeAppName, moduleName) + DELIMITER + DottedName.escapePart(poolName);
    
static java.lang.StringgetConnectionPoolsDottedName(java.lang.String j2eeAppName, java.lang.String moduleName)

        return getConnectorModuleDottedName(j2eeAppName, moduleName) + DELIMITER + MonitoredObjectType.CONNECTION_POOLS;
    
static java.lang.StringgetConnectionQueueDottedName()

        return getHttpServiceDottedName() + DELIMITER + MonitoredObjectType.CONNECTION_QUEUE;
    
static java.lang.StringgetConnectorModuleDottedName(java.lang.String j2eeAppName, java.lang.String moduleName)

        if(j2eeAppName != null) {
           moduleName = DottedName.escapePart(j2eeAppName) + "#" + DottedName.escapePart(moduleName);
        }
        else 
            moduleName = DottedName.escapePart(moduleName);
		return getConnectorServiceDottedName() + DELIMITER + moduleName;
    
static java.lang.StringgetConnectorServiceDottedName()

        return getInstanceName() + DELIMITER + MonitoredObjectType.CONNECTOR_SERVICE;
    
static java.lang.StringgetConnectorWorkMgmtDottedName(java.lang.String j2eeAppName, java.lang.String moduleName, boolean isJms)

        
        String dottedName = null;
        
        if(isJms) {
            dottedName = getJmsServiceDottedName() + DELIMITER + MonitoredObjectType.CONNECTOR_WORKMGMT;
        }
        else {
            dottedName = getConnectorModuleDottedName(j2eeAppName, moduleName) + DELIMITER + MonitoredObjectType.CONNECTOR_WORKMGMT;
        }
        return dottedName;
    
static java.lang.StringgetDnsDottedName()

        return getHttpServiceDottedName() + DELIMITER + MonitoredObjectType.DNS;
    
static java.lang.StringgetEJBCacheDottedName(java.lang.String app, java.lang.String module, java.lang.String ejb)

		return getEJBDottedName(app, module, ejb) + DELIMITER + MonitoredObjectType.BEAN_CACHE;
	
static java.lang.StringgetEJBDottedName(java.lang.String app, java.lang.String module, java.lang.String ejb)

		ejb = DottedName.escapePart(ejb);
		if(app == null){
			return getStandAloneEJBModuleDottedName(module) + DELIMITER + ejb;
		}
		return getAppModuleDottedName(app, module) + DELIMITER + ejb;
	
static java.lang.StringgetEJBDottedNameWithType(java.lang.String app, java.lang.String module, java.lang.String ejb, java.lang.String ejbType)

		ejb = DottedName.escapePart(ejb);
		if(app == null){
			return getStandAloneEJBModuleDottedName(module) + DELIMITER + ejbType + DELIMITER + ejb;
		}
		return getAppModuleDottedName(app, module) + DELIMITER + ejbType + DELIMITER + ejb;
	
static java.lang.StringgetEJBMethodDottedName(java.lang.String app, java.lang.String module, java.lang.String ejb, java.lang.String method)

		return getEJBMethodsDottedName(app,module,ejb) + DELIMITER + DottedName.escapePart(method);
	
static java.lang.StringgetEJBMethodsDottedName(java.lang.String app, java.lang.String module, java.lang.String ejb)

		return getEJBDottedName(app, module, ejb) + DELIMITER + MonitoredObjectType.BEAN_METHODS;
	
static java.lang.StringgetEJBPoolDottedName(java.lang.String app, java.lang.String module, java.lang.String ejb)

		return getEJBDottedName(app, module, ejb) + DELIMITER + MonitoredObjectType.BEAN_POOL;
	
static java.lang.StringgetFileCacheDottedName()

        return getHttpServiceDottedName() + DELIMITER + MonitoredObjectType.FILE_CACHE;
    
static java.lang.StringgetHttpListenerDottedName(java.lang.String listenerName, java.lang.String vs)

		listenerName = DottedName.escapePart(listenerName);
		return getHttpSvcVirtualServerDottedName(vs) + DELIMITER + listenerName;
	
static java.lang.StringgetHttpServiceDottedName()

		return getInstanceName() + DELIMITER + MonitoredObjectType.HTTP_SERVICE;		
	
static java.lang.StringgetHttpSvcVirtualServerDottedName(java.lang.String vs)

		vs = DottedName.escapePart(vs);
		return getHttpServiceDottedName() + DELIMITER + vs;
	
private static java.lang.StringgetInstanceName()

	
	   
		if(instanceName == null){
			try{
				instanceName = (ApplicationServer.getServerContext()).getInstanceName();
				if(instanceName==null) {
					final String msg = sm.getString("instance_name_not_found");
					throw new NullPointerException(msg);
				}
			}
			catch(Exception e){
				logger.fine("DottedNameFactory:"+e.getClass().getName());
				throw new RuntimeException(e);
			}
		}
		return instanceName;
	
static java.lang.StringgetJVMClassLoadingDottedName()

        return getJVMDottedName() + DELIMITER + MonitoredObjectType.JVM_CLASSLOADING;
    
static java.lang.StringgetJVMCompilationDottedName()

        return getJVMDottedName() + DELIMITER + MonitoredObjectType.JVM_COMPILATION;
    
static java.lang.StringgetJVMDottedName()

		return getInstanceName() + DELIMITER + MonitoredObjectType.JVM;		
	
static java.lang.StringgetJVMGCDottedName(java.lang.String gcName)

        return getJVMGCSDottedName() + DELIMITER + DottedName.escapePart(gcName);
    
static java.lang.StringgetJVMGCSDottedName()

        return getJVMDottedName() + DELIMITER + MonitoredObjectType.JVM_GCS;
    
static java.lang.StringgetJVMMemoryDottedName()

        return getJVMDottedName() + DELIMITER + MonitoredObjectType.JVM_MEMORY;
    
static java.lang.StringgetJVMOSDottedName()

        return getJVMDottedName() + DELIMITER + MonitoredObjectType.JVM_OS;
    
static java.lang.StringgetJVMRuntimeDottedName()

        return getJVMDottedName() + DELIMITER + MonitoredObjectType.JVM_RUNTIME;
    
static java.lang.StringgetJVMThreadDottedName()

        return getJVMDottedName() + DELIMITER + MonitoredObjectType.JVM_THREAD;
    
static java.lang.StringgetJVMThreadInfoDottedName(java.lang.String threadName)

        return getJVMThreadDottedName() + DELIMITER + DottedName.escapePart(threadName);
    
static java.lang.StringgetJmsServiceDottedName()

        return getInstanceName() + DELIMITER + MonitoredObjectType.JMS_SERVICE;
    
static java.lang.StringgetKeepAliveDottedName()

        return getHttpServiceDottedName() + DELIMITER + MonitoredObjectType.KEEP_ALIVE;
    
static java.lang.StringgetOrbConnectionManagerDottedName(java.lang.String name)

		name = DottedName.escapePart(name);
		return getConnectionManagersDottedName() + DELIMITER + name;
	
static java.lang.StringgetOrbDottedName()

		return getInstanceName() + DELIMITER + MonitoredObjectType.ORB;	
	
static java.lang.StringgetPWCThreadPoolDottedName()

        return getHttpServiceDottedName() + DELIMITER + MonitoredObjectType.PWC_THREAD_POOL;
    
static java.lang.StringgetRequestDottedName(java.lang.String vsId)

        return getHttpSvcVirtualServerDottedName(vsId) + DELIMITER + MonitoredObjectType.REQUEST;
    
static java.lang.StringgetResourcesDottedName()

		return getInstanceName() + DELIMITER + MonitoredObjectType.RESOURCES;
	
static java.lang.StringgetRootDottedName()

		return getInstanceName();
	
static java.lang.StringgetServletDottedName(java.lang.String app, java.lang.String module, java.lang.String vs, java.lang.String servlet)

		
		servlet = DottedName.escapePart(servlet);
		return getWebAppsVirtualServerDottedName(app, module, vs) + DELIMITER + servlet;
	
static java.lang.StringgetStandAloneEJBModuleDottedName(java.lang.String module)

		module = DottedName.escapePart(module);
		return getApplicationsDottedName() + DELIMITER + module;
	
static java.lang.StringgetStandAloneWebModuleDottedName(java.lang.String module)

		module = DottedName.escapePart(module);
		return getApplicationsDottedName() + DELIMITER + module;		
	
static java.lang.StringgetStatefulSessionStoreDottedName(java.lang.String ejbName, java.lang.String moduleName, java.lang.String j2eeAppName)

        return getEJBDottedName(j2eeAppName, moduleName, ejbName) + DELIMITER + MonitoredObjectType.SESSION_STORE;
    
static java.lang.StringgetThreadPoolDottedName(java.lang.String name)

		name = DottedName.escapePart(name);
		return getThreadPoolsDottedName() + DELIMITER + name;
	
static java.lang.StringgetThreadPoolsDottedName()

		return getInstanceName() + DELIMITER + MonitoredObjectType.THREAD_POOLS;
	
static java.lang.StringgetTimerDottedName(java.lang.String ejbName, java.lang.String moduleName, java.lang.String j2eeAppName)

        return getEJBDottedName(j2eeAppName, moduleName, ejbName) + DELIMITER + MonitoredObjectType.TIMERS;
    
static java.lang.StringgetTransactionServiceDottedName()

		return getInstanceName() + DELIMITER + MonitoredObjectType.TRANSACTION_SERVICE;
	
static java.lang.StringgetWebAppsVirtualServerDottedName(java.lang.String app, java.lang.String module, java.lang.String vs)

		vs = DottedName.escapePart(vs);
		if(app == null){
			return getStandAloneWebModuleDottedName(module) + DELIMITER + vs;
		}
		return getAppModuleDottedName(app, module) + DELIMITER + vs;
	
static java.lang.StringgetWebServiceAggregateStatsInEjbDottedName(java.lang.String endpointName, java.lang.String moduleName, java.lang.String j2eeAppName)


        return getWebServiceInEjbDottedName(j2eeAppName,moduleName,
            endpointName) + DELIMITER + MonitoredObjectType.WEBSERVICE_ENDPOINT;

    
static java.lang.StringgetWebServiceAggregateStatsInWebDottedName(java.lang.String endpointName, java.lang.String moduleName, java.lang.String j2eeAppName)


        return getWebServiceInWebDottedName(j2eeAppName,moduleName,
            endpointName) + DELIMITER + MonitoredObjectType.WEBSERVICE_ENDPOINT;

    
static java.lang.StringgetWebServiceInEjbDottedName(java.lang.String app, java.lang.String module, java.lang.String endpoint)


		endpoint = DottedName.escapePart(endpoint);
		if(app == null){
			return getStandAloneEJBModuleDottedName(module) + DELIMITER +
            endpoint;
		}
		return getAppModuleDottedName(app, module) + DELIMITER + endpoint;
	
static java.lang.StringgetWebServiceInWebDottedName(java.lang.String app, java.lang.String module, java.lang.String endpoint)


		endpoint = DottedName.escapePart(endpoint);
		if(app == null){
			return getStandAloneWebModuleDottedName(module) + DELIMITER +
            endpoint;
		}
		return getAppModuleDottedName(app, module) + DELIMITER + endpoint;