Package org.apache.wicket.protocol.http.pagestore.SerializedPagesCache

Examples of org.apache.wicket.protocol.http.pagestore.SerializedPagesCache.SerializedPageWithSession


    {
      SerializedPage sp = (SerializedPage)i.next();
      pages.add(new SerializedPage(sp.getPageId(), sp.getPageMapName(),
        sp.getVersionNumber(), sp.getAjaxVersionNumber(), null));
    }
    return new SerializedPageWithSession(page.sessionId, page.pageId, page.pageMapName,
      page.versionNumber, page.ajaxVersionNumber, pages);
  }
View Full Code Here


      pages.add(new SerializedPage(sp.getPageId(), sp.getPageMapName(),
        sp.getVersionNumber(), sp.getAjaxVersionNumber(), data));
    }

    return new SerializedPageWithSession(page.sessionId, page.pageId, page.pageMapName,
      page.versionNumber, page.ajaxVersionNumber, pages);
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Serializable prepareForSerialization(String sessionId, Object page)
  {
    SerializedPageWithSession result = null;
    if (page instanceof Page)
    {
      result = serializedPagesCache.getPage((Page)page);
      if (result == null)
      {
        List serialized = serializePage((Page)page);
        result = serializedPagesCache.storePage(sessionId, (Page)page, serialized);
      }
    }
    else if (page instanceof SerializedPageWithSession)
    {
      SerializedPageWithSession serialized = (SerializedPageWithSession)page;
      if (serialized.page.get() == SerializedPageWithSession.NO_PAGE)
      {
        // stripped page, need to restore it first
        result = restoreStrippedSerializedPage(serialized);
      }
View Full Code Here

    {
      return serializable;
    }
    else if (serializable instanceof SerializedPageWithSession)
    {
      SerializedPageWithSession page = (SerializedPageWithSession)serializable;
      if (page.page == null || page.page.get() != SerializedPageWithSession.NO_PAGE)
      {
        storeSerializedPages(page.sessionId, page.pages);
        return stripSerializedPage(page);
      }
View Full Code Here

    {
      return (Page)page;
    }
    else if (page instanceof SerializedPageWithSession)
    {
      SerializedPageWithSession serialized = (SerializedPageWithSession)page;

      if (serialized.page == null ||
        serialized.page.get() != SerializedPageWithSession.NO_PAGE)
      {
        storeSerializedPages(serialized.sessionId, serialized.pages);
View Full Code Here

    {
      SerializedPage sp = (SerializedPage)i.next();
      pages.add(new SerializedPage(sp.getPageId(), sp.getPageMapName(),
        sp.getVersionNumber(), sp.getAjaxVersionNumber(), null));
    }
    return new SerializedPageWithSession(page.sessionId, page.pageId, page.pageMapName,
      page.versionNumber, page.ajaxVersionNumber, pages);
  }
View Full Code Here

      pages.add(new SerializedPage(sp.getPageId(), sp.getPageMapName(),
        sp.getVersionNumber(), sp.getAjaxVersionNumber(), data));
    }

    return new SerializedPageWithSession(page.sessionId, page.pageId, page.pageMapName,
      page.versionNumber, page.ajaxVersionNumber, pages);
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public Serializable prepareForSerialization(String sessionId, Object page)
  {
    SerializedPageWithSession result = null;
    if (page instanceof Page)
    {
      result = serializedPagesCache.getPage((Page)page);
      if (result == null)
      {
        List serialized = serializePage((Page)page);
        result = serializedPagesCache.storePage(sessionId, (Page)page, serialized);
      }
    }
    else if (page instanceof SerializedPageWithSession)
    {
      SerializedPageWithSession serialized = (SerializedPageWithSession)page;
      if (serialized.page.get() == SerializedPageWithSession.NO_PAGE)
      {
        // stripped page, need to restore it first
        result = restoreStrippedSerializedPage(serialized);
      }
View Full Code Here

    {
      return serializable;
    }
    else if (serializable instanceof SerializedPageWithSession)
    {
      SerializedPageWithSession page = (SerializedPageWithSession)serializable;
      if (page.page == null || page.page.get() != SerializedPageWithSession.NO_PAGE)
      {
        storeSerializedPages(page.sessionId, page.pages);
        return stripSerializedPage(page);
      }
View Full Code Here

    {
      return (Page)page;
    }
    else if (page instanceof SerializedPageWithSession)
    {
      SerializedPageWithSession serialized = (SerializedPageWithSession)page;

      if (serialized.page == null ||
        serialized.page.get() != SerializedPageWithSession.NO_PAGE)
      {
        storeSerializedPages(serialized.sessionId, serialized.pages);
View Full Code Here

TOP

Related Classes of org.apache.wicket.protocol.http.pagestore.SerializedPagesCache.SerializedPageWithSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.