org.rhq.bindings.client
Class AbstractRhqFacadeProxy<T extends RhqFacade>
java.lang.Object
org.rhq.bindings.client.AbstractRhqFacadeProxy<T>
- All Implemented Interfaces:
- InvocationHandler
public abstract class AbstractRhqFacadeProxy<T extends RhqFacade>
- extends Object
- implements InvocationHandler
An abstract InvocationHandler to help the script users create proxies to actually call the
correct methods on RHQ. This base implementation provides its inheritors with the facade impl and the concrete
manager they should invoke the methods on and does the "de-simplification" of the arguments (i.e. the opposite of InterfaceSimplifier.simplify(Class).
- Author:
- Lukas Krejci
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRhqFacadeProxy
protected AbstractRhqFacadeProxy(T facade,
RhqManagers manager)
getRhqFacade
protected T getRhqFacade()
getManager
protected RhqManagers getManager()
invoke
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
- Specified by:
invoke in interface InvocationHandler
- Throws:
Throwable
doInvoke
protected abstract Object doInvoke(Object proxy,
Method originalMethod,
Class<?>[] argTypes,
Object[] args)
throws Throwable
- This method actually calls the method according to the RhqFacade's implementation. The
argTypes
and args are de-simplified (and thus the method can't be supplied just as a simple Method instance).
- Parameters:
proxy - the proxy the method is executing onoriginalMethod - the original methodargTypes - the de-simplified argument typesargs - the de-simplified argumens
- Returns:
- the result of the invocation
- Throws:
Throwable - if invocation throws an error
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.