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 void
onEnd
(RefSummary summary) Called after the finalref
has been streamed.boolean
Called to process aref
.default void
onStart
(RefContext context) Called before the firstref
is streamed.
-
Method Details
-
onEnd
Called after the finalref
has 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
- theref
to stream- Returns:
true
if further refs should be streamed; otherwise,false
to stop streaming- Throws:
IOException
- may be thrown by implementations which perform I/O.
-
onStart
Called before the firstref
is 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.
-