Package org.postgresql.util

# Class HostSpec

java.lang.Object
org.postgresql.util.HostSpec

public class HostSpec extends Object
Simple container for host and port.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DEFAULT_NON_PROXY_HOSTS`
  `protected final String`
  `host`
  `protected final @Nullable String`
  `localSocketAddress`
  `protected final int`
  `port`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HostSpec(String host, int port)`
  `HostSpec(String host, int port, @Nullable String localSocketAddress)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(@Nullable Object obj)`
  `String`
  `getHost()`
  `@Nullable String`
  `getLocalSocketAddress()`
  `int`
  `getPort()`
  `int`
  `hashCode()`
  `Boolean`
  `shouldResolve()`
  `String`
  `toString()`

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

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

- ## Field Details

  - ### DEFAULT_NON_PROXY_HOSTS

    public static final String DEFAULT_NON_PROXY_HOSTS
    See Also:
      - Constant Field Values

  - ### localSocketAddress

    protected final @Nullable String localSocketAddress

  - ### host

    protected final String host

  - ### port

    protected final int port

- ## Constructor Details

  - ### HostSpec

    public HostSpec(String host, int port)

  - ### HostSpec

    public HostSpec(String host, int port, @Nullable String localSocketAddress)

- ## Method Details

  - ### getHost

    public String getHost()

  - ### getPort

    public int getPort()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### equals

    public boolean equals(@Nullable Object obj)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### getLocalSocketAddress

    public @Nullable String getLocalSocketAddress()

  - ### shouldResolve

    public Boolean shouldResolve()