public class ComponentSerializerFactory extends Object implements KryoBuilderConfiguration, KryoCustomization
KryoCustomization that creates a FieldSerializer as
serializer for subclasses of Component. This is required, as the Component
constructor invokes Application.get() to tell the application
to org.apache.wicket.Application#notifyComponentInstantiationListeners(). This will
lead to NullpointerExceptions if the application is not yet bound to the current thread
because the session is e.g. accessed from within a servlet filter. If the component is created
via the constructor for serialization, this problem does not occur.
This also enables references and configures the StdInstantiatorStrategy as fallback for the default strategy.| Constructor and Description |
|---|
ComponentSerializerFactory() |
| Modifier and Type | Method and Description |
|---|---|
KryoBuilder |
configure(KryoBuilder kryoBuilder) |
void |
customize(com.esotericsoftware.kryo.Kryo kryo)
Customize the provided
Kryo instance. |
public KryoBuilder configure(KryoBuilder kryoBuilder)
configure in interface KryoBuilderConfigurationpublic void customize(com.esotericsoftware.kryo.Kryo kryo)
KryoCustomizationKryo instance.customize in interface KryoCustomizationkryo - the Kryo instance to customize.Copyright © 2009-2016. All Rights Reserved.