com.wiley.posa3.lazyacquisition
Class ResourceProxy

java.lang.Object
  extended bycom.wiley.posa3.lazyacquisition.ResourceProxy
All Implemented Interfaces:
Resource

public class ResourceProxy
extends java.lang.Object
implements Resource

A ResourceProxy intercepts resource acquisitions by the resource user and hands the lazily acquired resources to the resource user.

Version:
1.0
Author:
Michael Kircher, Prashant Jain

Constructor Summary
ResourceProxy()
           
 
Method Summary
 Identity getId()
          Get the identity of this resource
 void method1()
          Some generic method.
 void method2()
          Some generic method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceProxy

public ResourceProxy()
Method Detail

getId

public Identity getId()
Get the identity of this resource

Specified by:
getId in interface Resource
Returns:
The identity of this resource

method1

public void method1()
Some generic method. When this method is invoked, if the actual resource has not been acquired, the proxy first acquires the resource and then invokes the method on that resource.

Specified by:
method1 in interface Resource

method2

public void method2()
Some generic method. When this method is invoked, if the actual resource has not been acquired, the proxy first acquires the resource and then invokes the method on that resource.

Specified by:
method2 in interface Resource


Copyright 2004 John Wiley and Sons. All Rights Reserved.