Interface SerializationContext

All Superinterfaces:
ImmutableSerializationContext
All Known Implementing Classes:
SerializationContextImpl

@ThreadSafe public interface SerializationContext extends ImmutableSerializationContext
A repository for Protobuf type definitions and their marshallers. All ProtoStream marshalling operations happen in the context of a SerializationContext.
Since:
1.0
Author:
[email protected]
  • Method Details

    • registerProtoFiles

      void registerProtoFiles(FileDescriptorSource source) throws DescriptorParserException
      Register some proto schema definition files from a FileDescriptorSource.
      Parameters:
      source -
      Throws:
      DescriptorParserException
    • unregisterProtoFile

      void unregisterProtoFile(String fileName)
      Unregisters a file. All types defined in it are removed and also the types from all dependant files. The status of dependant files is set to 'unresolved'.
    • unregisterProtoFiles

      void unregisterProtoFiles(Set<String> fileNames)
      Unregisters a set of files. All types defined in them are removed and also the types from all dependant files. The status of dependant files is set to 'unresolved'.
    • registerMarshaller

      void registerMarshaller(BaseMarshaller<?> marshaller)
      Register a type marshaller.
      Parameters:
      marshaller - the marshaller instance
    • unregisterMarshaller

      void unregisterMarshaller(BaseMarshaller<?> marshaller)
    • registerMarshallerProvider

      void registerMarshallerProvider(SerializationContext.MarshallerProvider marshallerProvider)
    • unregisterMarshallerProvider

      void unregisterMarshallerProvider(SerializationContext.MarshallerProvider marshallerProvider)