src/main/java/com/linecorp/armeria/server/thrift/ThriftService.java
/**
     * Creates a new instance with the specified service implementation and supporting all thrift protocols and
     * defaulting to the specified {@code defaultSerializationFormat} when the client doesn't
     * specify one. Currently, the only way to specify a serialization format is by using the HTTP session
     * protocol and setting the Content-Type header to the appropriate {@link SerializationFormat#mimeType}.
     *
     * @param thriftService an implementation of {@code *.Iface} or {@code *.AsyncIface} service interface
     *                      generated by the  Apache Thrift compiler
     * @param defaultSerializationFormat the default serialization format to use when not specified by the
     *                                   client
     */
Creates a new instance with the specified service implementation and supporting all thrift protocols and
defaulting to the specified  defaultSerializationFormat when the client doesn't
specify one. Currently, the only way to specify a serialization format is by using the HTTP session
protocol and setting the Content-Type header to the appropriate  SerializationFormat#mimeType.

@param thriftService an implementation of  *.Iface or  *.AsyncIface service interface
generated by the  Apache Thrift compiler
@param defaultSerializationFormat the default serialization format to use when not specified by the
client
Creates a new instance with the specified service implementation and supporting all thrift protocols and defaulting to the specified defaultSerializationFormat when the client doesn ' t specify one . Currently the only way to specify a serialization format is by using the HTTP session protocol and setting the Content - Type header to the appropriate SerializationFormat#mimeType . @param thriftService an implementation of * . Iface or * . AsyncIface service interface generated by the Apache Thrift compiler @param defaultSerializationFormat the default serialization format to use when not specified by the client
public static ThriftService of(Object thriftService, SerializationFormat defaultSerializationFormat) {
        return new ThriftService(
                new ThriftServiceCodec(
                        thriftService, defaultSerializationFormat, SerializationFormat.ofThrift()),
                new ThriftServiceInvocationHandler(thriftService));
    }
public static ThriftService of ( Object thriftService , SerializationFormat defaultSerializationFormat ) { return new ThriftService ( new ThriftServiceCodec ( thriftService , defaultSerializationFormat , SerializationFormat . ofThrift ( ) ) , new ThriftServiceInvocationHandler ( thriftService ) ) ; }
Creates a new instance with the specified service implementation and supporting all thrift protocols and
 defaulting to the specified {@code defaultSerializationFormat} when the client doesn't
 specify one.
Creates a new instance with the specified service implementation and supporting all thrift protocols and defaulting to the specified { @code defaultSerializationFormat } when the client doesn ' t specify one .