org.sape.carbon.core.component.proxy
Interface ComponentProxyInvocationHandler

All Superinterfaces:
InvocationHandler
All Known Implementing Classes:
DefaultComponentProxyInvocationHandler

public interface ComponentProxyInvocationHandler
extends InvocationHandler

This interface will be implemented by objects wishing to be InvocationHandlers for a component's proxy object. The ComponentProxy is the object that aggregates all of a component's parts.

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.20 $($Author: dvoet $ / $Date: 2003/05/05 21:21:14 $)
Author:
Greg Hinkle, January 2002

Method Summary
 void addDecorator(Decorator decorator)
          Method used during creation of the proxy object to add Assistants to the component.
 String getComponentName()
          Returns the name of the wrapped component.
 Object getDelegate(Class delegateInterface)
          Retrieves the delegate class that will be invoked for calls to the provide interface class.
 ReadWriteLock getMonitor()
          Retrieves the monitor object for the component represented by the proxy object implemented through this invocation handler.
 void setComponentName(String name)
          Sets the name of wrapped component.
 void setFunctionalImplementation(Class[] implementedInterfaces, FunctionalInterface functionalImplementation)
          Method used during creation of the proxy object to add the functional implementation to the component.
 
Methods inherited from interface java.lang.reflect.InvocationHandler
invoke
 

Method Detail

addDecorator

public void addDecorator(Decorator decorator)
Method used during creation of the proxy object to add Assistants to the component. This mehtod should be called only from the ComponentFactory when it is creating a new component.

Since:
carbon 2.0
See Also:
ComponentFactory

setFunctionalImplementation

public void setFunctionalImplementation(Class[] implementedInterfaces,
                                        FunctionalInterface functionalImplementation)
Method used during creation of the proxy object to add the functional implementation to the component. This mehtod should be called only from the ComponentFactory when it is creating a new component.

Parameters:
implementedInterfaces - all the interfaces (including super interfaces) implemented by functionalImplementation's FunctionalInterface
functionalImplementation - the object that implements the components FunctionalInterface
See Also:
ComponentFactory

getDelegate

public Object getDelegate(Class delegateInterface)
Retrieves the delegate class that will be invoked for calls to the provide interface class.

Parameters:
delegateInterface - the interface to look for the delegate of
Returns:
Object the instance of the delegate

getMonitor

public ReadWriteLock getMonitor()
Retrieves the monitor object for the component represented by the proxy object implemented through this invocation handler.

Returns:
a read write lock for this component

getComponentName

public String getComponentName()
Returns the name of the wrapped component.

Returns:
String

setComponentName

public void setComponentName(String name)
Sets the name of wrapped component.

Parameters:
name - the name of the component


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.