Methods Summary |
---|
public static final SomeClassCountingProxy | getCountingProxy()Gets a counting proxy to an object that is constructed with the user name.
SomeClassImpl impl = new SomeClassImpl(System.getProperty("user.name"));
return new SomeClassCountingProxy(impl);
|
public static final SomeClass | getDynamicSomeClassProxy()Gets proxy to depending upon debug status in Log4J.
SomeClassImpl impl = new SomeClassImpl(System.getProperty("user.name"));
InvocationHandler handler = new MethodCountingHandler(impl);
Class[] interfaces = new Class[] { SomeClass.class };
ClassLoader loader = SomeClassFactory.class.getClassLoader();
SomeClass proxy = (SomeClass)Proxy.newProxyInstance(loader, interfaces, handler);
return proxy;
|
public static final SomeClassProxy | getProxy()Gets a proxy to an object that is constructed with the user name.
SomeClassImpl impl = new SomeClassImpl(System.getProperty("user.name"));
return new SomeClassProxy(impl);
|
public static final SomeClass | getSomeClassProxy()Gets proxy to depending upon debug status in Log4J.
SomeClassImpl impl = new SomeClassImpl(System.getProperty("user.name"));
if (LOGGER.isDebugEnabled()) {
return new SomeClassCountingProxy(impl);
} else {
return new SomeClassProxy(impl);
}
|