igalshilman edited a comment on pull request #201: URL: https://github.com/apache/flink-statefun/pull/201#issuecomment-785018866
@sjwiesman thanks for the suggestion! Yes a builder here will read nicer. I'll followup with that. Regarding the `Slice`, the main motivation was to enable efficient interoperability with the embedding HTTP server. For example frameworks based on Netty expose the ByteBuf interface directly, while others introduce their own `Buffer` interfaces. Maybe we should overload the `handle` method with few common types like `java.nio.ByteBuffer`, `byte[]` and `InputStream`. While keeping the result type as `CompleteableFuture<Slice>`. And yes, having JavaDoc and examples should make it clearer how to obtain a `slice` (coming right up!) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org