@FunctionalInterface public interface Entity
filter(Function) method and just copy bytes you
receive to your subscribers; or buffer them and publish them once finishedfilter(Function), process the bytes you receive and
publish modified bytesWARNING: when buffering entity, make sure you do not run out of memory - it is strongly recommended to limit the number of bytes to be stored in memory. Once that is reached, you will need to offload to file system or other non-JVM heap storage.
Document fully cases when entity is buffered, so developers understand that when using your security provider, and can assess impact - e.g. if we would validate signatures on uploaded video, a very big performance impact has to be expected
| Modifier and Type | Method and Description |
|---|---|
void |
filter(Function<Flow.Publisher<ByteBuffer>,Flow.Publisher<ByteBuffer>> filterFunction)
Call this method if your security provider needs access to entity bytes.
|
void filter(Function<Flow.Publisher<ByteBuffer>,Flow.Publisher<ByteBuffer>> filterFunction)
filterFunction - function that will get a publisher (that will publish bytes from external source for inbound
request/outbound response or bytes from business logic for inbound response/outbound request)
and that returns your publisher of modified/different bytesCopyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.