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

All Known Subinterfaces:
Interceptor
All Known Implementing Classes:
AbstractInterceptor, DefaultConfigurationInterceptor, DefaultLifecycleInterceptor, DefaultManagementInterceptorImpl, DefaultStatisticsInterceptor, ProxyInvoker

public interface Decorator

Instances of this interface are used to expose additional capabilities onto a carbon component by being represented in the component facade. The classes that are exposed are defined through the getExposedInterfaces method. Those classes are then recognized by the component facade to be implemented by the decorator object that declared them. All calls to those interfaces are targeted for execution by that decorator.

Copyright 2002 Sapient

Since:
carbon 2.0
Version:
$Revision: 1.4 $($Author: dvoet $ / $Date: 2003/05/05 21:21:14 $)
Author:
Greg Hinkle, March 2003

Method Summary
 Class[] getExposedInterfaces()
          This should return the list of interfaces that a decorator wishes to expose through the component proxy.
 void setComponentReference(Component component)
          Called after creation to pass a reference to the component to each of its decorators.
 

Method Detail

getExposedInterfaces

public Class[] getExposedInterfaces()
This should return the list of interfaces that a decorator wishes to expose through the component proxy. This is used by the component factory to determine what interfaces the component proxy will implement.

Returns:
Class[] an array of interfaces

setComponentReference

public void setComponentReference(Component component)
Called after creation to pass a reference to the component to each of its decorators. The component reference should not be used within this method because not all other interceptors have this reference yet and they may rely on this reference thus leading to null pointer exceptions.

Parameters:
component - a reference to the component that this interceptor is assisting


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.