Interface RefCallback
- All Known Implementing Classes:
AbstractRefCallback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A callback for streaming
refs.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonEnd(RefSummary summary) Called after the finalrefhas been streamed.booleanCalled to process aref.default voidonStart(RefContext context) Called before the firstrefis streamed.
-
Method Details
-
onEnd
Called after the finalrefhas been streamed.Note: If there were no refs, this method may be called immediately after
onStart(RefContext)without any calls toonRef(Ref).- Parameters:
summary- summarizes the request and the streamed refs- Throws:
IOException- may be thrown by implementations which perform I/O.
-
onRef
Called to process aref.- Parameters:
ref- therefto stream- Returns:
trueif further refs should be streamed; otherwise,falseto stop streaming- Throws:
IOException- may be thrown by implementations which perform I/O.
-
onStart
Called before the firstrefis streamed.- Parameters:
context- provides details about the request for which refs are being streamed- Throws:
IOException- may be thrown by implementations which perform I/O.
-