|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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
| Method Summary | |
Class[] |
getInterfaces()
Returns the interface closure the proxy implements |
| Methods inherited from interface com.sapportals.wcm.crt.component.IContextualizable |
contextualize |
| Methods inherited from interface java.lang.reflect.InvocationHandler |
invoke |
| Method Detail |
public Class[] getInterfaces()
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||