public final class ChainedRepositoryListener extends AbstractRepositoryListener
Constructor and Description |
---|
ChainedRepositoryListener(Collection<? extends RepositoryListener> listeners)
Creates a new multicast listener that delegates to the specified listeners.
|
ChainedRepositoryListener(RepositoryListener... listeners)
Creates a new multicast listener that delegates to the specified listeners.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Collection<? extends RepositoryListener> listeners)
Adds the specified listeners to the end of the multicast chain.
|
void |
add(RepositoryListener listener)
Adds the specified listener to the end of the multicast chain.
|
void |
artifactDeployed(RepositoryEvent event)
Notifies the listener of an artifact whose upload to a remote repository has been completed, either successfully
or not.
|
void |
artifactDeploying(RepositoryEvent event)
Notifies the listener of an artifact that is about to be uploaded to a remote repository.
|
void |
artifactDescriptorInvalid(RepositoryEvent event)
Notifies the listener of a syntactically or semantically invalid artifact descriptor.
|
void |
artifactDescriptorMissing(RepositoryEvent event)
Notifies the listener of a missing artifact descriptor.
|
void |
artifactDownloaded(RepositoryEvent event)
Notifies the listener of an artifact whose download has been completed, either successfully or not.
|
void |
artifactDownloading(RepositoryEvent event)
Notifies the listener of an artifact that is about to be downloaded from a remote repository.
|
void |
artifactInstalled(RepositoryEvent event)
Notifies the listener of an artifact whose installation to the local repository has been completed, either
successfully or not.
|
void |
artifactInstalling(RepositoryEvent event)
Notifies the listener of an artifact that is about to be installed to the local repository.
|
void |
artifactResolved(RepositoryEvent event)
Notifies the listener of an artifact whose resolution has been completed, either successfully or not.
|
void |
artifactResolving(RepositoryEvent event)
Notifies the listener of an artifact that is about to be resolved.
|
protected void |
handleError(RepositoryEvent event,
RepositoryListener listener,
RuntimeException error) |
void |
metadataDeployed(RepositoryEvent event)
Notifies the listener of some metadata whose upload to a remote repository has been completed, either
successfully or not.
|
void |
metadataDeploying(RepositoryEvent event)
Notifies the listener of some metadata that is about to be uploaded to a remote repository.
|
void |
metadataDownloaded(RepositoryEvent event)
Notifies the listener of some metadata whose download has been completed, either successfully or not.
|
void |
metadataDownloading(RepositoryEvent event)
Notifies the listener of some metadata that is about to be downloaded from a remote repository.
|
void |
metadataInstalled(RepositoryEvent event)
Notifies the listener of some metadata whose installation to the local repository has been completed, either
successfully or not.
|
void |
metadataInstalling(RepositoryEvent event)
Notifies the listener of some metadata that is about to be installed to the local repository.
|
void |
metadataInvalid(RepositoryEvent event)
Notifies the listener of syntactically or semantically invalid metadata.
|
void |
metadataResolved(RepositoryEvent event)
Notifies the listener of some metadata whose resolution has been completed, either successfully or not.
|
void |
metadataResolving(RepositoryEvent event)
Notifies the listener of some metadata that is about to be resolved.
|
static RepositoryListener |
newInstance(RepositoryListener listener1,
RepositoryListener listener2)
Creates a new multicast listener that delegates to the specified listeners.
|
void |
remove(RepositoryListener listener)
Removes the specified listener from the multicast chain.
|
public ChainedRepositoryListener(RepositoryListener... listeners)
listeners
- The listeners to delegate to, may be null
or empty.public ChainedRepositoryListener(Collection<? extends RepositoryListener> listeners)
listeners
- The listeners to delegate to, may be null
or empty.public static RepositoryListener newInstance(RepositoryListener listener1, RepositoryListener listener2)
null
.listener1
- The first listener, may be null
.listener2
- The second listener, may be null
.null
if no listener was supplied.public void add(Collection<? extends RepositoryListener> listeners)
listeners
- The listeners to add, may be null
or empty.public void add(RepositoryListener listener)
listener
- The listener to add, may be null
.public void remove(RepositoryListener listener)
listener
- The listener to remove, may be null
.protected void handleError(RepositoryEvent event, RepositoryListener listener, RuntimeException error)
public void artifactDeployed(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getArtifact()
denotes the artifact in question and
RepositoryEvent.getExceptions()
indicates whether the upload succeeded or failed.artifactDeployed
in interface RepositoryListener
artifactDeployed
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void artifactDeploying(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getArtifact()
denotes the artifact in question and
RepositoryEvent.getRepository()
the destination repository.artifactDeploying
in interface RepositoryListener
artifactDeploying
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void artifactDescriptorInvalid(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getArtifact()
indicates the artifact whose descriptor is invalid and
RepositoryEvent.getExceptions()
carries the encountered errors. Depending on the session's
ArtifactDescriptorPolicy
, the underlying repository operation might abort
with an exception or ignore the invalid descriptor.artifactDescriptorInvalid
in interface RepositoryListener
artifactDescriptorInvalid
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void artifactDescriptorMissing(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getArtifact()
indicates the
artifact whose descriptor is missing. Depending on the session's
ArtifactDescriptorPolicy
, the underlying repository operation might abort
with an exception or ignore the missing descriptor.artifactDescriptorMissing
in interface RepositoryListener
artifactDescriptorMissing
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void artifactDownloaded(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getArtifact()
denotes the artifact in question and
RepositoryEvent.getExceptions()
indicates whether the download succeeded or failed. Unlike the
RepositoryListener.artifactResolved(RepositoryEvent)
event, this event is only fired when the artifact does not already
exist locally.artifactDownloaded
in interface RepositoryListener
artifactDownloaded
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void artifactDownloading(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getArtifact()
denotes the artifact in question and
RepositoryEvent.getRepository()
the source repository. Unlike the
RepositoryListener.artifactResolving(RepositoryEvent)
event, this event is only fired when the artifact does not already
exist locally.artifactDownloading
in interface RepositoryListener
artifactDownloading
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void artifactInstalled(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getArtifact()
denotes the artifact in question and
RepositoryEvent.getExceptions()
indicates whether the installation succeeded or failed.artifactInstalled
in interface RepositoryListener
artifactInstalled
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void artifactInstalling(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getArtifact()
denotes the artifact in question.artifactInstalling
in interface RepositoryListener
artifactInstalling
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void artifactResolved(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getArtifact()
denotes the artifact in question and
RepositoryEvent.getExceptions()
indicates whether the resolution succeeded or failed. Unlike the
RepositoryListener.artifactDownloaded(RepositoryEvent)
event, this event is fired regardless whether the artifact already
exists locally or not.artifactResolved
in interface RepositoryListener
artifactResolved
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void artifactResolving(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getArtifact()
denotes
the artifact in question. Unlike the RepositoryListener.artifactDownloading(RepositoryEvent)
event, this event is fired
regardless whether the artifact already exists locally or not.artifactResolving
in interface RepositoryListener
artifactResolving
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void metadataDeployed(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getMetadata()
denotes the metadata in question and
RepositoryEvent.getExceptions()
indicates whether the upload succeeded or failed.metadataDeployed
in interface RepositoryListener
metadataDeployed
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void metadataDeploying(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getMetadata()
denotes the metadata in question and
RepositoryEvent.getRepository()
the destination repository.metadataDeploying
in interface RepositoryListener
metadataDeploying
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void metadataDownloaded(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getMetadata()
denotes the metadata in question and
RepositoryEvent.getExceptions()
indicates whether the download succeeded or failed. Unlike the
RepositoryListener.metadataResolved(RepositoryEvent)
event, this event is only fired when the metadata does not already
exist locally.metadataDownloaded
in interface RepositoryListener
metadataDownloaded
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void metadataDownloading(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getMetadata()
denotes the metadata in question and
RepositoryEvent.getRepository()
the source repository. Unlike the
RepositoryListener.metadataResolving(RepositoryEvent)
event, this event is only fired when the metadata does not already
exist locally.metadataDownloading
in interface RepositoryListener
metadataDownloading
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void metadataInstalled(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getMetadata()
denotes the metadata in question and
RepositoryEvent.getExceptions()
indicates whether the installation succeeded or failed.metadataInstalled
in interface RepositoryListener
metadataInstalled
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void metadataInstalling(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getMetadata()
denotes the metadata in question.metadataInstalling
in interface RepositoryListener
metadataInstalling
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void metadataInvalid(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getMetadata()
indicates the invalid metadata and RepositoryEvent.getExceptions()
carries the encountered errors. The
underlying repository operation might still succeed, depending on whether the metadata in question is actually
needed to carry out the resolution process.metadataInvalid
in interface RepositoryListener
metadataInvalid
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void metadataResolved(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getMetadata()
denotes the metadata in question and
RepositoryEvent.getExceptions()
indicates whether the resolution succeeded or failed. Unlike the
RepositoryListener.metadataDownloaded(RepositoryEvent)
event, this event is fired regardless whether the metadata already
exists locally or not.metadataResolved
in interface RepositoryListener
metadataResolved
in class AbstractRepositoryListener
event
- The event details, must not be null
.public void metadataResolving(RepositoryEvent event)
RepositoryListener
RepositoryEvent.getMetadata()
denotes the metadata in question. Unlike the RepositoryListener.metadataDownloading(RepositoryEvent)
event, this event is
fired regardless whether the metadata already exists locally or not.metadataResolving
in interface RepositoryListener
metadataResolving
in class AbstractRepositoryListener
event
- The event details, must not be null
.Copyright © 2010–2022 The Apache Software Foundation. All rights reserved.