Package org.apache.wicket.session.pagemap

Examples of org.apache.wicket.session.pagemap.IPageMapEntry


  {
    long size = Objects.sizeof(this);
    Iterator<IPageMapEntry> it = getEntries().iterator();
    while (it.hasNext())
    {
      IPageMapEntry entry = it.next();
      if (entry instanceof Page)
      {
        size += ((Page)entry).getSizeInBytes();
      }
      else
View Full Code Here


  {
    long size = Objects.sizeof(this);
    Iterator<IPageMapEntry> it = getEntries().iterator();
    while (it.hasNext())
    {
      IPageMapEntry entry = it.next();
      if (entry instanceof Page)
      {
        size += ((Page)entry).getSizeInBytes();
      }
      else
View Full Code Here

       */
      @Override
      protected void populateItem(final ListItem<Access> listItem)
      {
        final Access access = listItem.getModelObject();
        IPageMapEntry entry = pageMap.getEntry(access.getId());
        PageParameters parameters = new PageParameters();
        parameters.put("pageId", "" + entry.getNumericId());
        Link<?> link = new BookmarkablePageLink("link", InspectorPage.class, parameters);
        link.add(new Label<String>("id", "" + entry.getNumericId()));
        listItem.add(link);
        listItem.add(new Label<String>("class", "" + entry.getClass().getName()));
        long size;
        int versions;
        if (entry instanceof Page)
        {
          Page<?> page = (Page<?>)entry;
View Full Code Here

   */
  public InspectorPage(final PageParameters parameters)
  {
    add(new ApplicationView("application", Application.get()));
    add(new SessionView("session", Session.get()));
    IPageMapEntry entry = null;
    try
    {
      entry = getPageMap().getEntry(parameters.getInt("pageId"));
    }
    catch (StringValueConversionException e)
    {
      // Ignore
    }
    add(new PageView("page", entry == null ? null : entry.getPage()));
    add(new Image<Void>("bug"));
    add(new BookmarkablePageLink("allsessions", LiveSessionsPage.class));
    add(new Label<String>("wicketVersion", getApplication().getFrameworkSettings().getVersion()));
  }
View Full Code Here

   * @return Any page having the given id
   */
  @Override
  public final Page<?> get(final int id, int versionNumber)
  {
    final IPageMapEntry entry = (IPageMapEntry)getSession().getAttribute(attributeForId(id));
    if (entry != null)
    {
      // Get page as dirty
      Page<?> page = entry.getPage();

      // TODO Performance: Is this really the case is a page always dirty
      // even if we just render it again? POSSIBLE ANSWER: The page could
      // mark itself as clean to prevent replication, but the reverse is
      // probably not desirable (pages marking themselves dirty manually)
View Full Code Here

    // Page only goes into session if it is stateless
    if (!page.isPageStateless())
    {
      Session session = getSession();
      // Get page map entry from page
      final IPageMapEntry entry = page.getPageMapEntry();

      // Entry has been accessed
      pushAccess(entry);

      // Store entry in session
      final String attribute = attributeForId(entry.getNumericId());

      if (session.getAttribute(attribute) == null)
      {
        // Set attribute if it is a new page, so that it will exists
        // already for other threads that can come on the same time.
View Full Code Here

        {
          // Pop unreachable access off top of stack
          final Access topAccess = popAccess();

          // Get entry for access
          final IPageMapEntry top = getEntry(topAccess.getId());

          // If it's a page we can remove version info
          if (top instanceof Page)
          {
            // If there's more than one version
View Full Code Here

  {
    long size = Objects.sizeof(this);
    Iterator<IPageMapEntry> it = getEntries().iterator();
    while (it.hasNext())
    {
      IPageMapEntry entry = it.next();
      if (entry instanceof Page)
      {
        size += ((Page<?>)entry).getSizeInBytes();
      }
      else
View Full Code Here

    {
      if (set)
      {
        Page.serializer.set(new PageSerializer(null));
      }
      IPageMapEntry entry = (IPageMapEntry)Objects.byteArrayToObject(data);
      if (entry != null)
      {
        page = entry.getPage();
        if (versionNumber != -1)
        {
          page = page.getVersion(versionNumber);
        }
      }
View Full Code Here

    {
      if (set)
      {
        Page.serializer.set(new PageSerializer(null));
      }
      IPageMapEntry entry = (IPageMapEntry)Objects.byteArrayToObject(data);
      if (entry != null)
      {
        page = entry.getPage();
        if (versionNumber != -1)
        {
          page = page.getVersion(versionNumber);
        }
      }
View Full Code Here

TOP

Related Classes of org.apache.wicket.session.pagemap.IPageMapEntry

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.