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
ConstructorDescriptionChainedRepositoryListener
(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 TypeMethodDescriptionvoid
add
(Collection<? extends org.eclipse.aether.RepositoryListener> listeners) Adds the specified listeners to the end of the multicast chain.void
add
(org.eclipse.aether.RepositoryListener listener) Adds the specified listener to the end of the multicast chain.void
artifactDeployed
(org.eclipse.aether.RepositoryEvent event) void
artifactDeploying
(org.eclipse.aether.RepositoryEvent event) void
artifactDescriptorInvalid
(org.eclipse.aether.RepositoryEvent event) void
artifactDescriptorMissing
(org.eclipse.aether.RepositoryEvent event) void
artifactDownloaded
(org.eclipse.aether.RepositoryEvent event) void
artifactDownloading
(org.eclipse.aether.RepositoryEvent event) void
artifactInstalled
(org.eclipse.aether.RepositoryEvent event) void
artifactInstalling
(org.eclipse.aether.RepositoryEvent event) void
artifactResolved
(org.eclipse.aether.RepositoryEvent event) void
artifactResolving
(org.eclipse.aether.RepositoryEvent event) protected void
handleError
(org.eclipse.aether.RepositoryEvent event, org.eclipse.aether.RepositoryListener listener, RuntimeException error) void
metadataDeployed
(org.eclipse.aether.RepositoryEvent event) void
metadataDeploying
(org.eclipse.aether.RepositoryEvent event) void
metadataDownloaded
(org.eclipse.aether.RepositoryEvent event) void
metadataDownloading
(org.eclipse.aether.RepositoryEvent event) void
metadataInstalled
(org.eclipse.aether.RepositoryEvent event) void
metadataInstalling
(org.eclipse.aether.RepositoryEvent event) void
metadataInvalid
(org.eclipse.aether.RepositoryEvent event) void
metadataResolved
(org.eclipse.aether.RepositoryEvent event) void
metadataResolving
(org.eclipse.aether.RepositoryEvent event) 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.void
remove
(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 benull
or 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 benull
or 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
null
if no listener was supplied.
-
add
Adds the specified listeners to the end of the multicast chain.- Parameters:
listeners
- The listeners to add, may benull
or 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:
artifactDeployed
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
artifactDeployed
in classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDeploying
- Specified by:
artifactDeploying
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
artifactDeploying
in classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDescriptorInvalid
- Specified by:
artifactDescriptorInvalid
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
artifactDescriptorInvalid
in classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDescriptorMissing
- Specified by:
artifactDescriptorMissing
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
artifactDescriptorMissing
in classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDownloaded
- Specified by:
artifactDownloaded
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
artifactDownloaded
in classorg.eclipse.aether.AbstractRepositoryListener
-
artifactDownloading
- Specified by:
artifactDownloading
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
artifactDownloading
in classorg.eclipse.aether.AbstractRepositoryListener
-
artifactInstalled
- Specified by:
artifactInstalled
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
artifactInstalled
in classorg.eclipse.aether.AbstractRepositoryListener
-
artifactInstalling
- Specified by:
artifactInstalling
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
artifactInstalling
in classorg.eclipse.aether.AbstractRepositoryListener
-
artifactResolved
- Specified by:
artifactResolved
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
artifactResolved
in classorg.eclipse.aether.AbstractRepositoryListener
-
artifactResolving
- Specified by:
artifactResolving
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
artifactResolving
in classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDeployed
- Specified by:
metadataDeployed
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
metadataDeployed
in classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDeploying
- Specified by:
metadataDeploying
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
metadataDeploying
in classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDownloaded
- Specified by:
metadataDownloaded
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
metadataDownloaded
in classorg.eclipse.aether.AbstractRepositoryListener
-
metadataDownloading
- Specified by:
metadataDownloading
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
metadataDownloading
in classorg.eclipse.aether.AbstractRepositoryListener
-
metadataInstalled
- Specified by:
metadataInstalled
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
metadataInstalled
in classorg.eclipse.aether.AbstractRepositoryListener
-
metadataInstalling
- Specified by:
metadataInstalling
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
metadataInstalling
in classorg.eclipse.aether.AbstractRepositoryListener
-
metadataInvalid
- Specified by:
metadataInvalid
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
metadataInvalid
in classorg.eclipse.aether.AbstractRepositoryListener
-
metadataResolved
- Specified by:
metadataResolved
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
metadataResolved
in classorg.eclipse.aether.AbstractRepositoryListener
-
metadataResolving
- Specified by:
metadataResolving
in interfaceorg.eclipse.aether.RepositoryListener
- Overrides:
metadataResolving
in classorg.eclipse.aether.AbstractRepositoryListener
-