Class DefaultSerializationContext
- java.lang.Object
-
- org.wildfly.clustering.marshalling.protostream.DefaultSerializationContext
-
- All Implemented Interfaces:
Supplier<org.infinispan.protostream.ImmutableSerializationContext>,org.infinispan.protostream.ImmutableSerializationContext,org.infinispan.protostream.SerializationContext
public class DefaultSerializationContext extends Object implements org.infinispan.protostream.SerializationContext, Supplier<org.infinispan.protostream.ImmutableSerializationContext>
DecoratesSerializationContextImpl, ensuring that all registered marshallers implementProtoStreamMarshaller. 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 extends Object>, org.infinispan.protostream.SerializationContext.MarshallerProvider
-
-
Constructor Summary
Constructors Constructor Description DefaultSerializationContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanMarshall(Class<?> javaClass)booleancanMarshall(Object object)booleancanMarshall(String fullTypeName)org.infinispan.protostream.ImmutableSerializationContextget()org.infinispan.protostream.config.ConfigurationgetConfiguration()org.infinispan.protostream.descriptors.GenericDescriptorgetDescriptorByName(String fullTypeName)org.infinispan.protostream.descriptors.GenericDescriptorgetDescriptorByTypeId(Integer typeId)org.infinispan.protostream.descriptors.EnumDescriptorgetEnumDescriptor(String fullTypeName)Map<String,org.infinispan.protostream.descriptors.FileDescriptor>getFileDescriptors()Map<String,org.infinispan.protostream.descriptors.GenericDescriptor>getGenericDescriptors()<T> org.infinispan.protostream.BaseMarshaller<T>getMarshaller(Class<T> clazz)<T> org.infinispan.protostream.BaseMarshaller<T>getMarshaller(String fullTypeName)<T> org.infinispan.protostream.BaseMarshaller<T>getMarshaller(T object)org.infinispan.protostream.descriptors.DescriptorgetMessageDescriptor(String fullTypeName)IntegergetTypeIdByName(String fullTypeName)Deprecated.StringgetTypeNameById(Integer typeId)Deprecated.voidregisterMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller)voidregisterMarshallerProvider(org.infinispan.protostream.SerializationContext.InstanceMarshallerProvider<?> provider)voidregisterMarshallerProvider(org.infinispan.protostream.SerializationContext.MarshallerProvider provider)Deprecated.voidregisterProtoFiles(org.infinispan.protostream.FileDescriptorSource source)voidunregisterMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller)voidunregisterMarshallerProvider(org.infinispan.protostream.SerializationContext.InstanceMarshallerProvider<?> provider)voidunregisterMarshallerProvider(org.infinispan.protostream.SerializationContext.MarshallerProvider provider)Deprecated.voidunregisterProtoFile(String fileName)voidunregisterProtoFiles(Set<String> fileNames)
-
-
-
Method Detail
-
get
public org.infinispan.protostream.ImmutableSerializationContext get()
-
getConfiguration
public org.infinispan.protostream.config.Configuration getConfiguration()
- Specified by:
getConfigurationin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
getFileDescriptors
public Map<String,org.infinispan.protostream.descriptors.FileDescriptor> getFileDescriptors()
- Specified by:
getFileDescriptorsin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
getGenericDescriptors
public Map<String,org.infinispan.protostream.descriptors.GenericDescriptor> getGenericDescriptors()
- Specified by:
getGenericDescriptorsin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
getMessageDescriptor
public org.infinispan.protostream.descriptors.Descriptor getMessageDescriptor(String fullTypeName)
- Specified by:
getMessageDescriptorin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
getEnumDescriptor
public org.infinispan.protostream.descriptors.EnumDescriptor getEnumDescriptor(String fullTypeName)
- Specified by:
getEnumDescriptorin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
canMarshall
public boolean canMarshall(Class<?> javaClass)
- Specified by:
canMarshallin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
canMarshall
public boolean canMarshall(String fullTypeName)
- Specified by:
canMarshallin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
canMarshall
public boolean canMarshall(Object object)
- Specified by:
canMarshallin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
getMarshaller
public <T> org.infinispan.protostream.BaseMarshaller<T> getMarshaller(T object)
- Specified by:
getMarshallerin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
getMarshaller
public <T> org.infinispan.protostream.BaseMarshaller<T> getMarshaller(String fullTypeName)
- Specified by:
getMarshallerin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
getMarshaller
public <T> org.infinispan.protostream.BaseMarshaller<T> getMarshaller(Class<T> clazz)
- Specified by:
getMarshallerin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
getTypeNameById
@Deprecated public String getTypeNameById(Integer typeId)
Deprecated.- Specified by:
getTypeNameByIdin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
getTypeIdByName
@Deprecated public Integer getTypeIdByName(String fullTypeName)
Deprecated.- Specified by:
getTypeIdByNamein interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
getDescriptorByTypeId
public org.infinispan.protostream.descriptors.GenericDescriptor getDescriptorByTypeId(Integer typeId)
- Specified by:
getDescriptorByTypeIdin interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
getDescriptorByName
public org.infinispan.protostream.descriptors.GenericDescriptor getDescriptorByName(String fullTypeName)
- Specified by:
getDescriptorByNamein interfaceorg.infinispan.protostream.ImmutableSerializationContext
-
registerProtoFiles
public void registerProtoFiles(org.infinispan.protostream.FileDescriptorSource source) throws org.infinispan.protostream.DescriptorParserException- Specified by:
registerProtoFilesin interfaceorg.infinispan.protostream.SerializationContext- Throws:
org.infinispan.protostream.DescriptorParserException
-
unregisterProtoFile
public void unregisterProtoFile(String fileName)
- Specified by:
unregisterProtoFilein interfaceorg.infinispan.protostream.SerializationContext
-
unregisterProtoFiles
public void unregisterProtoFiles(Set<String> fileNames)
- Specified by:
unregisterProtoFilesin interfaceorg.infinispan.protostream.SerializationContext
-
registerMarshaller
public void registerMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller)
- Specified by:
registerMarshallerin interfaceorg.infinispan.protostream.SerializationContext
-
unregisterMarshaller
public void unregisterMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller)
- Specified by:
unregisterMarshallerin interfaceorg.infinispan.protostream.SerializationContext
-
registerMarshallerProvider
@Deprecated public void registerMarshallerProvider(org.infinispan.protostream.SerializationContext.MarshallerProvider provider)
Deprecated.- Specified by:
registerMarshallerProviderin interfaceorg.infinispan.protostream.SerializationContext
-
unregisterMarshallerProvider
@Deprecated public void unregisterMarshallerProvider(org.infinispan.protostream.SerializationContext.MarshallerProvider provider)
Deprecated.- Specified by:
unregisterMarshallerProviderin interfaceorg.infinispan.protostream.SerializationContext
-
registerMarshallerProvider
public void registerMarshallerProvider(org.infinispan.protostream.SerializationContext.InstanceMarshallerProvider<?> provider)
- Specified by:
registerMarshallerProviderin interfaceorg.infinispan.protostream.SerializationContext
-
unregisterMarshallerProvider
public void unregisterMarshallerProvider(org.infinispan.protostream.SerializationContext.InstanceMarshallerProvider<?> provider)
- Specified by:
unregisterMarshallerProviderin interfaceorg.infinispan.protostream.SerializationContext
-
-