@Override
    public void serviceAdded(ServiceConfig cfg) throws Exception {
        final VirtualHost defaultVirtualHost = cfg.server().config().defaultVirtualHost();
        if (this.defaultVirtualHost == defaultVirtualHost) {
            // Avoid infinite loop. The delegate of annotated decorators is this.
            return;
        }
        this.defaultVirtualHost = defaultVirtualHost;

        if (maxRequestStringLength == -1) {
            maxRequestStringLength = Ints.saturatedCast(cfg.maxRequestLength());
        }
        if (maxRequestContainerLength == -1) {
            maxRequestContainerLength = Ints.saturatedCast(cfg.maxRequestLength());
        }
        requestProtocolFactories = supportedSerializationFormats
                .stream()
                .collect(toImmutableMap(
                        Function.identity(),
                        format -> ThriftSerializationFormats.protocolFactory(
                                format, maxRequestStringLength, maxRequestContainerLength)));

        super.serviceAdded(cfg);

        final DependencyInjector dependencyInjector = cfg.server().config().dependencyInjector();
        final Map<ThriftFunction, HttpService> decoratedTHttpServices = new IdentityHashMap<>();
        for (ThriftServiceEntry thriftServiceEntry : entries().values()) {
            for (ThriftFunction thriftFunction : thriftServiceEntry.metadata.functions().values()) {
                if (!thriftFunction.declaredDecorators().isEmpty()) {
                    final List<DecoratorAndOrder> decorators = thriftFunction.declaredDecorators();
                    Function<? super HttpService, ? extends HttpService> decorator = Function.identity();
                    for (int i = decorators.size() - 1; i >= 0; i--) {
                        final DecoratorAndOrder d = decorators.get(i);
                        decorator = decorator.andThen(d.decorator(dependencyInjector));
                    }
                    final HttpService decorated = decorator.apply(this);
                    decorated.serviceAdded(cfg);
                    decoratedTHttpServices.put(thriftFunction, decorated);
                }
            }
        }
        this.decoratedTHttpServices = decoratedTHttpServices;
    }
Returns the default {@link SerializationFormat} of this service.
thrift/thrift0.13/src/main/java/com/linecorp/armeria/server/thrift/THttpService.java