org.eclipse.aether

## Class RepositoryEvent

- java.lang.Object
- - org.eclipse.aether.RepositoryEvent

-     public final class RepositoryEvent
      extends Object

  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.
  See Also:
    `RepositoryListener`, `RepositoryEvent.Builder`

- - ### Nested Class Summary

    Nested Classes
    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.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Artifact` | `getArtifact()` Gets the artifact involved in the event (if any).
    `Exception` | `getException()` Gets the exception that caused the event (if any).
    `List<Exception>` | `getExceptions()` Gets the exceptions that caused the event (if any).
    `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.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getType

          public RepositoryEvent.EventType getType()

      Gets the type of the event.
      Returns:
        The type of the event, never `null`.

    - #### getSession

          public 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

          public Artifact getArtifact()

      Gets the artifact involved in the event (if any).
      Returns:
        The involved artifact or `null` if none.

    - #### getMetadata

          public Metadata getMetadata()

      Gets the metadata involved in the event (if any).
      Returns:
        The involved metadata or `null` if none.

    - #### getFile

          public File getFile()

      Gets the file involved in the event (if any).
      Returns:
        The involved file or `null` if none.

    - #### getRepository

          public ArtifactRepository getRepository()

      Gets the repository involved in the event (if any).
      Returns:
        The involved repository or `null` if none.

    - #### getException

          public 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

          public List<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

          public RequestTrace getTrace()

      Gets the trace information about the request during which the event occurred.
      Returns:
        The trace information or `null` if none.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2010-2014 The Eclipse Foundation. All Rights Reserved.