Interface SerializationContext.MarshallerProvider

Enclosing interface:
SerializationContext

@Deprecated public static interface SerializationContext.MarshallerProvider
Deprecated.
Since 4.4. Replaced by the more flexible SerializationContext.InstanceMarshallerProvider. To be removed in 5.
Interface to be implemented for dynamic lookup of marshallers. The marshaller instances returned by the provider are never cached internally by ProtoStream and a new invocation is performed each time the marshaller for a type is needed. The provider implementation is responsible for caching the marshaller instance if this is considered suitable and worthwhile.

This interface is invoked last during marsahller lookup and only if lookup of statically registered marshallers and also SerializationContext.InstanceMarshallerProvider does not succeed in determining a marshaller.

  • Method Summary

    Modifier and Type
    Method
    Description
    getMarshaller(Class<?> javaClass)
    Deprecated.
    Get a marshaller instance for the given Java class.
    Deprecated.
    Get a marshaller instance for the given type name.
  • Method Details

    • getMarshaller

      BaseMarshaller<?> getMarshaller(String typeName)
      Deprecated.
      Get a marshaller instance for the given type name.
      Returns:
      the marshaller instance or null if the types cannot be marshalled by this provider
    • getMarshaller

      BaseMarshaller<?> getMarshaller(Class<?> javaClass)
      Deprecated.
      Get a marshaller instance for the given Java class.
      Returns:
      the marshaller instance or null if the java class cannot be marshalled by this provider