public abstract class SCMHeadObserver extends Object
SCMHead and corresponding SCMRevision details.| Modifier and Type | Class and Description |
|---|---|
static class |
SCMHeadObserver.AllFinished
An observer that wraps multiple observers and keeps observing as long as one of the wrapped observers wants to.
|
static class |
SCMHeadObserver.Collector
An observer that collects the observed
SCMHeads and SCMRevisions. |
static class |
SCMHeadObserver.OneFinished
An observer that wraps multiple observers and keeps observing until one of the wrapped observers stops observing.
|
static class |
SCMHeadObserver.Selector
An observer that collects the
SCMRevision of a specific SCMHead and then stops observing. |
| Constructor and Description |
|---|
SCMHeadObserver() |
| Modifier and Type | Method and Description |
|---|---|
static SCMHeadObserver.AllFinished |
allOf(SCMHeadObserver... observers)
Wraps multiple observers returning a combined observer that remains observing as long as at least one of the
wrapped observers
is still observing.
|
static SCMHeadObserver.Collector |
collect()
Creates an observer that collects all the heads and revisions.
|
static SCMHeadObserver.OneFinished |
first(SCMHeadObserver... observers)
Wraps multiple observers returning a combined observer that remains observing until one of the wrapped observers
stops observing.
|
boolean |
isObserving()
Returns information about whether the observer wants more results.
|
abstract void |
observe(SCMHead head,
SCMRevision revision)
Observes a head and current revision.
|
static SCMHeadObserver.Selector |
select(SCMHead head)
Creates an observer that selects the revision of a specific head.
|
public abstract void observe(@NonNull
SCMHead head,
@NonNull
SCMRevision revision)
head - the head.revision - the revision.public boolean isObserving()
true if the observer is still observing or false to signal that it is ok to stop early.@NonNull public static SCMHeadObserver.AllFinished allOf(SCMHeadObserver... observers)
observers - the observers to wrap.@NonNull public static SCMHeadObserver.OneFinished first(SCMHeadObserver... observers)
observers - the observers to wrap.@NonNull public static SCMHeadObserver.Collector collect()
@NonNull public static SCMHeadObserver.Selector select(@NonNull SCMHead head)
head - the head to watch out for.Copyright © 2004-2013. All Rights Reserved.