Class RemoteRepository

java.lang.Object
org.eclipse.aether.repository.RemoteRepository
All Implemented Interfaces:
ArtifactRepository

public final class RemoteRepository extends Object implements ArtifactRepository
A repository on a remote server.
  • Field Details

    • URL_PATTERN

      private static final Pattern URL_PATTERN
    • id

      private final String id
    • type

      private final String type
    • url

      private final String url
    • host

      private final String host
    • protocol

      private final String protocol
    • releasePolicy

      private final RepositoryPolicy releasePolicy
    • snapshotPolicy

      private final RepositoryPolicy snapshotPolicy
    • proxy

      private final Proxy proxy
    • authentication

      private final Authentication authentication
    • mirroredRepositories

      private final List<RemoteRepository> mirroredRepositories
    • repositoryManager

      private final boolean repositoryManager
    • blocked

      private final boolean blocked
  • Constructor Details

  • Method Details

    • copy

      private static List<RemoteRepository> copy(List<RemoteRepository> repos)
    • getId

      public String getId()
      Description copied from interface: ArtifactRepository
      Gets the identifier of this repository.
      Specified by:
      getId in interface ArtifactRepository
      Returns:
      The (case-sensitive) identifier, never null.
    • getContentType

      public String getContentType()
      Description copied from interface: ArtifactRepository
      Gets the type of the repository, for example "default".
      Specified by:
      getContentType in interface ArtifactRepository
      Returns:
      The (case-sensitive) type of the repository, never null.
    • getUrl

      public String getUrl()
      Gets the (base) URL of this repository.
      Returns:
      The (base) URL of this repository, never null.
    • getProtocol

      public String getProtocol()
      Gets the protocol part from the repository's URL, for example file or http. As suggested by RFC 2396, section 3.1 "Scheme Component", the protocol name should be treated case-insensitively.
      Returns:
      The protocol or an empty string if none, never null.
    • getHost

      public String getHost()
      Gets the host part from the repository's URL.
      Returns:
      The host or an empty string if none, never null.
    • getPolicy

      public RepositoryPolicy getPolicy(boolean snapshot)
      Gets the policy to apply for snapshot/release artifacts.
      Parameters:
      snapshot - true to retrieve the snapshot policy, false to retrieve the release policy.
      Returns:
      The requested repository policy, never null.
    • getProxy

      public Proxy getProxy()
      Gets the proxy that has been selected for this repository.
      Returns:
      The selected proxy or null if none.
    • getAuthentication

      public Authentication getAuthentication()
      Gets the authentication that has been selected for this repository.
      Returns:
      The selected authentication or null if none.
    • getMirroredRepositories

      public List<RemoteRepository> getMirroredRepositories()
      Gets the repositories that this repository serves as a mirror for.
      Returns:
      The (read-only) repositories being mirrored by this repository, never null.
    • isRepositoryManager

      public boolean isRepositoryManager()
      Indicates whether this repository refers to a repository manager or not.
      Returns:
      true if this repository is a repository manager, false otherwise.
    • isBlocked

      public boolean isBlocked()
      Indicates whether this repository is blocked from performing any download requests.
      Returns:
      true if this repository is blocked from performing any download requests, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • hash

      private static int hash(Object obj)