FileDocCategorySizeDatePackage
DelegateLoggingWrapper.javaAPI DocExample1979Mon Nov 24 09:23:46 GMT 2003com.oreilly.patterns.chapter9

DelegateLoggingWrapper

public final class DelegateLoggingWrapper extends Object

Fields Summary
Constructors Summary
Methods Summary
static java.lang.Objectdecorate(java.lang.Object delegate)
Decorates a business delegate object with a Logging Wrapper. The object returned by this method will implement all of the interfaces originally implemented by the target and loaded by the same class loader as that of the target.

param
delegate The Business Delegate to wrap
return
The business delegate wrapped in this wrapper

        return Proxy.newProxyInstance(
            delegate.getClass().getClassLoader(),
            delegate.getClass().getInterfaces(),
            new LoggingWrapperHandler(delegate));