Interface SessionSerializationCallback


public interface SessionSerializationCallback
Callbacks that are called after a successful serialization and deserialization or when an error happens during the serialization or deserialization. Each callback has a default method implementation. A bean needs to be created from a class implementing this interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The default no-op implementation of this interface, which is used when there is no bean provided from other implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Callback that is called when a deserialization error happens.
    default void
    Callback that is called after a successful deserialization.
    default void
    Callback that is called when a serialization error happens.
    default void
    Callback that is called after a successful serialization.
  • Field Details

    • DEFAULT

      static final SessionSerializationCallback DEFAULT
      The default no-op implementation of this interface, which is used when there is no bean provided from other implementation. It does not perform any operation.
  • Method Details

    • onSerializationSuccess

      default void onSerializationSuccess()
      Callback that is called after a successful serialization.
    • onSerializationError

      default void onSerializationError(Exception exception)
      Callback that is called when a serialization error happens. Should not throw any exception.
      Parameters:
      exception - the exception that is the cause of the serialization error
    • onDeserializationSuccess

      default void onDeserializationSuccess()
      Callback that is called after a successful deserialization.
    • onDeserializationError

      default void onDeserializationError(Exception exception)
      Callback that is called when a deserialization error happens. Should not throw any exception.
      Parameters:
      exception - the exception that is the cause of the deserialization error.