com.hazelcast.instance

## Class DelegatingAddressPicker

- java.lang.Object
- - com.hazelcast.instance.DelegatingAddressPicker

- All Implemented Interfaces:
    AddressPicker

      public class DelegatingAddressPicker
      extends Object
      implements AddressPicker

  Delegates picking the bind and public address for this instance to an implementation of `MemberAddressProvider`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DelegatingAddressPicker(MemberAddressProvider memberAddressProvider, NetworkConfig networkConfig, ILogger logger)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Address` | `getBindAddress()` Returns a server socket listener address.
    `Address` | `getPublicAddress()` Returns a public address to be advertised to other cluster members and clients.
    `ServerSocketChannel` | `getServerSocketChannel()` Returns a server channel.
    `void` | `pickAddress()` Picks both server socket listener address and public address.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DelegatingAddressPicker

          public DelegatingAddressPicker(MemberAddressProvider memberAddressProvider,
                                         NetworkConfig networkConfig,
                                         ILogger logger)

  - ### Method Detail

    - #### pickAddress

          public void pickAddress()
                           throws Exception

      Description copied from interface: `AddressPicker`
      Picks both server socket listener address and public address.
      Specified by:
        `pickAddress` in interface `AddressPicker`
      Throws:
        `Exception`

    - #### getBindAddress

          public Address getBindAddress()

      Description copied from interface: `AddressPicker`
      Returns a server socket listener address.
      Specified by:
        `getBindAddress` in interface `AddressPicker`
      Returns:
        `Address` where the server socket was bound to or `null` if called before. `AddressPicker.pickAddress()`

    - #### getPublicAddress

          public Address getPublicAddress()

      Description copied from interface: `AddressPicker`
      Returns a public address to be advertised to other cluster members and clients.
      Specified by:
        `getPublicAddress` in interface `AddressPicker`
      Returns:
        `Address` another members can use to connect to this member or `null` if called before `AddressPicker.pickAddress()`

    - #### getServerSocketChannel

          public ServerSocketChannel getServerSocketChannel()

      Description copied from interface: `AddressPicker`
      Returns a server channel.
      Specified by:
        `getServerSocketChannel` in interface `AddressPicker`
      Returns:
        `ServerSocketChannel` to be listened to by an acceptor or `null` if called before `AddressPicker.pickAddress()`

Copyright © 2018. All rights reserved.