public interface PushCallback
ref changes
.
Implementations of this callback performing internal paging may return false
from
onRefChange(com.atlassian.bitbucket.repository.MinimalRefChange)
to indicate no more ref changes are desired.
Modifier and Type | Method and Description |
---|---|
default void |
onEnd(PushSummary summary)
Called after the final
ref change has been streamed. |
default void |
onFailedRef(MinimalRef ref)
Called when a ref failed to synchronize.
|
default void |
onProgress(Progress progress)
Called when there is a progress update for the operation.
|
default void |
onRefChange(MinimalRefChange refChange)
Provides a
ref change to the callback for processing. |
default void |
onStart(PushContext context)
Called before the first
ref change is streamed. |
default void onEnd(@Nonnull PushSummary summary) throws IOException
ref change
has been streamed.
Note: If there were no ref changes, this method may be called immediately after onStart(com.atlassian.bitbucket.scm.PushContext)
without any calls to onRefChange(com.atlassian.bitbucket.repository.MinimalRefChange)
.
summary
- summarizes the request and the streamed changesIOException
- may be thrown by implementations which perform I/Odefault void onFailedRef(@Nonnull MinimalRef ref) throws IOException
ref
- the ref that failedIOException
- may be thrown by implementations which perform I/Odefault void onProgress(@Nonnull Progress progress) throws IOException
Progress messages are taken directly from the output of the SCM and are not localized. Percentages are estimates
and are not guaranteed to reach 100
before onEnd(com.atlassian.bitbucket.scm.PushSummary)
has been called.
Once onEnd(com.atlassian.bitbucket.scm.PushSummary)
has been called, the progress should be assumed to be 100% complete.
progress
- the message and percentage of the progressIOException
- may be thrown by implementations which perform I/Odefault void onRefChange(@Nonnull MinimalRefChange refChange) throws IOException
ref change
to the callback for processing.refChange
- the ref change to processIOException
- may be thrown by implementations which perform I/Odefault void onStart(@Nonnull PushContext context) throws IOException
ref change
is streamed.context
- provides details about the request for which ref changes are being streamedIOException
- may be thrown by implementations which perform I/OCopyright © 2024 Atlassian. All rights reserved.