Class DefaultSerializationContext
java.lang.Object
org.wildfly.clustering.marshalling.protostream.NativeSerializationContext
org.wildfly.clustering.marshalling.protostream.DefaultSerializationContext
- All Implemented Interfaces:
org.infinispan.protostream.ImmutableSerializationContext, org.infinispan.protostream.SerializationContext, SerializationContext
public class DefaultSerializationContext
extends NativeSerializationContext
implements SerializationContext
Decorates
SerializationContextImpl, ensuring that all registered marshallers implement ProtoStreamMarshaller.
We have to use the decorator pattern since SerializationContextImpl is final.- Author:
- Paul Ferraro
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.protostream.SerializationContext
org.infinispan.protostream.SerializationContext.InstanceMarshallerProvider<T>, org.infinispan.protostream.SerializationContext.MarshallerProviderNested classes/interfaces inherited from interface SerializationContext
SerializationContext.InstanceMarshallerProvider<T> -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSerializationContext(org.infinispan.protostream.SerializationContext context) Creates a new serialization context from the specified context -
Method Summary
Modifier and TypeMethodDescriptionorg.infinispan.protostream.ImmutableSerializationContextReturns an immutable view of this context.<T> ProtoStreamMarshaller<T> getMarshaller(Class<T> clazz) <T> ProtoStreamMarshaller<T> getMarshaller(String fullTypeName) <T> ProtoStreamMarshaller<T> getMarshaller(T object) voidregisterMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller) voidregisterMarshaller(ProtoStreamMarshaller<?> marshaller) Registers a marshaller with this context.voidregisterMarshallerProvider(org.infinispan.protostream.SerializationContext.InstanceMarshallerProvider<?> provider) voidunregisterMarshallerProvider(org.infinispan.protostream.SerializationContext.InstanceMarshallerProvider<?> provider) Methods inherited from class NativeSerializationContext
canMarshall, canMarshall, canMarshall, getConfiguration, getDescriptorByName, getDescriptorByTypeId, getEnumDescriptor, getFileDescriptors, getGenericDescriptors, getMarshallerDelegate, getMarshallerDelegate, getMessageDescriptor, getTypeIdByName, getTypeNameById, registerMarshallerProvider, registerProtoFiles, unregisterMarshaller, unregisterMarshallerProvider, unregisterProtoFile, unregisterProtoFilesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.protostream.ImmutableSerializationContext
canMarshall, canMarshall, canMarshall, getConfiguration, getDescriptorByName, getDescriptorByTypeId, getEnumDescriptor, getFileDescriptors, getGenericDescriptors, getMarshallerDelegate, getMessageDescriptor, getTypeIdByName, getTypeNameByIdMethods inherited from interface org.infinispan.protostream.SerializationContext
getMarshallerDelegate, registerMarshallerProvider, registerProtoFiles, unregisterMarshaller, unregisterMarshallerProvider, unregisterProtoFile, unregisterProtoFiles
-
Constructor Details
-
DefaultSerializationContext
public DefaultSerializationContext(org.infinispan.protostream.SerializationContext context) Creates a new serialization context from the specified context- Parameters:
context- a decorated serialization context implementation
-
-
Method Details
-
getMarshaller
- Specified by:
getMarshallerin interfaceorg.infinispan.protostream.ImmutableSerializationContext- Specified by:
getMarshallerin interfaceSerializationContext- Overrides:
getMarshallerin classNativeSerializationContext
-
getMarshaller
- Specified by:
getMarshallerin interfaceorg.infinispan.protostream.ImmutableSerializationContext- Specified by:
getMarshallerin interfaceSerializationContext- Overrides:
getMarshallerin classNativeSerializationContext
-
getMarshaller
- Specified by:
getMarshallerin interfaceorg.infinispan.protostream.ImmutableSerializationContext- Specified by:
getMarshallerin interfaceSerializationContext- Overrides:
getMarshallerin classNativeSerializationContext
-
registerMarshaller
Description copied from interface:SerializationContextRegisters a marshaller with this context.- Specified by:
registerMarshallerin interfaceSerializationContext- Parameters:
marshaller- the marshaller to register
-
registerMarshaller
public void registerMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller) - Specified by:
registerMarshallerin interfaceorg.infinispan.protostream.SerializationContext- Overrides:
registerMarshallerin classNativeSerializationContext
-
registerMarshallerProvider
public void registerMarshallerProvider(org.infinispan.protostream.SerializationContext.InstanceMarshallerProvider<?> provider) - Specified by:
registerMarshallerProviderin interfaceorg.infinispan.protostream.SerializationContext- Overrides:
registerMarshallerProviderin classNativeSerializationContext
-
unregisterMarshallerProvider
public void unregisterMarshallerProvider(org.infinispan.protostream.SerializationContext.InstanceMarshallerProvider<?> provider) - Specified by:
unregisterMarshallerProviderin interfaceorg.infinispan.protostream.SerializationContext- Overrides:
unregisterMarshallerProviderin classNativeSerializationContext
-
getImmutableSerializationContext
public org.infinispan.protostream.ImmutableSerializationContext getImmutableSerializationContext()Description copied from interface:SerializationContextReturns an immutable view of this context.- Specified by:
getImmutableSerializationContextin interfaceSerializationContext- Returns:
- an immutable view of this context.
-