org.jboss.seam.jmx
Class JMXInvocationHandler

java.lang.Object
  extended by org.jboss.seam.jmx.JMXInvocationHandler
All Implemented Interfaces:
Serializable, InvocationHandler, ProxyContext

public class JMXInvocationHandler
extends Object
implements ProxyContext, InvocationHandler, Serializable

Invocation handler for MBean proxies.

Version:
$Revision: 81019 $
Author:
Juha Lindfors.
See Also:
Serialized Form

Field Summary
protected  ObjectName objectName
          The object name of the MBean this proxy represents.
protected  MBeanServer server
          Reference to the MBean server this proxy connects to.
 
Constructor Summary
JMXInvocationHandler(MBeanServer server, ObjectName name)
          Constructs a new JMX MBean Proxy invocation handler.
 
Method Summary
 ProxyExceptionHandler getExceptionHandler()
           
 MBeanServer getMBeanServer()
           
 ObjectName getObjectName()
           
 Object invoke(Object proxy, Method method, Object[] args)
           
 void setExceptionHandler(ProxyExceptionHandler handler)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

server

protected MBeanServer server
Reference to the MBean server this proxy connects to.


objectName

protected ObjectName objectName
The object name of the MBean this proxy represents.

Constructor Detail

JMXInvocationHandler

public JMXInvocationHandler(MBeanServer server,
                            ObjectName name)
                     throws MBeanProxyCreationException
Constructs a new JMX MBean Proxy invocation handler.

Parameters:
server - reference to the MBean server this proxy connects to
name - object name of the MBean this proxy represents
Throws:
MBeanProxyCreationException - wraps underlying JMX exceptions in case the proxy creation fails
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Exception
Specified by:
invoke in interface InvocationHandler
Throws:
Exception

getExceptionHandler

public ProxyExceptionHandler getExceptionHandler()

setExceptionHandler

public void setExceptionHandler(ProxyExceptionHandler handler)
Specified by:
setExceptionHandler in interface ProxyContext

getMBeanServer

public MBeanServer getMBeanServer()
Specified by:
getMBeanServer in interface ProxyContext

getObjectName

public ObjectName getObjectName()
Specified by:
getObjectName in interface ProxyContext

toString

public String toString()
Overrides:
toString in class Object