O - the class of wrapped observer.public abstract static class SCMSourceObserver.Wrapped<O extends SCMSourceObserver> extends SCMSourceObserver
SCMSourceObserver.Filter<O extends SCMSourceObserver>, SCMSourceObserver.ProjectObserver, SCMSourceObserver.Wrapped<O extends SCMSourceObserver>| Modifier | Constructor and Description |
|---|---|
protected |
Wrapped(O delegate)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String key,
Object value)
Adds extra metadata about the overall organization.
|
SCMSourceOwner |
getContext()
Indicates who is asking for sources.
|
Set<String> |
getIncludes()
Returns the subset of "project" names that this observer is interested in or
null if
interested in all "project" names. |
TaskListener |
getListener()
Provides a way of reporting progress.
|
boolean |
isObserving()
Returns information about whether the observer wants more results.
|
SCMSourceObserver.ProjectObserver |
observe(String projectName)
Declare that a new “project” such as a source repository has been found.
|
filterprotected Wrapped(O delegate)
delegate - the observer to delegate to.@NonNull public SCMSourceOwner getContext()
getContext in class SCMSourceObserverOrganizationFolder@NonNull public TaskListener getListener()
getListener in class SCMSourceObserver@CheckForNull public Set<String> getIncludes()
null if
interested in all "project" names.
Implementations should not assume that the SCMSourceObserver.getIncludes() will be honoured.
This method is designed to provide a hint to SCMNavigator implementations.
getIncludes in class SCMSourceObservernull.for the definition of "project" names@NonNull public SCMSourceObserver.ProjectObserver observe(@NonNull String projectName) throws IllegalArgumentException, IOException, InterruptedException
observe in class SCMSourceObserverprojectName - a name of the project, such as a repository name within an organization; may be used as an
Item.getName()SCMSourceObserver.ProjectObserver.complete()IllegalArgumentException - if this projectName has already been encounteredIOException - if observing this projectName could not be completed due to an IOException.InterruptedException - if observing this projectName was interrupted.public void addAttribute(@NonNull
String key,
@Nullable
Object value)
throws IllegalArgumentException,
ClassCastException
addAttribute in class SCMSourceObserverkey - a predefined attribute namevalue - some value, of a type defined by the attribute, perhaps null if allowed by the attribute
documentationIllegalArgumentException - if the attribute name is unrecognized, or this attribute was already addedClassCastException - if the attribute value is inappropriate for its typepublic boolean isObserving()
isObserving in class SCMSourceObservertrue if the observer is still observing or false to signal that it is ok to stop early.Copyright © 2016–2019. All rights reserved.