| |
Public Types |
|
typedef spec::Handle | Handle |
| | ConfigurableAddressProvider Handle definition. |
|
typedef spec::View | View |
| | ConfigurableAddressProvider View definition. |
|
typedef spec::Holder | Holder |
| | ConfigurableAddressProvider Holder definition. |
Public Member Functions |
virtual
InetSocketAddress::View | getNextAddress () |
| | 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
|
|
virtual void | accept () |
| | 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) |
| | 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 |
|
virtual TypedHandle
< const String > | toString () const |
| | |
Static Public Attributes |
|
static const size32_t | npos |
| | The largest possible value of type size32_t. |
Protected Member Functions |
|
| ConfigurableAddressProvider () |
| | Create a new ConfigurableAddressProvider instance. |
| | ConfigurableAddressProvider (XmlElement::View vXml, bool fSafe=true) |
| | Construct an instance of ConfigurableAddressProvider based on the specified XML element. |
| virtual void | configure (XmlElement::View vXml) |
| | Configure this ConfigurableAddressProvider based on the specified XML. |
|
virtual void | reset () |
| | Make all addresses iterable, starting at the first address. |
| virtual void | reset (size32_t iLast) |
| | Make all addresses iterable, starting at the index after the specified one. |
| virtual Iterator::Handle | resolveAddress (String::View vsHost, int nPort) const |
| | Resolve an address and port. |
| virtual List::Handle | sortHolders (List::Handle hList) |
| | Sort the holders in the order to be returned by the getNextAddress method. |
Protected Attributes |
|
FinalView< List > | f_vListHolders |
| | A list of AddressHolder objects. |
| MemberHandle< Iterator > | m_hIterAddr |
| | An address iterator for the previously resolved address. |
|
size32_t | m_iLast |
| | Index of the last returned address. |
|
bool | m_fSafe |
| | Specifies if the provider is only to return resolved addresses. |
Classes |
| class | AddressHolder |
| | A stateful holder for an InetSocketAddress object. More... |