src/main/java/com/linecorp/armeria/server/thrift/ThriftService.java
/**
     * Creates a new instance with the specified service implementation and supporting only the formats
     * specified, 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
     * @param otherAllowedSerializationFormats other serialization formats that should be supported by this
     *                                         service in addition to the default
     */
Creates a new instance with the specified service implementation and supporting only the formats
specified, 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
@param otherAllowedSerializationFormats other serialization formats that should be supported by this
service in addition to the default
Creates a new instance with the specified service implementation and supporting only the formats specified 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 @param otherAllowedSerializationFormats other serialization formats that should be supported by this service in addition to the default
public static ThriftService ofFormats(Object thriftService, SerializationFormat defaultSerializationFormat,
                                          SerializationFormat... otherAllowedSerializationFormats) {
        requireNonNull(otherAllowedSerializationFormats, "otherAllowedSerializationFormats");
        return ofFormats(thriftService, defaultSerializationFormat, Arrays.asList(otherAllowedSerializationFormats));
    }
public static ThriftService ofFormats ( Object thriftService , SerializationFormat defaultSerializationFormat , SerializationFormat ... otherAllowedSerializationFormats ) { requireNonNull ( otherAllowedSerializationFormats , "otherAllowedSerializationFormats" ) ; return ofFormats ( thriftService , defaultSerializationFormat , Arrays . asList ( otherAllowedSerializationFormats ) ) ; }
Creates a new instance with the specified service implementation and supporting only the formats
 specified, defaulting to the specified {@code defaultSerializationFormat} when the client doesn't specify
 one.
Creates a new instance with the specified service implementation and supporting only the formats specified defaulting to the specified { @code defaultSerializationFormat } when the client doesn ' t specify one .