Class 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>
    Decorates SerializationContextImpl, ensuring that all registered marshallers implement ProtoStreamMarshaller. We have to use the decorator pattern since SerializationContextImpl is final.
    Author:
    Paul Ferraro
    • Constructor Detail

      • DefaultSerializationContext

        public DefaultSerializationContext()
    • Method Detail

      • get

        public org.infinispan.protostream.ImmutableSerializationContext get()
        Specified by:
        get in interface Supplier<org.infinispan.protostream.ImmutableSerializationContext>
      • 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> org.infinispan.protostream.BaseMarshaller<T> getMarshaller​(T object)
        Specified by:
        getMarshaller in interface org.infinispan.protostream.ImmutableSerializationContext
      • getMarshaller

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

        public <T> org.infinispan.protostream.BaseMarshaller<T> getMarshaller​(Class<T> clazz)
        Specified by:
        getMarshaller in interface org.infinispan.protostream.ImmutableSerializationContext
      • 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​(org.infinispan.protostream.BaseMarshaller<?> marshaller)
        Specified by:
        registerMarshaller in interface org.infinispan.protostream.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