Fields Summary |
---|
private static final HashMap | objectMapA map to store all objects of type MonitoredObjectType using their string
representation as key. |
public static final MonitoredObjectType | ROOTA root monitored object type |
public static final MonitoredObjectType | APPLICATIONA monitored object type of Application |
public static final MonitoredObjectType | EJBMODULEA monitored object type of EJB Module. This denotes ejb modules within
an application. For stand alone ejb modules, please use the type
MonitoredObjectType.STANDALONE_EJBMODULE |
public static final MonitoredObjectType | STANDALONE_EJBMODULEA monitored object type of standalone EJB Module. This denotes ejb
modules not deployed as part of any application. For ejb modules deployed
as part of applications, please use the type MonitoredObjectType.EJBMODULE |
public static final MonitoredObjectType | WEBMODULEA monitored object type of Web Module. This denotes web module within
an application. For stand alone web modules, please use the type
MonitoredObjectType.STANDALONE_WEBMODULE |
public static final MonitoredObjectType | STANDALONE_WEBMODULEA monitored object type of standalone Web Module. This denotes web
modules not deployed as part of any application. For web modules deployed
as part of applications, please use the type MonitoredObjectType.WEBMODULE |
public static final MonitoredObjectType | STATELESS_BEANA monitored object type of stateless session bean |
public static final MonitoredObjectType | STATEFUL_BEANA monitored object type of stateful session bean |
public static final MonitoredObjectType | ENTITY_BEANA monitored object type of entity bean |
public static final MonitoredObjectType | MESSAGE_DRIVEN_BEANA monitored object type of message driven bean |
public static final MonitoredObjectType | BEAN_POOLA monitored object type of bean pool. For every bean, there can be atmost
one object of type bean pool monitor. |
public static final MonitoredObjectType | BEAN_CACHEA monitored object type of bean cache. For every bean, there can be
atmost one object of type bean cache monitor. |
public static final MonitoredObjectType | BEAN_METHODA monitored object type of bean method |
public static final MonitoredObjectType | HTTP_SERVERA monitored object type of http-server (core) |
public static final MonitoredObjectType | VIRTUAL_SERVERA monitored object type of virtual-server |
public static final MonitoredObjectType | PROCESSA monitored object type of process |
public static final MonitoredObjectType | TXNMGRA monitored object type of jts monitor. There is only one instance of
jts monitor object. |
public static final MonitoredObjectType | IIOP_SERVICEA monitored object type of iiop service |
public static final MonitoredObjectType | ORBA monitored object type of orb. |
public static final MonitoredObjectType | ORB_CONNECTIONA monitored object type of orb connection |
public static final MonitoredObjectType | ORB_THREAD_POOLA monitored object type of orb thread pool |
public static final MonitoredObjectType | RESOURCESA monitored object type of resources |
public static final MonitoredObjectType | JDBC_CONN_POOLA monitored object type of jdbc-connection-pool |
private String | typeNamevalue of this object as a string |
private boolean | isSingletonDenotes whether this type allows more than one instance at any level. |
private int | enableCountNumber of components that need this type to be enabled. If the number is
more than zero then monitoring is started on MBeans of this type. |
public static final MonitoredObjectType[] | EJB_TYPESList of monitored object types for ejb container |
public static final MonitoredObjectType[] | MDB_TYPESList of monitored object types for mdb container |
public static final MonitoredObjectType[] | ORB_TYPESList of monitored object types for orb |
public static final MonitoredObjectType[] | JTS_TYPESList of monitored object types for JTS |
private static boolean | ejbMonitoringEnabledTracks whether monitoring is enabled on ejb container |
private static boolean | mdbMonitoringEnabledTracks whether monitoring is enabled on mdb container |
private static boolean | orbMonitoringEnabledTracks whether monitoring is enabled on orb |
private static boolean | jtsMonitoringEnabledTracks whether monitoring is enabled on JTS |
private static com.sun.enterprise.util.i18n.StringManager | localStrings |
Methods Summary |
---|
private static synchronized void | disableTypes(com.sun.enterprise.admin.monitor.MonitoredObjectType[] types)Disble monitoring for specified types. Note that a type can be disbled
more than once as it can be used by different monitorable components.
int size = types.length;
for (int i = 0; i < size; i++) {
if (types[i].enableCount > 0) {
types[i].enableCount--;
} else {
String msg = localStrings.getString( "admin.monitor.monitored_object_type_already_disabled", types[i].toString() );
throw new IllegalStateException( msg );
}
}
|
private static synchronized void | enableTypes(com.sun.enterprise.admin.monitor.MonitoredObjectType[] types)Enable monitoring for specified types. Note that a type can be enabled
more than once as it can be used by different monitorable components.
int size = types.length;
for (int i = 0; i < size; i++) {
types[i].enableCount++;
}
|
public static com.sun.enterprise.admin.monitor.MonitoredObjectType | getMonitoredObjectType(java.lang.String typeName)Get a MonitoredObjectType instance for the specified string type.
MonitoredObjectType type = getMonitoredObjectTypeOrNull(typeName);
if (type == null) {
String msg = localStrings.getString( "admin.monitor.unknown_type_name", typeName );
throw new IllegalArgumentException( msg );
}
return type;
|
static com.sun.enterprise.admin.monitor.MonitoredObjectType | getMonitoredObjectTypeOrNull(java.lang.String typeName)Get a MonitoredObjectType instance for the specified string type. If the
specified type is not known, the method returns null.
MonitoredObjectType type = null;
if (objectMap != null && typeName != null) {
type = (MonitoredObjectType)objectMap.get(typeName);
}
return type;
|
public java.lang.String | getTypeName()Get type of this "MonitoredObjectType" as string
return typeName;
|
public boolean | isMonitoringEnabled()Is monitoring enabled for this type.
return (enableCount > 0);
|
public boolean | isSingleton()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 isSingleton;
|
public static void | setEjbMonitoringEnabled(boolean enable)Set monitoring enabled or disabled for ejb container
ejbMonitoringEnabled = setMonitoringEnabled(EJB_TYPES,
ejbMonitoringEnabled, enable);
|
public static void | setJtsMonitoringEnabled(boolean enable)Set monitoring enabled or disabled for jts
jtsMonitoringEnabled = setMonitoringEnabled(JTS_TYPES,
jtsMonitoringEnabled, enable);
|
public static void | setMdbMonitoringEnabled(boolean enable)Set monitoring enabled or disabled for mdb container
mdbMonitoringEnabled = setMonitoringEnabled(MDB_TYPES,
mdbMonitoringEnabled, enable);
|
static void | setMonitoringEnabled(java.lang.String comp, boolean enable)Set monitoring enabled or disabled on specified component.
if (ServerTags.EJB_CONTAINER.equals(comp)) {
setEjbMonitoringEnabled(enable);
} else if (ServerTags.MDB_CONTAINER.equals(comp)) {
setMdbMonitoringEnabled(enable);
} else if (ServerTags.ORB.equals(comp)) {
setOrbMonitoringEnabled(enable);
} else if (ServerTags.TRANSACTION_SERVICE.equals(comp)) {
setJtsMonitoringEnabled(enable);
}
|
private static boolean | setMonitoringEnabled(com.sun.enterprise.admin.monitor.MonitoredObjectType[] types, boolean oldEnabled, boolean newEnabled)Enable or Disable monitoring for specified monitored object types. If
oldEnabled and newEnabled are same then this method is a NO-OP.
if (newEnabled != oldEnabled) {
oldEnabled = newEnabled;
if (oldEnabled) {
enableTypes(types);
} else {
disableTypes(types);
}
}
return newEnabled;
|
public static void | setOrbMonitoringEnabled(boolean enable)Set monitoring enabled or disabled for orb
orbMonitoringEnabled = setMonitoringEnabled(ORB_TYPES,
orbMonitoringEnabled, enable);
|
public java.lang.String | toString()A string representation. The return value of this method is
same as that of method getTypeName.
return typeName;
|