Java Reference
In-Depth Information
out.println( " types[ " + k + " ] = "
+ types[ k ] + ";");
out.println( " argNames[ " + k + " ] = "
+ argNames[ k ] + ";");
out.println( " argDescs[ " + k + " ] = "
+ argDescs[ k ] + ";");
}
out.println( " addMBeanOperation( \""
+ opName + "\", types , argNames, argDescs, \""
+ desc + "\", \"" + rType + "\" , "
+ MBeanOperationInfo.UNKNOWN );" );
index++;
}//while
out.println( " }");
out.println();
}
private void writeLookupEJB()
{
out.println();
out.println( "private Object lookupEJB() throws Exception" );
out.println( " {" );
out.println( " Context ctx = new InitialContext();" );
out.println( " return ( " + remoteInterface +" )
ctx.lookup( jndiName );" );
out.println( " }" );
out.println();
}
Build exposed
management
interface
private void buildAttributesAndOperations( Class c )
{
Method[] methods = c.getMethods();
atts = new Hashtable();
attTypes = new Hashtable();
ops = new Vector();
opsReturns = new Hashtable();
opsArgTypes= new Hashtable();
for( int i = 0; i < methods.length; i++ )
{
Method m = methods[i];
String name = m.getName();
boolean attributeSet = false;
boolean attributeGet = false;
if( name.startsWith( "set" ) )
{
atts.put( name.substring( 3 ), "w" );
attributeSet = true;
}
Search WWH ::




Custom Search