Class ThriftProtocolFactoryProvider
java.lang.Object
com.linecorp.armeria.common.thrift.ThriftProtocolFactoryProvider
SPI Provider for links from
SerializationFormat
to TProtocolFactory
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static final class
Pair ofSerializationFormat
andTProtocolFactory
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract @Nullable TProtocolFactory
protocolFactory
(SerializationFormat serializationFormat, int maxStringLength, int maxContainerLength) Returns theTProtocolFactory
for the specifiedSerializationFormat
,maxStringLength
andmaxContainerLength
.protected abstract Set<SerializationFormat>
Returns the supported Thrift-relatedSerializationFormat
s.
-
Constructor Details
-
ThriftProtocolFactoryProvider
public ThriftProtocolFactoryProvider()
-
-
Method Details
-
serializationFormats
Returns the supported Thrift-relatedSerializationFormat
s. -
protocolFactory
@Nullable protected abstract @Nullable TProtocolFactory protocolFactory(SerializationFormat serializationFormat, int maxStringLength, int maxContainerLength) Returns theTProtocolFactory
for the specifiedSerializationFormat
,maxStringLength
andmaxContainerLength
. Returnsnull
if theSerializationFormat
is unsupported.- Parameters:
serializationFormat
- the serialization format that theTProtocolFactory
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.
-