Package org.apache.solr.client.solrj.impl

## Class LBSolrClient.Endpoint

- java.lang.Object
- - org.apache.solr.client.solrj.impl.LBSolrClient.Endpoint

Enclosing class:
  LBSolrClient

    public static class LBSolrClient.Endpoint
    extends Object

A Solr endpoint for `LBSolrClient` to include in its load-balancing

Used in many places instead of the more common String URL to allow `LBSolrClient` to more easily determine whether a URL is a "base" or "core-aware" URL.

### Constructor Summary

Constructors
`Endpoint​(String baseUrl)` Creates an `LBSolrClient.Endpoint` representing a "base" URL of a Solr node
`Endpoint​(String baseUrl, String core)` Create an `LBSolrClient.Endpoint` representing a Solr core or collection

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals​(Object obj)`
`String` `getBaseUrl()` Return the base URL of the Solr node this endpoint represents
`String` `getCore()` The core or collection this endpoint represents
`String` `getUrl()` Get the full URL, possibly including the collection/core if one was provided
`int` `hashCode()`
`String` `toString()`

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

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

### Constructor Detail

#### Endpoint

    public Endpoint​(String baseUrl)

Creates an `LBSolrClient.Endpoint` representing a "base" URL of a Solr node

Parameters:
  `baseUrl` - a base Solr URL, in the form "http[s]://host:port/solr"

#### Endpoint

    public Endpoint​(String baseUrl,
                    String core)

Create an `LBSolrClient.Endpoint` representing a Solr core or collection

Parameters:
  `baseUrl` - a base Solr URL, in the form "http[s]://host:port/solr"
  `core` - the name of a Solr core or collection

### Method Detail

#### getBaseUrl

    public String getBaseUrl()

Return the base URL of the Solr node this endpoint represents

Returns:
  a base Solr URL, in the form "http[s]://host:port/solr"

#### getCore

    public String getCore()

The core or collection this endpoint represents

Returns:
  a core/collection name, or null if this endpoint doesn't represent a particular core.

#### getUrl

    public String getUrl()

Get the full URL, possibly including the collection/core if one was provided

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals​(Object obj)

Overrides:
  `equals` in class `Object`