MembershipProviderBase (Apache Tomcat 9.0.118 API Documentation)
Description: declaration: package: org.apache.catalina.tribes.membership, class: MembershipProviderBase

# Class MembershipProviderBase

java.lang.Object
org.apache.catalina.tribes.membership.MembershipProviderBase

All Implemented Interfaces:
  `MembershipProvider`

Direct Known Subclasses:
  `CloudMembershipProvider, McastServiceImpl, StaticMembershipProvider`

public abstract class MembershipProviderBase extends Object implements MembershipProvider

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected ScheduledExecutorService`
  `executor`
  `protected Membership`
  `membership`
  `protected MembershipListener`
  `membershipListener`
  `protected MembershipService`
  `service`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MembershipProviderBase()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Member`
  `getMember(Member mbr)`
  Get the specified member from the associated membership.
  `Member[]`
  `getMembers()`
  Get the members from the associated membership.
  `boolean`
  `hasMembers()`
  `void`
  `init(Properties properties)`
  Initialize the membership provider with the specified configuration.
  `void`
  `setMembershipListener(MembershipListener listener)`
  Set the associated membership listener.
  `void`
  `setMembershipService(MembershipService service)`
  Set the associated membership service.

  ### Methods inherited from class Object

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

  ### Methods inherited from interface MembershipProvider

  `start, stop`

- ## Field Details

  - ### membership

    protected Membership membership

  - ### membershipListener

    protected MembershipListener membershipListener

  - ### service

    protected MembershipService service

  - ### executor

    protected ScheduledExecutorService executor

- ## Constructor Details

  - ### MembershipProviderBase

    public MembershipProviderBase()

- ## Method Details

  - ### init

    public void init(Properties properties) throws Exception
    Description copied from interface: `MembershipProvider`
    Initialize the membership provider with the specified configuration.
    Specified by:
      `init` in interface `MembershipProvider`
    Parameters:
      `properties` - configuration
    Throws:
      `Exception` - if an error occurs

  - ### hasMembers

    public boolean hasMembers()
    Specified by:
      `hasMembers` in interface `MembershipProvider`
    Returns:
      `true` if there are members

  - ### getMember

    public Member getMember(Member mbr)
    Description copied from interface: `MembershipProvider`
    Get the specified member from the associated membership.
    Specified by:
      `getMember` in interface `MembershipProvider`
    Parameters:
      `mbr` - the member
    Returns:
      the member

  - ### getMembers

    public Member[] getMembers()
    Description copied from interface: `MembershipProvider`
    Get the members from the associated membership.
    Specified by:
      `getMembers` in interface `MembershipProvider`
    Returns:
      the members

  - ### setMembershipListener

    public void setMembershipListener(MembershipListener listener)
    Description copied from interface: `MembershipProvider`
    Set the associated membership listener.
    Specified by:
      `setMembershipListener` in interface `MembershipProvider`
    Parameters:
      `listener` - the listener

  - ### setMembershipService

    public void setMembershipService(MembershipService service)
    Description copied from interface: `MembershipProvider`
    Set the associated membership service.
    Specified by:
      `setMembershipService` in interface `MembershipProvider`
    Parameters:
      `service` - the service