You do not necessarily need to put anything inside the accept() method; in our AddressProvider implementation this method is empty. You do not call anything on the AddressProvider, you just put it into the correct places in the configuration file(s) and Coherence will call it. I know the Java Docs say that methods are called by the "client" but that really means called by Coherence.

The only method you really must implement is the getNextAddress() method so that it returns an InetSocketAddress whenever Coherence asks for one. In theory you could just keep returning the same address over and over again and everything would work (providing the address is valid).

As the Java Docs say, the accept() method is called after Coherence has successfully used the address you gave it to connect. The reject() method is called if Coherence tried to use the address that it was given for something but the operation failed.

It depends what your AddressProvider is doing. If all it does in getNextAddress is keep returning the same address, and if that address is not reachable then Coherence will get stuck in a loop calling your provider, trying to connect to the socket, failing to connect, then calling your provider again and so on.

If you are going to use an AddressProvider for WKA then you need to implement the reject method so that you know not to return failed addresses next time the provider is asked for one. If you have used up all the addresses, i.e. they all failed, then you return null from getNextAddress.