org.oddjob.jmx.general
Class SimpleMBeanNode

java.lang.Object
  extended by org.oddjob.jmx.general.SimpleMBeanNode
All Implemented Interfaces:
org.apache.commons.beanutils.DynaBean, Describeable, Iconic, Destroyable, MBeanNode, LogEnabled, Invoker

public class SimpleMBeanNode
extends Object
implements MBeanNode, Describeable, LogEnabled, Iconic

A Simple implementation of an MBeanNode.

Author:
rob

Constructor Summary
SimpleMBeanNode(ObjectName objectName, MBeanServerConnection mBeanServer, ClassResolver classResolver)
          Constructor
 
Method Summary
 void addIconListener(IconListener listener)
          Add a listener.
 boolean contains(String arg0, String arg1)
           
 Map<String,String> describe()
          Provides the properties.
 void destroy()
          destroy the client side object.
 Object get(String name)
           
 Object get(String arg0, int arg1)
           
 Object get(String arg0, String arg1)
           
 org.apache.commons.beanutils.DynaClass getDynaClass()
           
 ImageIcon iconForId(String id)
          Return the IconTip (Icon and ToolTip pair).
 void initialise()
          Called from the DomainNode to initialise this node.
 Object invoke(String name, InvokerArguments args)
          Invoke something.
 String loggerName()
          Provide the logger name.
 void remove(String arg0, String arg1)
           
 void removeIconListener(IconListener listener)
          Remove a listener.
 void set(String arg0, int arg1, Object arg2)
           
 void set(String name, Object value)
           
 void set(String arg0, String arg1, Object arg2)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleMBeanNode

public SimpleMBeanNode(ObjectName objectName,
                       MBeanServerConnection mBeanServer,
                       ClassResolver classResolver)
                throws IntrospectionException,
                       InstanceNotFoundException,
                       ReflectionException,
                       IOException
Constructor

Parameters:
objectName -
mBeanServer -
classResolver -
Throws:
IntrospectionException
InstanceNotFoundException
ReflectionException
IOException
Method Detail

initialise

public void initialise()
Description copied from interface: MBeanNode
Called from the DomainNode to initialise this node.

Specified by:
initialise in interface MBeanNode

loggerName

public String loggerName()
Description copied from interface: LogEnabled
Provide the logger name. The name should be unique for each component that is LogEnabled.

Specified by:
loggerName in interface LogEnabled
Returns:
A logger name. Never Null.

invoke

public Object invoke(String name,
                     InvokerArguments args)
Description copied from interface: Invoker
Invoke something.

Specified by:
invoke in interface Invoker
Parameters:
name - The name of the thing to be invoked.
args - Parameters. never null.
Returns:
The result of doing the invoking.

addIconListener

public void addIconListener(IconListener listener)
Description copied from interface: Iconic
Add a listener.

Specified by:
addIconListener in interface Iconic
Parameters:
listener - The IconListener.

iconForId

public ImageIcon iconForId(String id)
Description copied from interface: Iconic
Return the IconTip (Icon and ToolTip pair).

Specified by:
iconForId in interface Iconic
Parameters:
id - The icon id.
Returns:
The IconTip or null if it doesn't exist.

removeIconListener

public void removeIconListener(IconListener listener)
Description copied from interface: Iconic
Remove a listener.

Specified by:
removeIconListener in interface Iconic
Parameters:
listener - The IconListener.

toString

public String toString()
Overrides:
toString in class Object

contains

public boolean contains(String arg0,
                        String arg1)
Specified by:
contains in interface org.apache.commons.beanutils.DynaBean

get

public Object get(String name)
Specified by:
get in interface org.apache.commons.beanutils.DynaBean

get

public Object get(String arg0,
                  int arg1)
Specified by:
get in interface org.apache.commons.beanutils.DynaBean

get

public Object get(String arg0,
                  String arg1)
Specified by:
get in interface org.apache.commons.beanutils.DynaBean

getDynaClass

public org.apache.commons.beanutils.DynaClass getDynaClass()
Specified by:
getDynaClass in interface org.apache.commons.beanutils.DynaBean

remove

public void remove(String arg0,
                   String arg1)
Specified by:
remove in interface org.apache.commons.beanutils.DynaBean

set

public void set(String name,
                Object value)
Specified by:
set in interface org.apache.commons.beanutils.DynaBean

set

public void set(String arg0,
                int arg1,
                Object arg2)
Specified by:
set in interface org.apache.commons.beanutils.DynaBean

set

public void set(String arg0,
                String arg1,
                Object arg2)
Specified by:
set in interface org.apache.commons.beanutils.DynaBean

describe

public Map<String,String> describe()
Description copied from interface: Describeable
Provides the properties.

Specified by:
describe in interface Describeable
Returns:
A map of property values. Must not be null.

destroy

public void destroy()
Description copied from interface: Destroyable
destroy the client side object.

Specified by:
destroy in interface Destroyable