org.archive.hcc
Class RemoteMBeanInvocationHandler

java.lang.Object
  extended by org.archive.hcc.RemoteMBeanInvocationHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class RemoteMBeanInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

This invocation handler is responsible for proxying calls to and remote notifications from remote mbean instances.

Author:
Daniel Bernstein (dbernstein@archive.org)

Constructor Summary
RemoteMBeanInvocationHandler(javax.management.ObjectName remoteObjectName, javax.management.ObjectName proxyObjectName, javax.management.MBeanServerConnection connection, javax.management.NotificationListener notificationInterceptor)
          Constructs a remote mbean invocation handler.
 
Method Summary
 javax.management.ObjectName getProxyObjectName()
           
 javax.management.ObjectName getRemoteObjectName()
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          Invokes the specified method on the remote mbean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteMBeanInvocationHandler

public RemoteMBeanInvocationHandler(javax.management.ObjectName remoteObjectName,
                                    javax.management.ObjectName proxyObjectName,
                                    javax.management.MBeanServerConnection connection,
                                    javax.management.NotificationListener notificationInterceptor)
Constructs a remote mbean invocation handler.

Parameters:
remoteObjectName -
proxyObjectName -
connection -
notificationInterceptor -
Method Detail

getRemoteObjectName

public javax.management.ObjectName getRemoteObjectName()

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Invokes the specified method on the remote mbean. If the method doesn't match a method on the DynamicMBean or NotificationEmitter, the method is invoked on the remote invocation handler directly (ie equals and hashCode);

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Parameters:
proxy -
method -
args -
Returns:
Result object.
Throws:
java.lang.Throwable

getProxyObjectName

public javax.management.ObjectName getProxyObjectName()


Copyright © 2005-2008 The Internet Archive. All Rights Reserved.