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
public final class ChainedRepositoryListener extends org.eclipse.aether.AbstractRepositoryListener
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
Constructors Constructor Description ChainedRepositoryListener(java.util.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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.util.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, java.lang.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 Detail
-
ChainedRepositoryListener
public ChainedRepositoryListener(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.
-
ChainedRepositoryListener
public ChainedRepositoryListener(java.util.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 Detail
-
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
public void add(java.util.Collection<? extends org.eclipse.aether.RepositoryListener> listeners)
Adds the specified listeners to the end of the multicast chain.- Parameters:
listeners- The listeners to add, may benullor empty.
-
add
public void add(org.eclipse.aether.RepositoryListener listener)
Adds the specified listener to the end of the multicast chain.- Parameters:
listener- The listener to add, may benull.
-
remove
public void remove(org.eclipse.aether.RepositoryListener listener)
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, java.lang.RuntimeException error)
-
artifactDeployed
public void artifactDeployed(org.eclipse.aether.RepositoryEvent event)
- Specified by:
artifactDeployedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDeployedin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDeploying
public void artifactDeploying(org.eclipse.aether.RepositoryEvent event)
- Specified by:
artifactDeployingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDeployingin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDescriptorInvalid
public void artifactDescriptorInvalid(org.eclipse.aether.RepositoryEvent event)
- Specified by:
artifactDescriptorInvalidin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDescriptorInvalidin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDescriptorMissing
public void artifactDescriptorMissing(org.eclipse.aether.RepositoryEvent event)
- Specified by:
artifactDescriptorMissingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDescriptorMissingin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDownloaded
public void artifactDownloaded(org.eclipse.aether.RepositoryEvent event)
- Specified by:
artifactDownloadedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDownloadedin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDownloading
public void artifactDownloading(org.eclipse.aether.RepositoryEvent event)
- Specified by:
artifactDownloadingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactDownloadingin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactInstalled
public void artifactInstalled(org.eclipse.aether.RepositoryEvent event)
- Specified by:
artifactInstalledin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactInstalledin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactInstalling
public void artifactInstalling(org.eclipse.aether.RepositoryEvent event)
- Specified by:
artifactInstallingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactInstallingin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactResolved
public void artifactResolved(org.eclipse.aether.RepositoryEvent event)
- Specified by:
artifactResolvedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactResolvedin classorg.eclipse.aether.AbstractRepositoryListener
-
artifactResolving
public void artifactResolving(org.eclipse.aether.RepositoryEvent event)
- Specified by:
artifactResolvingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
artifactResolvingin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDeployed
public void metadataDeployed(org.eclipse.aether.RepositoryEvent event)
- Specified by:
metadataDeployedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataDeployedin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDeploying
public void metadataDeploying(org.eclipse.aether.RepositoryEvent event)
- Specified by:
metadataDeployingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataDeployingin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDownloaded
public void metadataDownloaded(org.eclipse.aether.RepositoryEvent event)
- Specified by:
metadataDownloadedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataDownloadedin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDownloading
public void metadataDownloading(org.eclipse.aether.RepositoryEvent event)
- Specified by:
metadataDownloadingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataDownloadingin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataInstalled
public void metadataInstalled(org.eclipse.aether.RepositoryEvent event)
- Specified by:
metadataInstalledin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataInstalledin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataInstalling
public void metadataInstalling(org.eclipse.aether.RepositoryEvent event)
- Specified by:
metadataInstallingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataInstallingin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataInvalid
public void metadataInvalid(org.eclipse.aether.RepositoryEvent event)
- Specified by:
metadataInvalidin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataInvalidin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataResolved
public void metadataResolved(org.eclipse.aether.RepositoryEvent event)
- Specified by:
metadataResolvedin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataResolvedin classorg.eclipse.aether.AbstractRepositoryListener
-
metadataResolving
public void metadataResolving(org.eclipse.aether.RepositoryEvent event)
- Specified by:
metadataResolvingin interfaceorg.eclipse.aether.RepositoryListener- Overrides:
metadataResolvingin classorg.eclipse.aether.AbstractRepositoryListener
-
-