Package com.tangosol.util
Class NullImplementation.NullAddressProvider
- java.lang.Object
-
- com.tangosol.util.NullImplementation.NullAddressProvider
-
- All Implemented Interfaces:
AddressProvider
,SocketAddressProvider
- Enclosing class:
- NullImplementation
public static class NullImplementation.NullAddressProvider extends Object implements AddressProvider
Null implementation ofAddressProvider
.
-
-
Field Summary
Fields Modifier and Type Field Description static NullImplementation.NullAddressProvider
INSTANCE
Singleton instance.
-
Constructor Summary
Constructors Constructor Description NullAddressProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept()
This method should be called by the client immediately after it determines that it can successfully use an address returned by theSocketAddressProvider.getNextAddress()
method.InetSocketAddress
getNextAddress()
Covariant ofSocketAddressProvider.getNextAddress()
which returns anInetSocketAddress
.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 theSocketAddressProvider.getNextAddress()
method has failed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.tangosol.net.SocketAddressProvider
equals, hashCode
-
-
-
-
Field Detail
-
INSTANCE
public static final NullImplementation.NullAddressProvider INSTANCE
Singleton instance.
-
-
Method Detail
-
getNextAddress
public InetSocketAddress getNextAddress()
Covariant ofSocketAddressProvider.getNextAddress()
which returns anInetSocketAddress
.- Specified by:
getNextAddress
in interfaceAddressProvider
- Specified by:
getNextAddress
in interfaceSocketAddressProvider
- Returns:
- the next available address or null if the list of available addresses was exhausted
-
accept
public void accept()
This method should be called by the client immediately after it determines that it can successfully use an address returned by theSocketAddressProvider.getNextAddress()
method.- Specified by:
accept
in interfaceSocketAddressProvider
-
reject
public 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 theSocketAddressProvider.getNextAddress()
method has failed.- Specified by:
reject
in interfaceSocketAddressProvider
- Parameters:
eCause
- (optional) an exception that carries the reason why the the caller rejected the previously returned address
-
-