Package org.infinispan.protostream
Interface SerializationContext.InstanceMarshallerProvider<T>
-
- Enclosing interface:
- SerializationContext
public static interface SerializationContext.InstanceMarshallerProvider<T>
Interface to be implemented for dynamic lookup of marshallers where the type is part of the entity being marshalled.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<T>
getJavaClass()
Returns the Java type handled by this marshaller.BaseMarshaller<T>
getMarshaller(String typeName)
Get a marshaller to unmarshall the supplied type name or @code null} if the type cannot be unmarshalled by this provider.BaseMarshaller<T>
getMarshaller(T instance)
Get marshaller given a instance to be marshalled ornull
if the instance cannot be marshalled by this provider.String
getTypeName(T instance)
Set<String>
getTypeNames()
Returns the protobuf types handled by this marshaller.
-
-
-
Method Detail
-
getJavaClass
Class<T> getJavaClass()
Returns the Java type handled by this marshaller. This must not change over multiple invocations.- Returns:
- the Java type.
-
getTypeNames
Set<String> getTypeNames()
Returns the protobuf types handled by this marshaller. This must not change over multiple invocations.- Returns:
- the protobuf types.
-
getMarshaller
BaseMarshaller<T> getMarshaller(T instance)
Get marshaller given a instance to be marshalled ornull
if the instance cannot be marshalled by this provider.
-
getMarshaller
BaseMarshaller<T> getMarshaller(String typeName)
Get a marshaller to unmarshall the supplied type name or @code null} if the type cannot be unmarshalled by this provider.
-
-