Class ChainedRepositoryListener

java.lang.Object
org.eclipse.aether.AbstractRepositoryListener
org.eclipse.aether.util.listener.ChainedRepositoryListener
All Implemented Interfaces:
org.eclipse.aether.RepositoryListener

public final class ChainedRepositoryListener extends org.eclipse.aether.AbstractRepositoryListener
A repository listener that delegates to zero or more other listeners (multicast). The list of target listeners is thread-safe, i.e. target listeners can be added or removed by any thread at any time.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ChainedRepositoryListener(Collection<? extends org.eclipse.aether.RepositoryListener> listeners)
    Creates a new multicast listener that delegates to the specified listeners.
    ChainedRepositoryListener(org.eclipse.aether.RepositoryListener... listeners)
    Creates a new multicast listener that delegates to the specified listeners.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Collection<? extends org.eclipse.aether.RepositoryListener> listeners)
    Adds the specified listeners to the end of the multicast chain.
    void
    add(org.eclipse.aether.RepositoryListener listener)
    Adds the specified listener to the end of the multicast chain.
    void
    artifactDeployed(org.eclipse.aether.RepositoryEvent event)
     
    void
    artifactDeploying(org.eclipse.aether.RepositoryEvent event)
     
    void
    artifactDescriptorInvalid(org.eclipse.aether.RepositoryEvent event)
     
    void
    artifactDescriptorMissing(org.eclipse.aether.RepositoryEvent event)
     
    void
    artifactDownloaded(org.eclipse.aether.RepositoryEvent event)
     
    void
    artifactDownloading(org.eclipse.aether.RepositoryEvent event)
     
    void
    artifactInstalled(org.eclipse.aether.RepositoryEvent event)
     
    void
    artifactInstalling(org.eclipse.aether.RepositoryEvent event)
     
    void
    artifactResolved(org.eclipse.aether.RepositoryEvent event)
     
    void
    artifactResolving(org.eclipse.aether.RepositoryEvent event)
     
    protected void
    handleError(org.eclipse.aether.RepositoryEvent event, org.eclipse.aether.RepositoryListener listener, RuntimeException error)
     
    void
    metadataDeployed(org.eclipse.aether.RepositoryEvent event)
     
    void
    metadataDeploying(org.eclipse.aether.RepositoryEvent event)
     
    void
    metadataDownloaded(org.eclipse.aether.RepositoryEvent event)
     
    void
    metadataDownloading(org.eclipse.aether.RepositoryEvent event)
     
    void
    metadataInstalled(org.eclipse.aether.RepositoryEvent event)
     
    void
    metadataInstalling(org.eclipse.aether.RepositoryEvent event)
     
    void
    metadataInvalid(org.eclipse.aether.RepositoryEvent event)
     
    void
    metadataResolved(org.eclipse.aether.RepositoryEvent event)
     
    void
    metadataResolving(org.eclipse.aether.RepositoryEvent event)
     
    static org.eclipse.aether.RepositoryListener
    newInstance(org.eclipse.aether.RepositoryListener listener1, org.eclipse.aether.RepositoryListener listener2)
    Creates a new multicast listener that delegates to the specified listeners.
    void
    remove(org.eclipse.aether.RepositoryListener listener)
    Removes the specified listener from the multicast chain.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ChainedRepositoryListener

      public ChainedRepositoryListener(org.eclipse.aether.RepositoryListener... listeners)
      Creates a new multicast listener that delegates to the specified listeners.
      Parameters:
      listeners - The listeners to delegate to, may be null or empty.
    • ChainedRepositoryListener

      public ChainedRepositoryListener(Collection<? extends org.eclipse.aether.RepositoryListener> listeners)
      Creates a new multicast listener that delegates to the specified listeners.
      Parameters:
      listeners - The listeners to delegate to, may be null or empty.
  • Method Details

    • newInstance

      public static org.eclipse.aether.RepositoryListener newInstance(org.eclipse.aether.RepositoryListener listener1, org.eclipse.aether.RepositoryListener listener2)
      Creates a new multicast listener that delegates to the specified listeners. In contrast to the constructor, this factory method will avoid creating an actual chained listener if one of the specified readers is actually null.
      Parameters:
      listener1 - The first listener, may be null.
      listener2 - The second listener, may be null.
      Returns:
      The chained listener or null if no listener was supplied.
    • add

      public void add(Collection<? extends org.eclipse.aether.RepositoryListener> listeners)
      Adds the specified listeners to the end of the multicast chain.
      Parameters:
      listeners - The listeners to add, may be null or empty.
    • add

      public void add(org.eclipse.aether.RepositoryListener listener)
      Adds the specified listener to the end of the multicast chain.
      Parameters:
      listener - The listener to add, may be null.
    • remove

      public void remove(org.eclipse.aether.RepositoryListener listener)
      Removes the specified listener from the multicast chain. Trying to remove a non-existing listener has no effect.
      Parameters:
      listener - The listener to remove, may be null.
    • handleError

      protected void handleError(org.eclipse.aether.RepositoryEvent event, org.eclipse.aether.RepositoryListener listener, RuntimeException error)
    • artifactDeployed

      public void artifactDeployed(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      artifactDeployed in interface org.eclipse.aether.RepositoryListener
      Overrides:
      artifactDeployed in class org.eclipse.aether.AbstractRepositoryListener
    • artifactDeploying

      public void artifactDeploying(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      artifactDeploying in interface org.eclipse.aether.RepositoryListener
      Overrides:
      artifactDeploying in class org.eclipse.aether.AbstractRepositoryListener
    • artifactDescriptorInvalid

      public void artifactDescriptorInvalid(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      artifactDescriptorInvalid in interface org.eclipse.aether.RepositoryListener
      Overrides:
      artifactDescriptorInvalid in class org.eclipse.aether.AbstractRepositoryListener
    • artifactDescriptorMissing

      public void artifactDescriptorMissing(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      artifactDescriptorMissing in interface org.eclipse.aether.RepositoryListener
      Overrides:
      artifactDescriptorMissing in class org.eclipse.aether.AbstractRepositoryListener
    • artifactDownloaded

      public void artifactDownloaded(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      artifactDownloaded in interface org.eclipse.aether.RepositoryListener
      Overrides:
      artifactDownloaded in class org.eclipse.aether.AbstractRepositoryListener
    • artifactDownloading

      public void artifactDownloading(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      artifactDownloading in interface org.eclipse.aether.RepositoryListener
      Overrides:
      artifactDownloading in class org.eclipse.aether.AbstractRepositoryListener
    • artifactInstalled

      public void artifactInstalled(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      artifactInstalled in interface org.eclipse.aether.RepositoryListener
      Overrides:
      artifactInstalled in class org.eclipse.aether.AbstractRepositoryListener
    • artifactInstalling

      public void artifactInstalling(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      artifactInstalling in interface org.eclipse.aether.RepositoryListener
      Overrides:
      artifactInstalling in class org.eclipse.aether.AbstractRepositoryListener
    • artifactResolved

      public void artifactResolved(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      artifactResolved in interface org.eclipse.aether.RepositoryListener
      Overrides:
      artifactResolved in class org.eclipse.aether.AbstractRepositoryListener
    • artifactResolving

      public void artifactResolving(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      artifactResolving in interface org.eclipse.aether.RepositoryListener
      Overrides:
      artifactResolving in class org.eclipse.aether.AbstractRepositoryListener
    • metadataDeployed

      public void metadataDeployed(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      metadataDeployed in interface org.eclipse.aether.RepositoryListener
      Overrides:
      metadataDeployed in class org.eclipse.aether.AbstractRepositoryListener
    • metadataDeploying

      public void metadataDeploying(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      metadataDeploying in interface org.eclipse.aether.RepositoryListener
      Overrides:
      metadataDeploying in class org.eclipse.aether.AbstractRepositoryListener
    • metadataDownloaded

      public void metadataDownloaded(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      metadataDownloaded in interface org.eclipse.aether.RepositoryListener
      Overrides:
      metadataDownloaded in class org.eclipse.aether.AbstractRepositoryListener
    • metadataDownloading

      public void metadataDownloading(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      metadataDownloading in interface org.eclipse.aether.RepositoryListener
      Overrides:
      metadataDownloading in class org.eclipse.aether.AbstractRepositoryListener
    • metadataInstalled

      public void metadataInstalled(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      metadataInstalled in interface org.eclipse.aether.RepositoryListener
      Overrides:
      metadataInstalled in class org.eclipse.aether.AbstractRepositoryListener
    • metadataInstalling

      public void metadataInstalling(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      metadataInstalling in interface org.eclipse.aether.RepositoryListener
      Overrides:
      metadataInstalling in class org.eclipse.aether.AbstractRepositoryListener
    • metadataInvalid

      public void metadataInvalid(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      metadataInvalid in interface org.eclipse.aether.RepositoryListener
      Overrides:
      metadataInvalid in class org.eclipse.aether.AbstractRepositoryListener
    • metadataResolved

      public void metadataResolved(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      metadataResolved in interface org.eclipse.aether.RepositoryListener
      Overrides:
      metadataResolved in class org.eclipse.aether.AbstractRepositoryListener
    • metadataResolving

      public void metadataResolving(org.eclipse.aether.RepositoryEvent event)
      Specified by:
      metadataResolving in interface org.eclipse.aether.RepositoryListener
      Overrides:
      metadataResolving in class org.eclipse.aether.AbstractRepositoryListener