Java Reference
In-Depth Information
AttributeList rvalue = new AttributeList();
return rvalue;
}
public void setAttribute( Attribute att ) throws MBeanException,
AttributeNotFoundException, ReflectionException,
InvalidAttributeValueException
{
throw new AttributeNotFoundException( "No attributes can be set" );
}
public AttributeList setAttributes( AttributeList list )
{
AttributeList rvalue = new AttributeList();
return rvalue;
}
public Object invoke( String actionName,
Object args[], String sig[] )
throws MBeanException, ReflectionException
{
try
{
String methodName = actionName;
Class types[] = new Class[ sig.length ];
for( int i = 0; i < types.length; i++ )
types[ i ] = Class.forName( sig[ i ] );
Method m =
serviceRef.getClass().getMethod( methodName, types );
Object temp = m.invoke( serviceRef, args );
return temp;
}
catch( Exception e )
{
throw new MBeanException( e );
}
}
public MBeanInfo getMBeanInfo()
{
MBeanConstructorInfo[] cons = new MBeanConstructorInfo[ 1 ];
MBeanNotificationInfo[] nots = null;
MBeanAttributeInfo[] atts = null;
MBeanOperationInfo[] ops = new MBeanOperationInfo[ 2 ];
B
try
{
Class conargs[] = { Class.forName( "java.lang.String" ),
Class.forName( "net.jini.core.entry.Entry" ) };
MBeanConstructorInfo cinfo =
new MBeanConstructorInfo( "Main constructor",
this.getClass().getConstructor( conargs ) );
cons[ 0 ] = cinfo;
Search WWH ::




Custom Search