Methods Summary |
---|
protected java.lang.String | getConfigPeerJ2EEType()
final String configPeerJ2EEType = (String)ToConfigMap.get( getSelfJ2EEType() );
return( configPeerJ2EEType );
|
protected java.lang.String | getConfigPeerName()
return( getSelfName() );
|
public javax.management.ObjectName | getConfigPeerObjectName()Get the name of a config peer. Default behavior is to use the config peer
j2eeType, together with the name of this MBean and GROUP_CONFIGURATION to
locate a single MBean. A subclass not following this convention will have
to override this method.
ObjectName configPeerObjectName = null;
if (isConfigProvider() )
{
final Map<String,String> propsMap = getConfigPeerProps( );
if ( propsMap != null )
{
configPeerObjectName = queryProps( propsMap );
if ( configPeerObjectName == null )
{
configPeerObjectName = queryConfigPeerFailed( propsMap );
}
}
}
return( configPeerObjectName );
|
protected java.util.Map | getConfigPeerProps()If there is a config peer, return properties that uniquely identify it.
This base implementation won't be sufficient for many MBeans, so subclasses
should call super.getConfigPeerProps(), then tack on any additional ones.
HashMap<String,String> props = null;
final String j2eeType = getConfigPeerJ2EEType();
if ( j2eeType != null )
{
props = new HashMap<String,String>();
props.put( AMX.J2EE_TYPE_KEY, j2eeType );
props.put( AMX.NAME_KEY, getConfigPeerName() );
}
return( props );
|
protected final java.lang.String[] | getContaineeObjectNameStrings(java.lang.String j2eeType)
final Set<ObjectName> objectNames = getContaineeObjectNameSet( j2eeType );
final String[] names = GSetUtil.toStringArray( objectNames );
return( names );
|
public java.util.Set | getDeployedObjectsObjectNameSet()
return( getContaineeObjectNameSet( DEPLOYED_TYPES ) );
|
protected java.util.Set | getDontMapAttributeNames()Return a list of Attribute names which should not be mapped.
// all mapped by default
return( Collections.emptySet() );
|
public final java.lang.String | getGroup()
return( AMX.GROUP_JSR77 );
|
public com.sun.appserv.management.j2ee.J2EEServer | getJ2EEServer()
return getProxyFactory().getProxy( getServerObjectName(), J2EEServer.class);
|
protected java.lang.String | getMonitoringPeerJ2EEType()
final String monPeerJ2EEType = (String)MON_MAP.get( getSelfJ2EEType() );
return( monPeerJ2EEType );
|
protected java.lang.String | getMonitoringPeerName()
return( getSelfName() );
|
public javax.management.ObjectName | getMonitoringPeerObjectName()
ObjectName objectName = null;
final Map<String,String> propsMap = getMonitoringPeerProps();
if ( propsMap != null && propsMap.keySet().size() != 0 )
{
debug( "getMonitoringPeerObjectName: my ObjectName = ", getObjectName(),
", queryProps = ", MapUtil.toString( propsMap, ", " ) );
objectName = queryProps( propsMap );
if ( objectName == null )
{
objectName = queryMonitoringPeerFailed( propsMap );
}
}
return( objectName );
|
protected java.util.Map | getMonitoringPeerProps(java.lang.String monitorJ2EEType, java.lang.String monitorName)
final Map<String,String> props = new HashMap<String,String>();
props.put( AMX.J2EE_TYPE_KEY, monitorJ2EEType );
props.put( AMX.NAME_KEY, monitorName );
for( final String j2eeType : MON_MAP.keySet() )
{
final String j2eeMonType = (String)MON_MAP.get( j2eeType );
final String name = getKeyProperty( j2eeType );
if ( name != null )
{
props.put( j2eeMonType, name );
}
}
return( props );
|
protected java.util.Map | getMonitoringPeerProps()
Map<String,String> props = null;
final String j2eeType = getMonitoringPeerJ2EEType();
if ( j2eeType != null )
{
props = getMonitoringPeerProps( j2eeType, getMonitoringPeerName() );
}
return( props );
|
protected java.lang.String | getServerName()
return( getObjectName().getKeyProperty( "J2EEServer" ) );
|
public javax.management.ObjectName | getServerObjectName()
final ObjectName selfObjectName = getObjectName();
ObjectName serverObjectName = null;
final String serverName = selfObjectName.getKeyProperty( J2EETypes.J2EE_SERVER );
if ( serverName != null )
{
final String props = Util.makeRequiredProps( J2EETypes.J2EE_SERVER, serverName );
final Set<AMX> candidates = getQueryMgr().queryPatternSet( selfObjectName.getDomain(), props );
serverObjectName = Util.getObjectName( GSetUtil.getSingleton( candidates ) );
}
return( serverObjectName );
|
protected java.lang.String | getServerXType()
String type = null;
final String serverName = getServerName();
if ( serverName != null )
{
final Map<String,ServerConfig> m =
getDomainRoot().getDomainConfig().getServerConfigMap();
final ServerConfig serverConfig = m.get( serverName );
type = serverConfig.getJ2EEType();
}
return( type );
|
protected javax.management.j2ee.statistics.Stats | getStatsGeneric()
Stats stats = null;
if ( isstatisticProvider() )
{
final ObjectName mon = getMonitoringPeerObjectName();
if ( mon != null )
{
final AMX monStats = getProxyFactory().getProxy( mon, AMX.class);
try
{
final Extra extra = Util.getExtra( monStats );
stats = (Stats)extra.getAttribute( "stats" );
}
catch( Exception e )
{
// OK, ignore
}
}
}
return( stats );
|
public java.lang.String[] | getdeployedObjects()
final String[] names = GSetUtil.toStringArray( getDeployedObjectsObjectNameSet() );
return( names );
|
public final java.lang.String | getobjectName()JSR 77 impl
return( getObjectName().toString() );
|
public long | getstartTime()
return( mStartTime );
|
protected void | handleMissingOriginals(java.util.Set missingOriginals)
missingOriginals.removeAll( IGNORE_MISSING );
super.handleMissingOriginals( missingOriginals );
|
public boolean | isConfigProvider()
return( ToConfigMap.keySet().contains( getSelfJ2EEType() ) );
|
public boolean | iseventProvider()
return( false );
|
public boolean | isstateManageable()
return( false );
|
public boolean | isstatisticProvider()
return( getMonitoringPeerObjectName() != null );
|
public boolean | isstatisticsProvider()
return( isstatisticProvider() );
|
public void | preRegisterDone()
super.preRegisterDone();
mStartTime = System.currentTimeMillis();
|
protected javax.management.ObjectName | queryConfigPeerFailed(java.util.Map propsMap)The usual method of finding the config peer has failed.
This is an opportunity to try again.
debug( "queryConfigPeerFailed: " + MapUtil.toString( propsMap ) );
return null;
|
protected javax.management.ObjectName | queryMonitoringPeerFailed(java.util.Map propsMap)The usual method of finding the monitoring peer has failed.
This is an opportunity to try again.
return null;
|
protected javax.management.ObjectName | queryProps(java.util.Map propsMap)
ObjectName objectName = null;
final String props = MapUtil.toString( propsMap, "," );
final Set<ObjectName> candidates =
getQueryMgr().queryPropsObjectNameSet( props );
if ( candidates.size() == 1 )
{
objectName = GSetUtil.getSingleton( candidates );
}
else if ( candidates.size() > 1 )
{
throw new RuntimeException(
"Unexpectedly found too many candidates for query pattern " + quote( props ) +
" found: " + toString( candidates ) );
}
return( objectName );
|
protected final void | setstartTime(long startTime)
mStartTime = startTime;
|