ClientMembership (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.management.membership, class: ClientMembership

Package org.apache.geode.management.membership

# Class ClientMembership

java.lang.Object
org.apache.geode.management.membership.ClientMembership

public final class ClientMembership extends Object
Provides utility methods for registering and unregistering ClientMembershipListeners in this process.

Since:
  GemFire 8.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ClientMembershipListener[]`
  `getClientMembershipListeners()`
  Returns an array of all the currently registered `ClientMembershipListener`s.
  `static void`
  `registerClientMembershipListener(ClientMembershipListener listener)`
  Registers a `ClientMembershipListener` for notification of connection changes for CacheServer and clients.
  `static void`
  `unregisterClientMembershipListener(ClientMembershipListener listener)`
  Removes registration of a previously registered `ClientMembershipListener`.

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

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

- ## Method Details

  - ### registerClientMembershipListener

    public static void registerClientMembershipListener(ClientMembershipListener listener)
    Registers a `ClientMembershipListener` for notification of connection changes for CacheServer and clients.
    Parameters:
      `listener` - a ClientMembershipListener to be registered

  - ### unregisterClientMembershipListener

    public static void unregisterClientMembershipListener(ClientMembershipListener listener)
    Removes registration of a previously registered `ClientMembershipListener`.
    Parameters:
      `listener` - a ClientMembershipListener to be unregistered

  - ### getClientMembershipListeners

    public static ClientMembershipListener[] getClientMembershipListeners()
    Returns an array of all the currently registered `ClientMembershipListener`s. Modifications to the returned array will not affect the registration of these listeners.
    Returns:
      the registered `ClientMembershipListener`s; an empty array if no listeners