Methods Summary |
---|
public synchronized void | addHook(java.lang.String jmxDomain, DynamicInterceptorHook hook)Add a per-domain hook which will be called for all invocations on MBeans.
Not supported: interceptors on calls that are not specific to an MBean eg countMBeans().
Works only for methods in {@link DynamicInterceptorHook).
if ( mHooks.containsKey( jmxDomain ) )
{
throw new IllegalStateException();
}
debug( "Added hook for JMX domain ", jmxDomain,
" using hook of class ", hook.getClass().getName() );
mHooks.put( jmxDomain, hook );
|
public final void | addNotificationListener(javax.management.ObjectName objectName, javax.management.NotificationListener notificationListener, javax.management.NotificationFilter notificationFilter, java.lang.Object obj)
debug( "DynamicInterceptor.addNotificationListener: ", objectName, notificationListener.getClass().getName() );
getDelegateMBeanServer().addNotificationListener(objectName,
notificationListener, notificationFilter, obj);
|
public final void | addNotificationListener(javax.management.ObjectName objectName, javax.management.ObjectName objectName1, javax.management.NotificationFilter notificationFilter, java.lang.Object obj)
debug( "DynamicInterceptor.addNotificationListener: ", objectName, objectName1 );
getDelegateMBeanServer().addNotificationListener(objectName, objectName1, notificationFilter, obj);
|
private void | checkForIllegalMBean(javax.management.ObjectName objectName)
if ( SPECIAL_CHECKS )
{
final String jmxDomain = objectName.getDomain();
if ( jmxDomain.equals( "ias" ) )
{
final String msg = "JMX domain 'ias' may not be used: " + JMXUtil.toString(objectName);
final IllegalArgumentException e = new IllegalArgumentException( msg );
debug( msg, "\n", e );
throw e;
}
/*
if ( "server-instance".equals( objectName.getKeyProperty( "type" ) ) )
{
final String msg = "MBean " + JMXUtil.toString(objectName) + " is used, why?";
final IllegalArgumentException e = new IllegalArgumentException( msg );
debug( msg, "\n", e );
throw e;
}
*/
}
|
public final javax.management.ObjectInstance | createMBean(java.lang.String str, javax.management.ObjectName objectName)
debug( "DynamicInterceptor.createMBean: ", str, objectName );
return getDelegateMBeanServer().createMBean (str, objectName);
|
public final javax.management.ObjectInstance | createMBean(java.lang.String str, javax.management.ObjectName objectName, javax.management.ObjectName objectName2)
debug( "DynamicInterceptor.createMBean: ", str, objectName, objectName2 );
return getDelegateMBeanServer().createMBean (str, objectName, objectName2);
|
public final javax.management.ObjectInstance | createMBean(java.lang.String str, javax.management.ObjectName objectName, java.lang.Object[] obj, java.lang.String[] str3)
debug( "DynamicInterceptor.createMBean: ", str, objectName, obj, str3);
return getDelegateMBeanServer().createMBean (str, objectName, obj, str3);
|
public final javax.management.ObjectInstance | createMBean(java.lang.String str, javax.management.ObjectName objectName, javax.management.ObjectName objectName2, java.lang.Object[] obj, java.lang.String[] str4)
debug( "DynamicInterceptor.createMBean: ", str, objectName, objectName2, obj, str4);
return getDelegateMBeanServer().createMBean (str, objectName, objectName2, obj, str4);
|
protected final void | debug(java.lang.Object args)
mDebug.println( args );
|
public final java.io.ObjectInputStream | deserialize(java.lang.String str, byte[] values)
debug( "DynamicInterceptor.deserialize: ", str, values);
return getDelegateMBeanServer().deserialize (str, values);
|
public final java.io.ObjectInputStream | deserialize(javax.management.ObjectName objectName, byte[] values)
debug( "DynamicInterceptor.deserialize: ", objectName, values);
return getDelegateMBeanServer().deserialize (objectName, values);
|
public final java.io.ObjectInputStream | deserialize(java.lang.String str, javax.management.ObjectName objectName, byte[] values)
debug( "DynamicInterceptor.deserialize: ", str, objectName, values);
return getDelegateMBeanServer().deserialize (str, objectName, values);
|
public final java.lang.Object | getAttribute(javax.management.ObjectName objectName, java.lang.String attributeName)
Object result = null;
final DynamicInterceptorHook hook = getHook(objectName);
if ( hook != null )
{
result = hook.getAttribute( objectName, attributeName );
}
else
{
result = getDelegateMBeanServer().getAttribute( objectName, attributeName );
}
debug( "DynamicInterceptor.getAttribute: ", objectName, attributeName, result );
return result;
|
public final javax.management.AttributeList | getAttributes(javax.management.ObjectName objectName, java.lang.String[] attrNames)
AttributeList result = null;
final DynamicInterceptorHook hook = getHook(objectName);
if ( hook != null )
{
result = hook.getAttributes( objectName, attrNames );
}
else
{
result = getDelegateMBeanServer().getAttributes( objectName, attrNames );
}
debug( "DynamicInterceptor.getAttributes: ", objectName, attrNames, result );
return result;
|
public final java.lang.ClassLoader | getClassLoader(javax.management.ObjectName objectName)
debug( "DynamicInterceptor.getClassLoader: ", objectName);
ClassLoader result = null;
final DynamicInterceptorHook hook = getHook(objectName);
if ( hook != null )
{
debug( "calling hook" );
result = hook.getClassLoader( objectName );
}
else
{
result = getDelegateMBeanServer().getClassLoader( objectName );
}
return result;
|
public final java.lang.ClassLoader | getClassLoaderFor(javax.management.ObjectName objectName)
debug( "DynamicInterceptor.getClassLoaderFor: ", objectName);
ClassLoader result = null;
final DynamicInterceptorHook hook = getHook(objectName);
if ( hook != null )
{
debug( "calling hook" );
result = hook.getClassLoaderFor( objectName );
}
else
{
result = getDelegateMBeanServer().getClassLoaderFor( objectName );
}
return result;
|
public final javax.management.loading.ClassLoaderRepository | getClassLoaderRepository()
debug( "DynamicInterceptor.getClassLoaderRepository" );
return getDelegateMBeanServer().getClassLoaderRepository();
|
public final java.lang.String | getDefaultDomain()
debug( "DynamicInterceptor.getDefaultDomain: " );
return getDelegateMBeanServer().getDefaultDomain();
|
public javax.management.MBeanServer | getDelegateMBeanServer()Get the MBeanServer to which the request can be delegated.
return mDelegateMBeanServer;
|
public final java.lang.String[] | getDomains()
debug( "DynamicInterceptor.getDomains" );
return getDelegateMBeanServer().getDomains();
|
protected DynamicInterceptorHook | getHook(javax.management.ObjectName objectName)
return mHooks.get( objectName.getDomain() );
|
public final java.lang.Integer | getMBeanCount()
debug( "DynamicInterceptor.getMBeanCount: " );
return getDelegateMBeanServer().getMBeanCount( );
|
public final javax.management.MBeanInfo | getMBeanInfo(javax.management.ObjectName objectName)
debug( "DynamicInterceptor.getMBeanInfo: ", objectName );
MBeanInfo result = null;
final DynamicInterceptorHook hook = getHook(objectName);
if ( hook != null )
{
result = hook.getMBeanInfo( objectName );
}
else
{
result = getDelegateMBeanServer().getMBeanInfo( objectName );
}
return result;
|
public final javax.management.ObjectInstance | getObjectInstance(javax.management.ObjectName objectName)
debug( "DynamicInterceptor.getDefaultDomain: getObjectInstance", objectName );
return getDelegateMBeanServer().getObjectInstance(objectName);
|
public final java.lang.Object | instantiate(java.lang.String str)
debug( "DynamicInterceptor.instantiate: ", str );
return getDelegateMBeanServer().instantiate(str);
|
public final java.lang.Object | instantiate(java.lang.String str, javax.management.ObjectName objectName)
debug( "DynamicInterceptor.instantiate: ", str, objectName );
return getDelegateMBeanServer().instantiate(str, objectName);
|
public final java.lang.Object | instantiate(java.lang.String str, java.lang.Object[] obj, java.lang.String[] str2)
debug( "DynamicInterceptor.instantiate: ", str, obj, str2 );
return getDelegateMBeanServer().instantiate(str, obj, str2);
|
public final java.lang.Object | instantiate(java.lang.String str, javax.management.ObjectName objectName, java.lang.Object[] obj, java.lang.String[] str3)
debug( "DynamicInterceptor.instantiate: ", str, objectName, obj, str3 );
return getDelegateMBeanServer().instantiate(str, objectName, obj, str3);
|
public java.lang.Object | invoke(javax.management.ObjectName objectName, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
debug( "DynamicInterceptor.invoke(): ", objectName, ".", operationName, "{", params, "}", "{", signature, "}" );
Object result = null;
final DynamicInterceptorHook hook = getHook(objectName);
if ( hook != null )
{
result = hook.invoke( objectName, operationName, params, signature );
}
else
{
result = getDelegateMBeanServer().invoke( objectName, operationName, params, signature );
}
return result;
|
public final boolean | isInstanceOf(javax.management.ObjectName objectName, java.lang.String str)
debug( "DynamicInterceptor.isInstanceOf: ", objectName, str );
return getDelegateMBeanServer().isInstanceOf(objectName, str);
|
public final boolean | isRegistered(javax.management.ObjectName objectName)
boolean isRegistered = getDelegateMBeanServer().isRegistered( objectName );
/*
final DynamicInterceptorHook hook = getHook(objectName);
if ( (! isRegistered) && objectName != null && hook != null )
{
if ( hook.registrationHook( objectName ) )
{
isRegistered = getDelegateMBeanServer().isRegistered( objectName );
}
}
*/
return isRegistered;
|
public final java.util.Set | queryMBeans(javax.management.ObjectName objectName, javax.management.QueryExp expr)
debug( "DynamicInterceptor.queryMBeans: ", objectName, expr );
return getDelegateMBeanServer().queryMBeans( objectName, expr );
|
public final java.util.Set | queryNames(javax.management.ObjectName objectName, javax.management.QueryExp queryExp)
debug( "DynamicInterceptor.queryNames: ", objectName, queryExp );
return getDelegateMBeanServer().queryNames( objectName, queryExp);
|
public final javax.management.ObjectInstance | registerMBean(java.lang.Object obj, javax.management.ObjectName objectName)
checkForIllegalMBean( objectName );
debug( "DynamicInterceptor.registerMBean: ", objectName, obj.getClass().getName() );
return getDelegateMBeanServer().registerMBean( obj, objectName );
|
public final void | removeNotificationListener(javax.management.ObjectName objectName, javax.management.ObjectName objectName1)
debug( "DynamicInterceptor.removeNotificationListener: ", objectName, objectName1 );
getDelegateMBeanServer().removeNotificationListener( objectName, objectName1);
|
public final void | removeNotificationListener(javax.management.ObjectName objectName, javax.management.NotificationListener notificationListener)
debug( "DynamicInterceptor.removeNotificationListener: ", objectName, notificationListener );
getDelegateMBeanServer().removeNotificationListener( objectName, notificationListener);
|
public final void | removeNotificationListener(javax.management.ObjectName objectName, javax.management.NotificationListener notificationListener, javax.management.NotificationFilter notificationFilter, java.lang.Object obj)
debug( "DynamicInterceptor.removeNotificationListener: ",
objectName, notificationListener, notificationFilter, obj);
getDelegateMBeanServer().removeNotificationListener(objectName, notificationListener, notificationFilter, obj);
|
public final void | removeNotificationListener(javax.management.ObjectName objectName, javax.management.ObjectName objectName1, javax.management.NotificationFilter notificationFilter, java.lang.Object obj)
debug( "DynamicInterceptor.removeNotificationListener: ",
objectName, objectName1, notificationFilter, obj);
getDelegateMBeanServer().removeNotificationListener( objectName, objectName1, notificationFilter, obj);
|
public void | setAttribute(javax.management.ObjectName objectName, javax.management.Attribute attribute)
debug( "DynamicInterceptor.setAttribute: ", objectName, attribute );
final DynamicInterceptorHook hook = getHook(objectName);
if ( hook != null )
{
hook.setAttribute( objectName, attribute );
}
else
{
getDelegateMBeanServer().setAttribute( objectName, attribute );
}
|
public javax.management.AttributeList | setAttributes(javax.management.ObjectName objectName, javax.management.AttributeList attributeList)
debug( "DynamicInterceptor.setAttributes: ", objectName, attributeList );
AttributeList result = null;
final DynamicInterceptorHook hook = getHook(objectName);
if ( hook != null )
{
result = hook.setAttributes( objectName, attributeList );
}
else
{
result = getDelegateMBeanServer().setAttributes( objectName, attributeList );
}
return result;
|
public void | setDelegateMBeanServer(javax.management.MBeanServer server)May/must be called once exactly once.
debug( "DynamicInterceptor.setDelegateMBeanServer: " + server.getClass().getName() );
if ( mDelegateMBeanServer != null )
{
throw new IllegalStateException();
}
mDelegateMBeanServer = server;
//System.out.println( "DynamicInterceptor: set mDelegateMBeanServer to " +
// "MBeanServer of class " + server.getClass().getName() );
|
public final void | unregisterMBean(javax.management.ObjectName objectName)
debug( "DynamicInterceptor.unregisterMBean: ", objectName );
getDelegateMBeanServer().unregisterMBean( objectName );
|