public class HostPool extends Object
For hosts to be in the same host pool it must be possible to make an invocation against any host interchangeably. In general the connection pool will only use a single host at a time, however if the connection fails it will attempt to use other hosts in the pool.
In a lot of cases this will only contain a single host, however if there are multiple load balancer hosts that service the same underlying application then this class allows for invocations to be directed to either if one falls over.
This class is also DNS load balancing aware. If there are multiple IP's for a given URL the different URL's will be added to the rotation.
This host pool will attempt to simply use a single address, if it is notified of failure on that address it will instead select a different URI. If there are multiple addresses per URI then the next time the URI is selected it will attempt to use a new address.
Modifier and Type | Class and Description |
---|---|
class |
HostPool.AddressResult |
Modifier and Type | Method and Description |
---|---|
HostPool.AddressResult |
getAddress() |
URI |
getUri() |
public HostPool(URI uri)
public HostPool.AddressResult getAddress()
public URI getUri()
Copyright © 2017 JBoss by Red Hat. All rights reserved.