org.apache.avalon.activation.impl
Class ApplianceInvocationHandler

java.lang.Object
  extended byorg.apache.avalon.activation.impl.ApplianceInvocationHandler
All Implemented Interfaces:
InvocationHandler, Reclaimer

public final class ApplianceInvocationHandler
extends Object
implements InvocationHandler, Reclaimer

This makes a dynamic proxy for an object. The object can be represented by one, some or all of it's interfaces.

Version:
$Revision: 1.1.1.2 $ $Date: 2004/05/19 09:27:18 $
Author:
Avalon Development Team

Constructor Summary
protected ApplianceInvocationHandler(DefaultAppliance appliance, Logger logger, boolean secure)
          Create a proxy invocation handler.
 
Method Summary
protected  void finalize()
           
 Object invoke(Object proxy, Method method, Object[] args)
          Invoke the specified method on underlying object.
 void release()
          Release the reclaimable object.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplianceInvocationHandler

protected ApplianceInvocationHandler(DefaultAppliance appliance,
                                     Logger logger,
                                     boolean secure)
Create a proxy invocation handler.

Parameters:
appliance - the runtime appliance
logger - the assigned logging channel
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Invoke the specified method on underlying object. This is called by the proxy object.

Specified by:
invoke in interface InvocationHandler
Parameters:
proxy - the proxy object
method - the method invoked on proxy object
args - the arguments supplied to method
Returns:
the return value of method
Throws:
Throwable - if an error occurs

release

public void release()
Description copied from interface: Reclaimer
Release the reclaimable object.

Specified by:
release in interface Reclaimer

finalize

protected void finalize()
                 throws Throwable
Throws:
Throwable


Copyright © The Apache Software Foundation. All Rights Reserved.