org.apache.catalina.tribes.group.interceptors

## Class StaticMembershipInterceptor

- java.lang.Object
- - org.apache.catalina.tribes.group.ChannelInterceptorBase
  - - org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor

All Implemented Interfaces:
  ChannelInterceptor, Heartbeat, MembershipListener

    public class StaticMembershipInterceptor
    extends ChannelInterceptorBase

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.catalina.tribes.ChannelInterceptor

`ChannelInterceptor.InterceptorEvent`

### Field Summary

Fields
`protected Member` `localMember`
`protected ArrayList<Member>` `members`

### Fields inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBase

`optionFlag`

### Constructor Summary

Constructors
Constructor and Description
`StaticMembershipInterceptor()`

### Method Summary

Methods
`void` `addStaticMember(Member member)`
`Member` `getLocalMember(boolean incAlive)` Return the member that represents this node.
`Member` `getMember(Member mbr)` Intercepts the code>Channel.getMember(Member) method
`Member[]` `getMembers()` Get all current cluster members
`boolean` `hasMembers()` has members
`void` `removeStaticMember(Member member)`
`void` `setLocalMember(Member member)`
`void` `start(int svc)` Send notifications upwards

### Methods inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBase

`accept, fireInterceptorEvent, getNext, getOptionFlag, getPrevious, heartbeat, memberAdded, memberDisappeared, messageReceived, okToProcess, sendMessage, setNext, setOptionFlag, setPrevious, stop`

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

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

### Field Detail

#### members

    protected ArrayList<Member> members

#### localMember

    protected Member localMember

### Constructor Detail

#### StaticMembershipInterceptor

    public StaticMembershipInterceptor()

### Method Detail

#### addStaticMember

    public void addStaticMember(Member member)

#### removeStaticMember

    public void removeStaticMember(Member member)

#### setLocalMember

    public void setLocalMember(Member member)

#### hasMembers

    public boolean hasMembers()

has members

Specified by:
  `hasMembers` in interface `ChannelInterceptor`
Overrides:
  `hasMembers` in class `ChannelInterceptorBase`
Returns:
  boolean - if the channel has members in its membership group
See Also:
  `Channel.hasMembers()`

#### getMembers

    public Member[] getMembers()

Get all current cluster members

Specified by:
  `getMembers` in interface `ChannelInterceptor`
Overrides:
  `getMembers` in class `ChannelInterceptorBase`
Returns:
  all members or empty array
See Also:
  `Channel.getMembers()`

#### getMember

    public Member getMember(Member mbr)

Description copied from interface: `ChannelInterceptor`
Intercepts the code>Channel.getMember(Member) method

Specified by:
  `getMember` in interface `ChannelInterceptor`
Overrides:
  `getMember` in class `ChannelInterceptorBase`
Parameters:
  `mbr` - Member
Returns:
  Member
See Also:
  `Channel.getMember(Member)`

#### getLocalMember

    public Member getLocalMember(boolean incAlive)

Return the member that represents this node.

Specified by:
  `getLocalMember` in interface `ChannelInterceptor`
Overrides:
  `getLocalMember` in class `ChannelInterceptorBase`
Parameters:
  `incAlive` - boolean
Returns:
  Member
See Also:
  `Channel.getLocalMember(boolean)`

#### start

    public void start(int svc)
               throws ChannelException

Send notifications upwards

Specified by:
  `start` in interface `ChannelInterceptor`
Overrides:
  `start` in class `ChannelInterceptorBase`
Parameters:
  `svc` - int
Throws:
  `ChannelException`
See Also:
  `Channel`