org.apache.wicket.session.pagemap
Class AbstractPageMapEntry

java.lang.Object
  extended by org.apache.wicket.session.pagemap.AbstractPageMapEntry
All Implemented Interfaces:
java.io.Serializable, IClusterable, IPageMapEntry

public abstract class AbstractPageMapEntry
extends java.lang.Object
implements IPageMapEntry

An abstract base class that makes it easier to create IPageMapEntry implementations.

Author:
Jonathan Locke
See Also:
Serialized Form

Constructor Summary
AbstractPageMapEntry()
           
 
Method Summary
 int getNumericId()
           
abstract  Page getPage()
           
 java.lang.Class getPageClass()
          Failing to override this method could be pretty expensive because this default implementation calls getPage(), which probably creates the page.
 void setNumericId(int id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPageMapEntry

public AbstractPageMapEntry()
Method Detail

getNumericId

public int getNumericId()
Specified by:
getNumericId in interface IPageMapEntry
Returns:
A stable identifier for this page map entry
See Also:
IPageMapEntry.getNumericId()

getPage

public abstract Page getPage()
Specified by:
getPage in interface IPageMapEntry
Returns:
Gets the page, possibly creating it on the fly.
See Also:
IPageMapEntry.getPage()

getPageClass

public java.lang.Class getPageClass()
Failing to override this method could be pretty expensive because this default implementation calls getPage(), which probably creates the page. That's a lot of work to do in order to simply determine the page's class. So, if there's an easy way to implement this method, that might be desirable.

Specified by:
getPageClass in interface IPageMapEntry
Returns:
The class of page stored in this page map entry (which can be used by an eviction strategy to prioritize evictions)
See Also:
IPageMapEntry.getPageClass()

setNumericId

public void setNumericId(int id)
Specified by:
setNumericId in interface IPageMapEntry
Parameters:
id - The numeric id for this entry
See Also:
IPageMapEntry.setNumericId(int)


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.