public class AbstractRefCallback extends Object implements RefCallback
RefCallback
that provides no-op implementations for all methods.Constructor and Description |
---|
AbstractRefCallback() |
Modifier and Type | Method and Description |
---|---|
void |
onEnd(RefSummary summary)
Called after the final
ref has been streamed. |
boolean |
onRef(Ref ref)
Discards the provided
ref . |
void |
onStart(RefContext context)
Called before the first
ref is streamed. |
public void onEnd(@Nonnull RefSummary summary) throws IOException
RefCallback
ref
has been streamed.
Note: If there were no refs, this method may be called immediately after RefCallback.onStart(RefContext)
without
any calls to RefCallback.onRef(Ref)
.
onEnd
in interface RefCallback
summary
- summarizes the request and the streamed refsIOException
- may be thrown by implementations which perform I/O.public boolean onRef(@Nonnull Ref ref) throws IOException
ref
.onRef
in interface RefCallback
ref
- ignoredtrue
if further refs should be streamed; otherwise, false
to stop streamingIOException
- may be thrown by implementations which perform I/O.public void onStart(@Nonnull RefContext context) throws IOException
RefCallback
ref
is streamed.onStart
in interface RefCallback
context
- provides details about the request for which refs are being streamedIOException
- may be thrown by implementations which perform I/O.Copyright © 2019 Atlassian. All rights reserved.