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.NullAddressProviderINSTANCESingleton instance.
-
Constructor Summary
Constructors Constructor Description NullAddressProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept()This method should be called by the client immediately after it determines that it can successfully use an address returned by theSocketAddressProvider.getNextAddress()method.InetSocketAddressgetNextAddress()Covariant ofSocketAddressProvider.getNextAddress()which returns anInetSocketAddress.voidreject(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:
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
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:
rejectin interfaceSocketAddressProvider- Parameters:
eCause- (optional) an exception that carries the reason why the the caller rejected the previously returned address
-
-