Class DefaultSerializationContext

java.lang.Object
org.wildfly.clustering.marshalling.protostream.DefaultSerializationContext
All Implemented Interfaces:
org.infinispan.protostream.ImmutableSerializationContext, org.infinispan.protostream.SerializationContext, SerializationContext

public class DefaultSerializationContext extends Object 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
  • Constructor Details

    • DefaultSerializationContext

      public DefaultSerializationContext()
  • Method Details

    • getConfiguration

      public org.infinispan.protostream.config.Configuration getConfiguration()
      Specified by:
      getConfiguration in interface org.infinispan.protostream.ImmutableSerializationContext
    • getFileDescriptors

      public Map<String,org.infinispan.protostream.descriptors.FileDescriptor> getFileDescriptors()
      Specified by:
      getFileDescriptors in interface org.infinispan.protostream.ImmutableSerializationContext
    • getGenericDescriptors

      public Map<String,org.infinispan.protostream.descriptors.GenericDescriptor> getGenericDescriptors()
      Specified by:
      getGenericDescriptors in interface org.infinispan.protostream.ImmutableSerializationContext
    • getMessageDescriptor

      public org.infinispan.protostream.descriptors.Descriptor getMessageDescriptor(String fullTypeName)
      Specified by:
      getMessageDescriptor in interface org.infinispan.protostream.ImmutableSerializationContext
    • getEnumDescriptor

      public org.infinispan.protostream.descriptors.EnumDescriptor getEnumDescriptor(String fullTypeName)
      Specified by:
      getEnumDescriptor in interface org.infinispan.protostream.ImmutableSerializationContext
    • canMarshall

      public boolean canMarshall(Class<?> javaClass)
      Specified by:
      canMarshall in interface org.infinispan.protostream.ImmutableSerializationContext
    • canMarshall

      public boolean canMarshall(String fullTypeName)
      Specified by:
      canMarshall in interface org.infinispan.protostream.ImmutableSerializationContext
    • canMarshall

      public boolean canMarshall(Object object)
      Specified by:
      canMarshall in interface org.infinispan.protostream.ImmutableSerializationContext
    • getMarshaller

      public <T> ProtoStreamMarshaller<T> getMarshaller(T object)
      Specified by:
      getMarshaller in interface org.infinispan.protostream.ImmutableSerializationContext
      Specified by:
      getMarshaller in interface SerializationContext
    • getMarshaller

      public <T> ProtoStreamMarshaller<T> getMarshaller(String fullTypeName)
      Specified by:
      getMarshaller in interface org.infinispan.protostream.ImmutableSerializationContext
      Specified by:
      getMarshaller in interface SerializationContext
    • getMarshaller

      public <T> ProtoStreamMarshaller<T> getMarshaller(Class<T> clazz)
      Specified by:
      getMarshaller in interface org.infinispan.protostream.ImmutableSerializationContext
      Specified by:
      getMarshaller in interface SerializationContext
    • getTypeNameById

      @Deprecated public String getTypeNameById(Integer typeId)
      Deprecated.
      Specified by:
      getTypeNameById in interface org.infinispan.protostream.ImmutableSerializationContext
    • getTypeIdByName

      @Deprecated public Integer getTypeIdByName(String fullTypeName)
      Deprecated.
      Specified by:
      getTypeIdByName in interface org.infinispan.protostream.ImmutableSerializationContext
    • getDescriptorByTypeId

      public org.infinispan.protostream.descriptors.GenericDescriptor getDescriptorByTypeId(Integer typeId)
      Specified by:
      getDescriptorByTypeId in interface org.infinispan.protostream.ImmutableSerializationContext
    • getDescriptorByName

      public org.infinispan.protostream.descriptors.GenericDescriptor getDescriptorByName(String fullTypeName)
      Specified by:
      getDescriptorByName in interface org.infinispan.protostream.ImmutableSerializationContext
    • registerProtoFiles

      public void registerProtoFiles(org.infinispan.protostream.FileDescriptorSource source) throws org.infinispan.protostream.DescriptorParserException
      Specified by:
      registerProtoFiles in interface org.infinispan.protostream.SerializationContext
      Throws:
      org.infinispan.protostream.DescriptorParserException
    • unregisterProtoFile

      public void unregisterProtoFile(String fileName)
      Specified by:
      unregisterProtoFile in interface org.infinispan.protostream.SerializationContext
    • unregisterProtoFiles

      public void unregisterProtoFiles(Set<String> fileNames)
      Specified by:
      unregisterProtoFiles in interface org.infinispan.protostream.SerializationContext
    • registerMarshaller

      public void registerMarshaller(ProtoStreamMarshaller<?> marshaller)
      Specified by:
      registerMarshaller in interface SerializationContext
    • unregisterMarshaller

      public void unregisterMarshaller(org.infinispan.protostream.BaseMarshaller<?> marshaller)
      Specified by:
      unregisterMarshaller in interface org.infinispan.protostream.SerializationContext
    • registerMarshallerProvider

      @Deprecated public void registerMarshallerProvider(org.infinispan.protostream.SerializationContext.MarshallerProvider provider)
      Deprecated.
      Specified by:
      registerMarshallerProvider in interface org.infinispan.protostream.SerializationContext
    • unregisterMarshallerProvider

      @Deprecated public void unregisterMarshallerProvider(org.infinispan.protostream.SerializationContext.MarshallerProvider provider)
      Deprecated.
      Specified by:
      unregisterMarshallerProvider in interface org.infinispan.protostream.SerializationContext
    • registerMarshallerProvider

      public void registerMarshallerProvider(org.infinispan.protostream.SerializationContext.InstanceMarshallerProvider<?> provider)
      Specified by:
      registerMarshallerProvider in interface org.infinispan.protostream.SerializationContext
    • unregisterMarshallerProvider

      public void unregisterMarshallerProvider(org.infinispan.protostream.SerializationContext.InstanceMarshallerProvider<?> provider)
      Specified by:
      unregisterMarshallerProvider in interface org.infinispan.protostream.SerializationContext
    • getImmutableSerializationContext

      public org.infinispan.protostream.ImmutableSerializationContext getImmutableSerializationContext()
      Specified by:
      getImmutableSerializationContext in interface SerializationContext