org.sonatype.aether
Interface RepositoryEvent

All Known Implementing Classes:
DefaultRepositoryEvent

public interface RepositoryEvent

An event describing an action performed by the repository system. Note that events which indicate the end of an action like 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.

Author:
Benjamin Bentmann
See Also:
RepositoryListener

Nested Class Summary
static class RepositoryEvent.EventType
          The type of the event.
 
Method Summary
 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.
 

Method Detail

getType

RepositoryEvent.EventType getType()
Gets the type of the event.

Returns:
The type of the event, never null.

getSession

RepositorySystemSession getSession()
Gets the repository system session during which the event occurred.

Returns:
The repository system session during which the event occurred, never null.

getArtifact

Artifact getArtifact()
Gets the artifact involved in the event (if any).

Returns:
The involved artifact or null if none.

getMetadata

Metadata getMetadata()
Gets the metadata involved in the event (if any).

Returns:
The involved metadata or null if none.

getFile

java.io.File getFile()
Gets the file involved in the event (if any).

Returns:
The involved file or null if none.

getRepository

ArtifactRepository getRepository()
Gets the repository involved in the event (if any).

Returns:
The involved repository or null if none.

getException

java.lang.Exception getException()
Gets the exception that caused the event (if any). As a rule of thumb, an event accompanied by an exception indicates a failure of the corresponding action. If multiple exceptions occurred, this method returns the first exception.

Returns:
The exception or null if none.

getExceptions

java.util.List<java.lang.Exception> getExceptions()
Gets the exceptions that caused the event (if any). As a rule of thumb, an event accompanied by exceptions indicates a failure of the corresponding action.

Returns:
The exceptions, never null.

getTrace

RequestTrace getTrace()
Gets the trace information about the request during which the event occurred.

Returns:
The trace information or null if none.


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.