webwork.dispatcher
Class CachingViewMapping

java.lang.Object
  extended bywebwork.dispatcher.CachingViewMapping
All Implemented Interfaces:
ViewMapping

public class CachingViewMapping
extends java.lang.Object
implements ViewMapping

Caching view mapping. This mapping only delegates to other mapping implementations, and will cache the result so that subsequent mappings for the same actionName/viewName tuple is retrieved from this cache instead. Do not use this if you want to be able to update the mappings at runtime.

Version:
$Revision: 1.5 $
Author:
Rickard Öberg (rickard@middleware-company.com)

Field Summary
protected  java.util.Map cache
           
protected  ViewMapping delegate
           
protected  java.lang.Object NULL_VIEW
           
 
Constructor Summary
CachingViewMapping(ViewMapping aDelegate)
           
 
Method Summary
 java.lang.Object getView(java.lang.String anActionName, java.lang.String aViewName)
          Get view corresponding to given action and view names
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

protected ViewMapping delegate

cache

protected java.util.Map cache

NULL_VIEW

protected final java.lang.Object NULL_VIEW
Constructor Detail

CachingViewMapping

public CachingViewMapping(ViewMapping aDelegate)
Method Detail

getView

public java.lang.Object getView(java.lang.String anActionName,
                                java.lang.String aViewName)
Get view corresponding to given action and view names

Specified by:
getView in interface ViewMapping


Copyright © 2001-2003 WebWork All Rights Reserved.