com.sapportals.wcm.crt.component
Interface IProxy
- All Superinterfaces:
- IContextualizable, InvocationHandler
public interface IProxy
- extends IContextualizable, InvocationHandler
An interface to mark a component as a proxy.
A proxy component processes a component's method invocations. invoke will be invoked on a
proxy when a method is invoked on a component instance that it is associated
with.
Proxies could implement invoke like in the following example:
public Object invoke( Object proxy, Method m, Object[] args ) throws Throwable {
Object result = null;
try {
....preInvoke
// call the method
result = m.invoke( component, args );
} catch( InvocationTargetException e ) {
throw e.getTargetException();
} catch( Exception e ) {
getCategory().error( e.getMessage(), e );
throw new RuntimeException( "unexpected invocation exception: " + e.getMessage() );
} finally {
....postInvoke
}
return result;
}
A proxy-armed component could be added during configuration time like in the
following code example:
DefaultConfiguration component = new DefaultConfiguration( IConfigConst.ELEMENTS.COMPONENT );
component.setAttribute( IConfigConst.ATTRIBUTES.COMPONENT_CLASS, SomeComponent.class.getName() );
component.setAttribute( IConfigConst.ATTRIBUTES.COMPONENT_KEY, "someKey" );
component.setAttribute( IConfigConst.ATTRIBUTES.COMPONENT_PROXY, ProxyComponent.class.getName() );
Or during runtime like in the following example:
getContainerManager().addChild( key, className, proxyName, config, params );
Copyright (c) SAP AG 2001-2002
getInterfaces
Class[] getInterfaces()
- Returns the interface closure the proxy implements
- Returns:
- interfaces
This class can be accessed from:
|
SC
|
DC
|
Public Part
|
ACH
|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2014 SAP AG Complete Copyright Notice