Methods Summary |
---|
protected java.lang.String | _getDefaultValue(java.lang.String name)
return "!!! NO DEFAULT VALUE FOR: \"" + name + "\" !!!" + ", " + this.getClass().getName();
|
protected final void | debug(java.lang.Object o)
if ( mDebug != null )
{
mDebug.println( o );
}
|
public javax.management.AttributeList | getAttributes(java.lang.String[] attrNames)Default behavior is to loop over each Attribute; subclass
may wish to maintain atomicity by implementing directly.
final AttributeList attrs = new AttributeList();
for( int i = 0; i < attrNames.length; ++i )
{
try
{
final String attrName = attrNames[ i ];
final Attribute attr =
new Attribute( attrName, getAttribute( attrName ) );
attrs.add( attr );
}
catch( Exception e )
{
// ignore
}
}
return( attrs );
|
public final java.lang.String | getDefaultValue(java.lang.String name)
if ( ! supportsAttribute( name ) )
{
throw new AttributeNotFoundException( name );
}
return _getDefaultValue( name );
|
public final java.lang.String | getID() return mID;
|
public DelegateOwner | getOwner()
return( mOwner );
|
public javax.management.AttributeList | setAttributes(javax.management.AttributeList attrs)Default behavior is too loop over each Attribute; subclass
may wish to maintain atomicity by implementing directly.
final int numAttrs = attrs.size();
final AttributeList successList = new AttributeList();
for( int i = 0; i < numAttrs; ++i )
{
final Attribute attr = (Attribute)attrs.get( i );
try
{
setAttribute( attr );
successList.add( attr );
}
catch( AttributeNotFoundException e )
{
// ignore, as per spec
}
catch( InvalidAttributeValueException e )
{
// ignore, as per spec
}
}
return( successList );
|
public void | setDebugOutput(com.sun.appserv.management.util.misc.Output debugOutput)
mDebug = debugOutput;
|
public void | setOwner(DelegateOwner owner)
mOwner = owner;
|
public synchronized boolean | supportsAttribute(java.lang.String attrName)
if ( mAttributeNames == null )
{
final String[] attrNames =
JMXUtil.getAttributeNames( getMBeanInfo().getAttributes() );
mAttributeNames = ArrayConversion.arrayToSet( attrNames );
}
return( mAttributeNames.contains( attrName ) );
|
public boolean | supportsOperation(java.lang.String operationName, java.lang.Object[] args, java.lang.String[] types)
boolean supports = false;
final MBeanOperationInfo[] opInfos = getMBeanInfo().getOperations();
for( int i = 0; i < opInfos.length; ++i )
{
final MBeanOperationInfo info = opInfos[ i ];
if ( info.getName().equals( operationName ) )
{
if ( typesMatch( types, info.getSignature() ) )
{
supports = true;
break;
}
}
}
return( supports );
|
private boolean | typesMatch(java.lang.String[] types, javax.management.MBeanParameterInfo[] paramInfos)Do the classnames match the parameter infos?
boolean matches = false;
final int numTypes = types == null ? 0 : types.length;
final int numParams = paramInfos == null ? 0 : paramInfos.length;
if ( numTypes == numParams )
{
matches = true;
for( int i = 0; i < numTypes; ++i )
{
if ( ! types[ i ].equals( paramInfos[ i ].getType() ) )
{
matches = false;
break;
}
}
}
return( matches );
|
protected void | unimplementedOperation(java.lang.String operation)An operation has not been implemented. Deal with appropriately.
debug( "unimplemented operation: " + operation );
throw new UnsupportedOperationException( operation );
|