Class ThriftProtocolFactoryProvider

java.lang.Object
com.linecorp.armeria.common.thrift.ThriftProtocolFactoryProvider

public abstract class ThriftProtocolFactoryProvider extends Object
SPI Provider for links from SerializationFormat to TProtocolFactory.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static final class 
    Pair of SerializationFormat and TProtocolFactory.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract @Nullable org.apache.thrift.protocol.TProtocolFactory
    protocolFactory(com.linecorp.armeria.common.SerializationFormat serializationFormat, int maxStringLength, int maxContainerLength)
    Returns the TProtocolFactory for the specified SerializationFormat, maxStringLength and maxContainerLength.
    protected abstract Set<com.linecorp.armeria.common.SerializationFormat>
    Returns the supported Thrift-related SerializationFormats.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ThriftProtocolFactoryProvider

      public ThriftProtocolFactoryProvider()
  • Method Details

    • serializationFormats

      protected abstract Set<com.linecorp.armeria.common.SerializationFormat> serializationFormats()
      Returns the supported Thrift-related SerializationFormats.
    • protocolFactory

      @Nullable protected abstract @Nullable org.apache.thrift.protocol.TProtocolFactory protocolFactory(com.linecorp.armeria.common.SerializationFormat serializationFormat, int maxStringLength, int maxContainerLength)
      Returns the TProtocolFactory for the specified SerializationFormat, maxStringLength and maxContainerLength. Returns null if the SerializationFormat is unsupported.
      Parameters:
      serializationFormat - the serialization format that the TProtocolFactory supports.
      maxStringLength - the maximum allowed number of bytes to read from the transport for variable-length fields (such as strings or binary). 0 means unlimited.
      maxContainerLength - the maximum allowed number of containers to read from the transport for maps, sets and lists. 0 means unlimited.