FileDocCategorySizeDatePackage
MonitoredObjectType.javaAPI DocGlassfish v2 API15423Fri May 04 22:25:46 BST 2007com.sun.enterprise.admin.monitor.registry

MonitoredObjectType

public class MonitoredObjectType extends Object
MonitoredObjectType represents the type of a monitored object. Many of monitored objects have same properties, even while they monitor different user objects. For example - application and standalone ejb module are both nothing more than containers of other objects -- application contains web module and ejb modules, whereas standalone ejb module contains beans of various types. This object facilitates use of same GenericMonitorMBean as MBean for both of them, but still distinguishes them.
see
com.iplanet.ias.admin.monitor.GenericMonitorMBean
author
Originally authored by Abhijit Kumar
author
Copied from S1AS 7.0 source and modified by Shreedhar Ganapathy

Fields Summary
private static final HashMap
objectMap
A map to store all objects of type MonitoredObjectType using their string representation as key.
public static final MonitoredObjectType
NONE
to be able to initialize to a non-valid type
public static final MonitoredObjectType
ROOT
ROOT MonitoredObject - singleton
public static final MonitoredObjectType
APPLICATIONS
Parent of all applications and modules and other children - singleton
public static final MonitoredObjectType
APPLICATION
MonitoredObjectType for any deployed application - multiple
public static final MonitoredObjectType
EJBMODULE
An ejb module within an application - multiple
public static final MonitoredObjectType
WEBMODULE
A web module within an application - multiple
public static final MonitoredObjectType
STANDALONE_EJBMODULE
A standalone ejb module - multiple
public static final MonitoredObjectType
STANDALONE_WEBMODULE
A standalone web module - multiple
public static final MonitoredObjectType
STATELESS_BEAN
A stateless session bean - multiple
public static final MonitoredObjectType
STATEFUL_BEAN
A stateful session bean - multiple
public static final MonitoredObjectType
ENTITY_BEAN
A entity session bean - multiple
public static final MonitoredObjectType
MESSAGE_DRIVEN_BEAN
A message driven bean - multiple
public static final MonitoredObjectType
BEAN_POOL
An ejb pool - one per ejb
public static final MonitoredObjectType
BEAN_CACHE
An ejb cache - one per ejb
public static final MonitoredObjectType
BEAN_METHOD
public static final MonitoredObjectType
BEAN_METHODS
public static final MonitoredObjectType
SERVLET
A servlet - multiple
public static final MonitoredObjectType
HTTP_SERVICE
Http Service node - singleton
public static final MonitoredObjectType
VIRTUAL_SERVER
Virtual server - multiple
public static final MonitoredObjectType
WEBAPP_VIRTUAL_SERVER
webmodule-virtualserver, fix for 6172666
public static final MonitoredObjectType
HTTP_LISTENER
Http Listener - multiple
public static final MonitoredObjectType
JVM
JVM - singleton
public static final MonitoredObjectType
TRANSACTION_SERVICE
Transaction service - singleton
public static final MonitoredObjectType
THREAD_POOLS
Thread pools - singleton
public static final MonitoredObjectType
THREAD_POOL
A named thead pool - multiple
public static final MonitoredObjectType
ORB
ORB - singleton
public static final MonitoredObjectType
CONNECTION_MANAGERS
Connection Managers - singleton
public static final MonitoredObjectType
CONNECTION_MANAGER
A Connection Manager for orb - multiple
public static final MonitoredObjectType
RESOURCES
All the monitorable resources - singleton
public static final MonitoredObjectType
JDBC_CONN_POOL
A monitorable jdbc connection pool - multiple
public static final MonitoredObjectType
CONNECTOR_CONN_POOL
A monitorable connector connection pool - multiple
public static final MonitoredObjectType
WEB_COMPONENT
Any Web Container Element -- not used in hierarchy -- mainly for notification
public static final MonitoredObjectType
JNDI
Jndi monitoring
public static final MonitoredObjectType
CONNECTOR_SERVICE
public static final MonitoredObjectType
CONNECTOR_MODULE
public static final MonitoredObjectType
STANDALONE_CONNECTOR_MODULE
public static final MonitoredObjectType
CONNECTOR_WORKMGMT
public static final MonitoredObjectType
JMS_SERVICE
public static final MonitoredObjectType
CONNECTION_FACTORIES
public static final MonitoredObjectType
CONNECTION_FACTORY
public static final MonitoredObjectType
CONNECTION_POOLS
public static final MonitoredObjectType
CONNECTION_QUEUE
public static final MonitoredObjectType
DNS
public static final MonitoredObjectType
KEEP_ALIVE
public static final MonitoredObjectType
PWC_THREAD_POOL
public static final MonitoredObjectType
FILE_CACHE
public static final MonitoredObjectType
REQUEST
public static final MonitoredObjectType
SESSION_STORE
public static final MonitoredObjectType
TIMERS
public static final MonitoredObjectType
JVM_COMPILATION
public static final MonitoredObjectType
JVM_CLASSLOADING
public static final MonitoredObjectType
JVM_OS
public static final MonitoredObjectType
JVM_RUNTIME
public static final MonitoredObjectType
JVM_GCS
public static final MonitoredObjectType
JVM_GC
public static final MonitoredObjectType
JVM_MEMORY
public static final MonitoredObjectType
JVM_THREAD
public static final MonitoredObjectType
JVM_THREAD_INFO
public static final MonitoredObjectType
WEBSERVICE_ENDPOINT
A web service endpoint with in an ejb or web module - multiple
private String
typeName
value of this object as a string
private boolean
isSingleton
Denotes whether this type allows more than one instance at any level.
public static final MonitoredObjectType[]
EJB_TYPES
List of monitored object types for ejb container - actually unsafe :(
public static final MonitoredObjectType[]
ORB_TYPES
List of monitored object types for orb - actually unsafe :(
public static final MonitoredObjectType[]
HTTP_SERVICE_TYPES
List of MonitoredObjectTypes for Http Service - actually unsafe :( - should be unmodifiable array list
Constructors Summary
private MonitoredObjectType(String type)
Creates a new instance of MonitoredObjectType using specified string type

param
type string representing the name of monitored object type


                              
       
        this(type, false);
    
private MonitoredObjectType(String type, boolean isSingleton)
Creates a new instance of MonitoredObjectType using specified string type and specified flag for singleton

param
type string representing the name of monitored object type
param
isSingleton denotes whether this type of monitored object has only one instance (in its context)

        this.typeName = type;
        this.isSingleton = isSingleton;
        objectMap.put(this.typeName, this);
    
Methods Summary
public static com.sun.enterprise.admin.monitor.registry.MonitoredObjectTypegetMonitoredObjectType(java.lang.String typeName)
Get a MonitoredObjectType instance for the specified string type.

param
typeName string representing MonitoredObjectType
throws
IllegalArgumentException if the specified type name is not known.

        MonitoredObjectType type = getMonitoredObjectTypeOrNull(typeName);
        if (type == null) {
			//String msg = localStrings.getString( "admin.monitor.unknown_type_name", typeName );
            String msg = "admin.monitor.unknown_type_name:"+typeName;
            throw new IllegalArgumentException( msg );
        }
        return type;
    
static com.sun.enterprise.admin.monitor.registry.MonitoredObjectTypegetMonitoredObjectTypeOrNull(java.lang.String typeName)
Get a MonitoredObjectType instance for the specified string type. If the specified type is not known, the method returns null.

param
typeName string representing MonitoredObjectType

        MonitoredObjectType type = null;
        if (objectMap != null && typeName != null) {
            type = (MonitoredObjectType)objectMap.get(typeName);
        }
        return type;
    
public java.lang.StringgetTypeName()
Get type of this "MonitoredObjectType" as string

return
Monitored object type as string

        return typeName;
    
public booleanisSingleton()
Is instance of this type of MonitorMBean singleton. For example, there can only be one pool for every stateless session bean, so a MonitoredObjectType of type MonitoredObjectType.BEAN_POOL is a singleton.

return
true if this type of object can have atmost one instance within its context, false otherwise.

        return isSingleton;
    
public java.lang.StringtoString()
A string representation. The return value of this method is same as that of method getTypeName.

return
A string representation of this MonitoredObjectType

        return typeName;