public static class NullImplementation.NullAddressProvider extends Object implements AddressProvider
AddressProvider
.Modifier and Type | Field and Description |
---|---|
static NullImplementation.NullAddressProvider |
INSTANCE
Singleton instance.
|
Constructor and Description |
---|
NullAddressProvider() |
Modifier and Type | Method and Description |
---|---|
void |
accept()
This method should be called by the client immediately after it determines that it can successfully use an address returned by the
SocketAddressProvider.getNextAddress() method. |
InetSocketAddress |
getNextAddress()
Covariant of
SocketAddressProvider.getNextAddress() which returns an InetSocketAddress . |
void |
reject(Throwable eCause)
This method should be called by the client immediately after it determines that an attempt to use an address returned by the
SocketAddressProvider.getNextAddress() method has failed. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode
public static final NullImplementation.NullAddressProvider INSTANCE
public InetSocketAddress getNextAddress()
SocketAddressProvider.getNextAddress()
which returns an InetSocketAddress
.getNextAddress
in interface AddressProvider
getNextAddress
in interface SocketAddressProvider
public void accept()
SocketAddressProvider.getNextAddress()
method.accept
in interface SocketAddressProvider
public void reject(Throwable eCause)
SocketAddressProvider.getNextAddress()
method has failed.reject
in interface SocketAddressProvider
eCause
- (optional) an exception that carries the reason why the the caller rejected the previously returned address