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
FieldsModifier and TypeFieldDescriptionstatic final NullImplementation.NullAddressProviderSingleton instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept()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.voidThis 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, waitMethods 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:
getNextAddressin interfaceAddressProvider- Specified by:
getNextAddressin 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:
acceptin 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:
rejectin interfaceSocketAddressProvider- Parameters:
eCause- (optional) an exception that carries the reason why the the caller rejected the previously returned address
-