Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47891-01

AddressProvider Class Reference

#include <coherence/net/AddressProvider.hpp>

Inherits Object.

Inherited by ConfigurableAddressProvider [virtual], and SingleAddressProvider [virtual].

List of all members.


Detailed Description

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

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

Author:
gg,jh 2008-08-14

gm 2008-08-25

Since:
Coherence 3.4

Public Types

typedef spec::Handle Handle
 AddressProvider Handle definition.
typedef spec::View View
 AddressProvider View definition.
typedef spec::Holder Holder
 AddressProvider Holder definition.

Public Member Functions

virtual
InetSocketAddress::View 
getNextAddress ()=0
 Obtain a next available address to use.
virtual void accept ()=0
 This method should be called by the client immediately after it determines that it can successfully use an address returned by the getNextAddress method.
virtual void reject (Exception::Holder oheCause)=0
 This method should be called by the client immediately after it determines that an attempt to use an address returned by the getNextAddress method has failed.

Member Function Documentation

virtual InetSocketAddress::View getNextAddress (  )  [pure virtual]

Obtain a next available address to use.

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

Returns:
the next available address or NULL if the list of available addresses was exhausted

Implemented in ConfigurableAddressProvider, and SingleAddressProvider.

virtual void reject ( Exception::Holder  oheCause  )  [pure virtual]

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

Parameters:
oheCause (optional) an exception that carries the reason why the the caller rejected the previously returned address

Implemented in ConfigurableAddressProvider, and SingleAddressProvider.


The documentation for this class was generated from the following file:
Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.