Show / Hide Table of Contents

Class SingleAddressProvider

SingleAddressProvider is is an implementation of the IAddressProvider interface that wraps a single address dynamically added to this provider.

Inheritance
object
SingleAddressProvider
Implements
IAddressProvider
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Tangosol.Net
Assembly: Coherence.dll
Syntax
public class SingleAddressProvider : IAddressProvider

Constructors

SingleAddressProvider(IPEndPoint)

Set the SocketAddress for this IAddressProvider.

Declaration
public SingleAddressProvider(IPEndPoint address)
Parameters
Type Name Description
IPEndPoint address

the address which will be returned by this IAddressProvider

Properties

NextAddress

Next available address to use.

Declaration
public virtual 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
public virtual 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
public virtual 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.

ToString()

Return a string representation of this ConfigurableAddressProvider.

Declaration
public override string ToString()
Returns
Type Description
string

A string representation of the list of configured addresses.

Overrides
object.ToString()

Implements

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