com.guiseframework.prototype
Class AbstractCompositeComponentPrototypeProvisionStrategy

java.lang.Object
  extended by java.util.concurrent.locks.ReentrantReadWriteLock
      extended by com.guiseframework.prototype.AbstractPrototypeProvisionStrategy
          extended by com.guiseframework.prototype.AbstractCompositeComponentPrototypeProvisionStrategy
All Implemented Interfaces:
java.io.Serializable, java.util.concurrent.locks.ReadWriteLock
Direct Known Subclasses:
AbstractMenuToolCompositeComponentPrototypeProvisionStrategy

public abstract class AbstractCompositeComponentPrototypeProvisionStrategy
extends AbstractPrototypeProvisionStrategy

Abstract strategy for keeping track of prototype providers and working with provisioned prototypes. When the prototype providers change provided prototypes, those provided prototypes are processed. This version monitors the parent composite component children and automatically uses top-level prototype providers added to or removed from the hierarchy. Prototype provisions are not processed initially; this strategy should be initialized after construction by calling AbstractPrototypeProvisionStrategy.processPrototypeProvisions(). This class is thread safe based upon its exposed read and write locks.

Author:
Garret Wilson
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.locks.ReentrantReadWriteLock
java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock, java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock
 
Constructor Summary
AbstractCompositeComponentPrototypeProvisionStrategy(CompositeComponent parentComponent, PrototypeProvider... basePrototypeProviders)
          Parent component and prototype providers constructor.
 
Method Summary
protected  CompositeComponent getParentComponent()
           
 
Methods inherited from class com.guiseframework.prototype.AbstractPrototypeProvisionStrategy
addPrototypeProvider, gatherPrototypeProvisions, getPrototypeProviders, processPrototypeProvisions, processPrototypeProvisions, removePrototypeProvider
 
Methods inherited from class java.util.concurrent.locks.ReentrantReadWriteLock
getOwner, getQueuedReaderThreads, getQueuedThreads, getQueuedWriterThreads, getQueueLength, getReadHoldCount, getReadLockCount, getWaitingThreads, getWaitQueueLength, getWriteHoldCount, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isWriteLocked, isWriteLockedByCurrentThread, readLock, toString, writeLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractCompositeComponentPrototypeProvisionStrategy

public AbstractCompositeComponentPrototypeProvisionStrategy(CompositeComponent parentComponent,
                                                            PrototypeProvider... basePrototypeProviders)
Parent component and prototype providers constructor.

Parameters:
parentComponent - The composite component the top-level prototype provider children of which will be monitored.
basePrototypeProviders - The base prototype providers that will provide prototypes for processing, outside the children of the composite component parent.
Throws:
java.lang.NullPointerException - if the given parent component, prototype providers, and/or one or more prototype provider is null.
Method Detail

getParentComponent

protected CompositeComponent getParentComponent()
Returns:
The composite component the top-level prototype provider children of which will be monitored.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.