public final class RepositoryEvent
extends java.lang.Object
RepositoryEvent.EventType.ARTIFACT_RESOLVED
are generally fired in both the success and the failure case. Use
getException()
to check whether an event denotes success or failure.RepositoryListener
,
RepositoryEvent.Builder
Modifier and Type | Class and Description |
---|---|
static class |
RepositoryEvent.Builder
A builder to create events.
|
static class |
RepositoryEvent.EventType
The type of the repository event.
|
Modifier and Type | Field and Description |
---|---|
private Artifact |
artifact |
private java.util.List<java.lang.Exception> |
exceptions |
private java.io.File |
file |
private Metadata |
metadata |
private ArtifactRepository |
repository |
private RepositorySystemSession |
session |
private RequestTrace |
trace |
private RepositoryEvent.EventType |
type |
Constructor and Description |
---|
RepositoryEvent(RepositoryEvent.Builder builder) |
Modifier and Type | Method and Description |
---|---|
Artifact |
getArtifact()
Gets the artifact involved in the event (if any).
|
java.lang.Exception |
getException()
Gets the exception that caused the event (if any).
|
java.util.List<java.lang.Exception> |
getExceptions()
Gets the exceptions that caused the event (if any).
|
java.io.File |
getFile()
Gets the file involved in the event (if any).
|
Metadata |
getMetadata()
Gets the metadata involved in the event (if any).
|
ArtifactRepository |
getRepository()
Gets the repository involved in the event (if any).
|
RepositorySystemSession |
getSession()
Gets the repository system session during which the event occurred.
|
RequestTrace |
getTrace()
Gets the trace information about the request during which the event occurred.
|
RepositoryEvent.EventType |
getType()
Gets the type of the event.
|
java.lang.String |
toString() |
private final RepositoryEvent.EventType type
private final RepositorySystemSession session
private final Artifact artifact
private final Metadata metadata
private final ArtifactRepository repository
private final java.io.File file
private final java.util.List<java.lang.Exception> exceptions
private final RequestTrace trace
RepositoryEvent(RepositoryEvent.Builder builder)
public RepositoryEvent.EventType getType()
null
.public RepositorySystemSession getSession()
null
.public Artifact getArtifact()
null
if none.public Metadata getMetadata()
null
if none.public java.io.File getFile()
null
if none.public ArtifactRepository getRepository()
null
if none.public java.lang.Exception getException()
null
if none.public java.util.List<java.lang.Exception> getExceptions()
null
.public RequestTrace getTrace()
null
if none.public java.lang.String toString()
toString
in class java.lang.Object