FileDocCategorySizeDatePackage
DemoInterfaceProxy.javaAPI DocExample1385Sun Dec 14 22:47:36 GMT 2003oreilly.hcj.proxies

DemoInterfaceProxy

public class DemoInterfaceProxy extends Object
Demonstrates the use of interface based proxies.
author
Robert Simmons jr. (kraythe)
version
$Revision: 1.2 $

Fields Summary
Constructors Summary
Methods Summary
public static final voidcheckCount()
Use a proxy and check the count.

		SomeClass proxy = SomeClassFactory.getSomeClassProxy();
		proxy.someMethod();
		proxy.someOtherMethod("Our Proxy works!");
		if (proxy instanceof SomeClassCountingProxy) {
			System.out.println(((SomeClassCountingProxy)proxy).getInvocationCount());
		}
	
public static final voidmain(java.lang.String[] args)
Run the demonstration.

param
args Command Line Arguments (ignored).

		SomeClass proxy = SomeClassFactory.getSomeClassProxy();
		proxy.someMethod();
		proxy.someOtherMethod("Our Proxy works!");