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 of
AddressProvider
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final NullImplementation.NullAddressProvider
Singleton instance. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Covariant ofSocketAddressProvider.getNextAddress()
which returns anInetSocketAddress
.void
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 Details
-
INSTANCE
Singleton instance.
-
-
Constructor Details
-
NullAddressProvider
public NullAddressProvider()
-
-
Method Details
-
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
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
-