Package org.wicketstuff.pageserializer.kryo2.pages

Examples of org.wicketstuff.pageserializer.kryo2.pages.SamplePage


  @Test
  public void samplepageRendersSuccessfully()
  {
    // start and render the test page
    SamplePage page = tester.startPage(SamplePage.class,
        new PageParameters().add("Test", "asString"));

    // assert rendered page class
    tester.assertRenderedPage(SamplePage.class);

    ISerializer pageSerializer = getAndCheckSerializer();

    byte[] data = pageSerializer.serialize(page);
    Assert.assertNotNull("The produced data should not be null!", data);

    Object object = pageSerializer.deserialize(data);
    Assert.assertTrue(
        "The deserialized page must be of type HomePage. Type: " + object.getClass(),
        object instanceof SamplePage);

    SamplePage samplePage = (SamplePage)object;

    tester.startPage(samplePage);

    // assert rendered page class
    tester.assertRenderedPage(SamplePage.class);
View Full Code Here


{
  public NotSerializablePage(PageParameters pageParameters)
  {
    super(pageParameters);
   
    add(new NotSerializablePanel("not"));
  }
View Full Code Here

  private final PageParameters pageParameters;

  public SamplePage(PageParameters pageParameters)
  {
    this.pageParameters = pageParameters;
    add(new SamplePanel("sample"));
  }
View Full Code Here

    ISerializationListener listener = SerializationListeners.listOf(
      new DefaultJavaSerializationValidator(),
      new AnalyzingSerializationListener(labelizer, cleanedTreeProcessor));


    getFrameworkSettings().setSerializer(new InspectingKryoSerializer(Bytes.bytes(1024*1024),listener));
  }
 
View Full Code Here

      ISerializationListener serializationListener = SerializationListeners.listOf(
        new DefaultJavaSerializationValidator(), new AnalyzingSerializationListener(
          new NativeTypesAsLabel(new ComponentIdAsLabel()), treeProcessors));


      InspectingKryoSerializer serializer = new InspectingKryoSerializer(Bytes.megabytes(1L),
        serializationListener);

      getFrameworkSettings().setSerializer(serializer);

View Full Code Here

    ISerializationListener serializationListener = SerializationListeners.listOf(
      new DefaultJavaSerializationValidator(), new AnalyzingSerializationListener(
        new NativeTypesAsLabel(new ComponentIdAsLabel()), treeProcessors));


    InspectingKryoSerializer serializer = new InspectingKryoSerializer(Bytes.megabytes(1L),
      serializationListener);

    getFrameworkSettings().setSerializer(serializer);
  }
View Full Code Here

      }
    };
    ISerializedObjectTreeProcessor cleanedTreeProcessor = new TreeTransformator(treeProcessor,
      TreeTransformator.strip(filter));
    ISerializationListener listener = SerializationListeners.listOf(
      new DefaultJavaSerializationValidator(),
      new AnalyzingSerializationListener(labelizer, cleanedTreeProcessor));


    getFrameworkSettings().setSerializer(new InspectingKryoSerializer(Bytes.bytes(1024*1024),listener));
  }
 
View Full Code Here

        typeAndSortedTreeAndCollapsedSortedTreeProcessors,
        TreeTransformator.strip(new TypeFilter(Class.class)));

      // serialization listener notified on every written object
      ISerializationListener serializationListener = SerializationListeners.listOf(
        new DefaultJavaSerializationValidator(), new AnalyzingSerializationListener(
          new NativeTypesAsLabel(new ComponentIdAsLabel()), treeProcessors));


      InspectingKryoSerializer serializer = new InspectingKryoSerializer(Bytes.megabytes(1L),
        serializationListener);
View Full Code Here

      typeAndSortedTreeAndCollapsedSortedTreeProcessors,
      TreeTransformator.strip(new TypeFilter(Class.class)));

    // serialization listener notified on every written object
    ISerializationListener serializationListener = SerializationListeners.listOf(
      new DefaultJavaSerializationValidator(), new AnalyzingSerializationListener(
        new NativeTypesAsLabel(new ComponentIdAsLabel()), treeProcessors));


    InspectingKryoSerializer serializer = new InspectingKryoSerializer(Bytes.megabytes(1L),
      serializationListener);
View Full Code Here

        new SortedTreeSizeReport(reportOutput)));
    ITreeFilter filter = new TypeFilter(Class.class);
    ISerializedObjectTreeProcessor cleanedTreeProcessor = new TreeTransformator(treeProcessor,
      TreeTransformator.strip(filter));
    ISerializationListener listener = SerializationListeners.listOf(
      new DefaultJavaSerializationValidator(), new LoggingSerializationListener(),
      new AnalyzingSerializationListener(labelizer, treeProcessor),
      new AnalyzingSerializationListener(labelizer, cleanedTreeProcessor));
    InspectingKryoSerializer kryo = new InspectingKryoSerializer(Bytes.bytes(1000), listener);

    byte[] data = kryo.serialize(root);
View Full Code Here

TOP

Related Classes of org.wicketstuff.pageserializer.kryo2.pages.SamplePage

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.