Package org.eclipse.aether.util.listener
Class ChainedRepositoryListener
java.lang.Object
org.eclipse.aether.AbstractRepositoryListener
org.eclipse.aether.util.listener.ChainedRepositoryListener
- All Implemented Interfaces:
org.eclipse.aether.RepositoryListener
A repository listener that delegates to zero or more other listeners (multicast). The list of target listeners is
thread-safe, i.e. target listeners can be added or removed by any thread at any time.
-
Constructor Summary
ConstructorsConstructorDescriptionChainedRepositoryListener(Collection<? extends org.eclipse.aether.RepositoryListener> listeners) Creates a new multicast listener that delegates to the specified listeners.ChainedRepositoryListener(org.eclipse.aether.RepositoryListener... listeners) Creates a new multicast listener that delegates to the specified listeners. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Collection<? extends org.eclipse.aether.RepositoryListener> listeners) Adds the specified listeners to the end of the multicast chain.voidadd(org.eclipse.aether.RepositoryListener listener) Adds the specified listener to the end of the multicast chain.voidartifactDeployed(org.eclipse.aether.RepositoryEvent event) voidartifactDeploying(org.eclipse.aether.RepositoryEvent event) voidartifactDescriptorInvalid(org.eclipse.aether.RepositoryEvent event) voidartifactDescriptorMissing(org.eclipse.aether.RepositoryEvent event) voidartifactDownloaded(org.eclipse.aether.RepositoryEvent event) voidartifactDownloading(org.eclipse.aether.RepositoryEvent event) voidartifactInstalled(org.eclipse.aether.RepositoryEvent event) voidartifactInstalling(org.eclipse.aether.RepositoryEvent event) voidartifactResolved(org.eclipse.aether.RepositoryEvent event) voidartifactResolving(org.eclipse.aether.RepositoryEvent event) protected voidhandleError(org.eclipse.aether.RepositoryEvent event, org.eclipse.aether.RepositoryListener listener, RuntimeException error) voidmetadataDeployed(org.eclipse.aether.RepositoryEvent event) voidmetadataDeploying(org.eclipse.aether.RepositoryEvent event) voidmetadataDownloaded(org.eclipse.aether.RepositoryEvent event) voidmetadataDownloading(org.eclipse.aether.RepositoryEvent event) voidmetadataInstalled(org.eclipse.aether.RepositoryEvent event) voidmetadataInstalling(org.eclipse.aether.RepositoryEvent event) voidmetadataInvalid(org.eclipse.aether.RepositoryEvent event) voidmetadataResolved(org.eclipse.aether.RepositoryEvent event) voidmetadataResolving(org.eclipse.aether.RepositoryEvent event) static org.eclipse.aether.RepositoryListenernewInstance(org.eclipse.aether.RepositoryListener listener1, org.eclipse.aether.RepositoryListener listener2) Creates a new multicast listener that delegates to the specified listeners.voidremove(org.eclipse.aether.RepositoryListener listener) Removes the specified listener from the multicast chain.
-
Constructor Details
-
ChainedRepositoryListener
Creates a new multicast listener that delegates to the specified listeners.- Parameters:
listeners- The listeners to delegate to, may benullor empty.
-
ChainedRepositoryListener
public ChainedRepositoryListener(Collection<? extends org.eclipse.aether.RepositoryListener> listeners) Creates a new multicast listener that delegates to the specified listeners.- Parameters:
listeners- The listeners to delegate to, may benullor empty.
-
-
Method Details
-
newInstance
public static org.eclipse.aether.RepositoryListener newInstance(org.eclipse.aether.RepositoryListener listener1, org.eclipse.aether.RepositoryListener listener2) Creates a new multicast listener that delegates to the specified listeners. In contrast to the constructor, this factory method will avoid creating an actual chained listener if one of the specified readers is actuallynull.- Parameters:
listener1- The first listener, may benull.listener2- The second listener, may benull.- Returns:
- The chained listener or
nullif no listener was supplied.
-
add
Adds the specified listeners to the end of the multicast chain.- Parameters:
listeners- The listeners to add, may benullor empty.
-
add
Adds the specified listener to the end of the multicast chain.- Parameters:
listener- The listener to add, may benull.
-
remove
Removes the specified listener from the multicast chain. Trying to remove a non-existing listener has no effect.- Parameters:
listener- The listener to remove, may benull.
-
handleError
protected void handleError(org.eclipse.aether.RepositoryEvent event, org.eclipse.aether.RepositoryListener listener, RuntimeException error) -
artifactDeployed
- Specified by:
artifactDeployedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDeployedin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDeploying
- Specified by:
artifactDeployingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDeployingin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDescriptorInvalid
- Specified by:
artifactDescriptorInvalidin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDescriptorInvalidin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDescriptorMissing
- Specified by:
artifactDescriptorMissingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDescriptorMissingin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDownloaded
- Specified by:
artifactDownloadedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDownloadedin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDownloading
- Specified by:
artifactDownloadingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDownloadingin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactInstalled
- Specified by:
artifactInstalledin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactInstalledin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactInstalling
- Specified by:
artifactInstallingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactInstallingin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactResolved
- Specified by:
artifactResolvedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactResolvedin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactResolving
- Specified by:
artifactResolvingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactResolvingin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDeployed
- Specified by:
metadataDeployedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataDeployedin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDeploying
- Specified by:
metadataDeployingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataDeployingin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDownloaded
- Specified by:
metadataDownloadedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataDownloadedin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDownloading
- Specified by:
metadataDownloadingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataDownloadingin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataInstalled
- Specified by:
metadataInstalledin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataInstalledin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataInstalling
- Specified by:
metadataInstallingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataInstallingin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataInvalid
- Specified by:
metadataInvalidin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataInvalidin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataResolved
- Specified by:
metadataResolvedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataResolvedin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataResolving
- Specified by:
metadataResolvingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataResolvingin classorg.eclipse.aether.AbstractRepositoryListener
-