InnerT
- The type of responses coming from the inner ServerStreamingCallable.OuterT
- The type of responses the outer ResponseObserver
expects.@InternalApi public interface Reframer<OuterT,InnerT>
The flow is:
hasFullFrame? -> true -> pop() -> false -> upstream complete? -> true -> hasPartialFrame? -> true => notify error -> false => notify complete -> false => push() and restart at hasFullFrame?
Modifier and Type | Method and Description |
---|---|
boolean |
hasFullFrame()
Checks if there is a frame to be popped.
|
boolean |
hasPartialFrame()
Checks if there is any incomplete data.
|
OuterT |
pop()
Returns and removes the current completed frame.
|
void |
push(InnerT response)
Refill internal buffers with inner/upstream response.
|
void push(InnerT response)
hasFullFrame()
returns false.boolean hasFullFrame()
Note that this method might update internal to buffer the next response.
boolean hasPartialFrame()
OuterT pop()
Copyright © 2019 Google LLC. All rights reserved.