public Object getAttribute(String attributeName) throws AttributeNotFoundException,
MBeanException,
ReflectionException {
if ( attributeName == null ) {
throw new RuntimeOperationsException( new IllegalArgumentException( "attributeName cannot be null" ),
"Cannot invoke a getter of " + getClass().getName() );
} else if ( attributeName.equals( ATTR_ID ) ) {
return getId();
} else if ( attributeName.equals( ATTR_SESSION_COUNT ) ) {
return Long.valueOf( getSessionCount() );
} else if ( attributeName.equals( ATTR_GLOBALS ) ) {
try {
return getGlobals();
} catch ( OpenDataException e ) {
throw new RuntimeOperationsException( new RuntimeException( "Error retrieving globals list",
e ),
"Error retrieving globals list " + e.getMessage() );
}
} else if ( attributeName.equals( ATTR_PACKAGES ) ) {
return getPackages();