]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.repo/src/org/eclipse/aether/RepositoryListener.java
1 /*******************************************************************************
2 * Copyright (c) 2010, 2014 Sonatype, Inc.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Sonatype, Inc. - initial API and implementation
10 *******************************************************************************/
11 package org
.eclipse
.aether
;
14 * A listener being notified of events from the repository system. In general, the system sends events upon termination
15 * of an operation like {@link #artifactResolved(RepositoryEvent)} regardless whether it succeeded or failed so
16 * listeners need to inspect the event details carefully. Also, the listener may be called from an arbitrary thread.
17 * <em>Note:</em> Implementors are strongly advised to inherit from {@link AbstractRepositoryListener} instead of
18 * directly implementing this interface.
20 * @see org.eclipse.aether.RepositorySystemSession#getRepositoryListener()
21 * @see org.eclipse.aether.transfer.TransferListener
22 * @noimplement This interface is not intended to be implemented by clients.
23 * @noextend This interface is not intended to be extended by clients.
25 public interface RepositoryListener
29 * Notifies the listener of a syntactically or semantically invalid artifact descriptor.
30 * {@link RepositoryEvent#getArtifact()} indicates the artifact whose descriptor is invalid and
31 * {@link RepositoryEvent#getExceptions()} carries the encountered errors. Depending on the session's
32 * {@link org.eclipse.aether.resolution.ArtifactDescriptorPolicy}, the underlying repository operation might abort
33 * with an exception or ignore the invalid descriptor.
35 * @param event The event details, must not be {@code null}.
37 void artifactDescriptorInvalid( RepositoryEvent event
);
40 * Notifies the listener of a missing artifact descriptor. {@link RepositoryEvent#getArtifact()} indicates the
41 * artifact whose descriptor is missing. Depending on the session's
42 * {@link org.eclipse.aether.resolution.ArtifactDescriptorPolicy}, the underlying repository operation might abort
43 * with an exception or ignore the missing descriptor.
45 * @param event The event details, must not be {@code null}.
47 void artifactDescriptorMissing( RepositoryEvent event
);
50 * Notifies the listener of syntactically or semantically invalid metadata. {@link RepositoryEvent#getMetadata()}
51 * indicates the invalid metadata and {@link RepositoryEvent#getExceptions()} carries the encountered errors. The
52 * underlying repository operation might still succeed, depending on whether the metadata in question is actually
53 * needed to carry out the resolution process.
55 * @param event The event details, must not be {@code null}.
57 void metadataInvalid( RepositoryEvent event
);
60 * Notifies the listener of an artifact that is about to be resolved. {@link RepositoryEvent#getArtifact()} denotes
61 * the artifact in question. Unlike the {@link #artifactDownloading(RepositoryEvent)} event, this event is fired
62 * regardless whether the artifact already exists locally or not.
64 * @param event The event details, must not be {@code null}.
66 void artifactResolving( RepositoryEvent event
);
69 * Notifies the listener of an artifact whose resolution has been completed, either successfully or not.
70 * {@link RepositoryEvent#getArtifact()} denotes the artifact in question and
71 * {@link RepositoryEvent#getExceptions()} indicates whether the resolution succeeded or failed. Unlike the
72 * {@link #artifactDownloaded(RepositoryEvent)} event, this event is fired regardless whether the artifact already
73 * exists locally or not.
75 * @param event The event details, must not be {@code null}.
77 void artifactResolved( RepositoryEvent event
);
80 * Notifies the listener of some metadata that is about to be resolved. {@link RepositoryEvent#getMetadata()}
81 * denotes the metadata in question. Unlike the {@link #metadataDownloading(RepositoryEvent)} event, this event is
82 * fired regardless whether the metadata already exists locally or not.
84 * @param event The event details, must not be {@code null}.
86 void metadataResolving( RepositoryEvent event
);
89 * Notifies the listener of some metadata whose resolution has been completed, either successfully or not.
90 * {@link RepositoryEvent#getMetadata()} denotes the metadata in question and
91 * {@link RepositoryEvent#getExceptions()} indicates whether the resolution succeeded or failed. Unlike the
92 * {@link #metadataDownloaded(RepositoryEvent)} event, this event is fired regardless whether the metadata already
93 * exists locally or not.
95 * @param event The event details, must not be {@code null}.
97 void metadataResolved( RepositoryEvent event
);
100 * Notifies the listener of an artifact that is about to be downloaded from a remote repository.
101 * {@link RepositoryEvent#getArtifact()} denotes the artifact in question and
102 * {@link RepositoryEvent#getRepository()} the source repository. Unlike the
103 * {@link #artifactResolving(RepositoryEvent)} event, this event is only fired when the artifact does not already
106 * @param event The event details, must not be {@code null}.
108 void artifactDownloading( RepositoryEvent event
);
111 * Notifies the listener of an artifact whose download has been completed, either successfully or not.
112 * {@link RepositoryEvent#getArtifact()} denotes the artifact in question and
113 * {@link RepositoryEvent#getExceptions()} indicates whether the download succeeded or failed. Unlike the
114 * {@link #artifactResolved(RepositoryEvent)} event, this event is only fired when the artifact does not already
117 * @param event The event details, must not be {@code null}.
119 void artifactDownloaded( RepositoryEvent event
);
122 * Notifies the listener of some metadata that is about to be downloaded from a remote repository.
123 * {@link RepositoryEvent#getMetadata()} denotes the metadata in question and
124 * {@link RepositoryEvent#getRepository()} the source repository. Unlike the
125 * {@link #metadataResolving(RepositoryEvent)} event, this event is only fired when the metadata does not already
128 * @param event The event details, must not be {@code null}.
130 void metadataDownloading( RepositoryEvent event
);
133 * Notifies the listener of some metadata whose download has been completed, either successfully or not.
134 * {@link RepositoryEvent#getMetadata()} denotes the metadata in question and
135 * {@link RepositoryEvent#getExceptions()} indicates whether the download succeeded or failed. Unlike the
136 * {@link #metadataResolved(RepositoryEvent)} event, this event is only fired when the metadata does not already
139 * @param event The event details, must not be {@code null}.
141 void metadataDownloaded( RepositoryEvent event
);
144 * Notifies the listener of an artifact that is about to be installed to the local repository.
145 * {@link RepositoryEvent#getArtifact()} denotes the artifact in question.
147 * @param event The event details, must not be {@code null}.
149 void artifactInstalling( RepositoryEvent event
);
152 * Notifies the listener of an artifact whose installation to the local repository has been completed, either
153 * successfully or not. {@link RepositoryEvent#getArtifact()} denotes the artifact in question and
154 * {@link RepositoryEvent#getExceptions()} indicates whether the installation succeeded or failed.
156 * @param event The event details, must not be {@code null}.
158 void artifactInstalled( RepositoryEvent event
);
161 * Notifies the listener of some metadata that is about to be installed to the local repository.
162 * {@link RepositoryEvent#getMetadata()} denotes the metadata in question.
164 * @param event The event details, must not be {@code null}.
166 void metadataInstalling( RepositoryEvent event
);
169 * Notifies the listener of some metadata whose installation to the local repository has been completed, either
170 * successfully or not. {@link RepositoryEvent#getMetadata()} denotes the metadata in question and
171 * {@link RepositoryEvent#getExceptions()} indicates whether the installation succeeded or failed.
173 * @param event The event details, must not be {@code null}.
175 void metadataInstalled( RepositoryEvent event
);
178 * Notifies the listener of an artifact that is about to be uploaded to a remote repository.
179 * {@link RepositoryEvent#getArtifact()} denotes the artifact in question and
180 * {@link RepositoryEvent#getRepository()} the destination repository.
182 * @param event The event details, must not be {@code null}.
184 void artifactDeploying( RepositoryEvent event
);
187 * Notifies the listener of an artifact whose upload to a remote repository has been completed, either successfully
188 * or not. {@link RepositoryEvent#getArtifact()} denotes the artifact in question and
189 * {@link RepositoryEvent#getExceptions()} indicates whether the upload succeeded or failed.
191 * @param event The event details, must not be {@code null}.
193 void artifactDeployed( RepositoryEvent event
);
196 * Notifies the listener of some metadata that is about to be uploaded to a remote repository.
197 * {@link RepositoryEvent#getMetadata()} denotes the metadata in question and
198 * {@link RepositoryEvent#getRepository()} the destination repository.
200 * @param event The event details, must not be {@code null}.
202 void metadataDeploying( RepositoryEvent event
);
205 * Notifies the listener of some metadata whose upload to a remote repository has been completed, either
206 * successfully or not. {@link RepositoryEvent#getMetadata()} denotes the metadata in question and
207 * {@link RepositoryEvent#getExceptions()} indicates whether the upload succeeded or failed.
209 * @param event The event details, must not be {@code null}.
211 void metadataDeployed( RepositoryEvent event
);