Show / Hide Table of Contents

Interface IAddressProvider

The IAddressProvider is an interface that serves as a means to provide addresses to a consumer.

Namespace: Tangosol.Net
Assembly: Coherence.dll
Syntax
public interface IAddressProvider
Remarks

Simple implementations could be backed by a static list; more complex ones could use dynamic discovery protocols.

Properties

NextAddress

Next available address to use.

Declaration
IPEndPoint NextAddress { get; }
Property Value
Type Description
IPEndPoint

The next available address or null if the list of available addresses was exhausted.

Remarks

If the caller can successfully use the returned address (e.g. a connection was established), it should call the IAddressProvider's Accept() method.

Methods

Accept()

This method should be called by the client immediately after it determines that it can successfully use an address returned by the NextAddress.

Declaration
void Accept()

Reject(Exception)

This method should be called by the client immediately after it determines that an attempt to use an address returned by the NextAddress has failed.

Declaration
void Reject(Exception eCause)
Parameters
Type Name Description
Exception eCause

(Optional) an exception that carries the reason why the caller rejected the previously returned address.

In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.