default <R extends Service<R_I, R_O>, R_I extends Request, R_O extends Response>
    R decorate(Function<? super RpcService, R> decorator) {
        final R newService = decorator.apply(this);

        if (newService == null) {
            throw new NullPointerException("decorator.apply() returned null: " + decorator);
        }

        return newService;
    }
Creates a new {@link Service} that decorates this {@link RpcService} with the specified
{@code decorator}.
core/src/main/java/com/linecorp/armeria/server/RpcService.java