Package org.infinispan.protostream
Interface SerializationContext.MarshallerProvider
-
- Enclosing interface:
- SerializationContext
public static interface SerializationContext.MarshallerProvider
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 is responsible for caching the marshaller instance if this is suitable and worthwhile.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BaseMarshaller<?>
getMarshaller(Class<?> javaClass)
Get a marshaller instance for the given Java class.BaseMarshaller<?>
getMarshaller(String typeName)
Get a marshaller instance for the given type name.
-
-
-
Method Detail
-
getMarshaller
BaseMarshaller<?> getMarshaller(String typeName)
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)
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
-
-