DomainFilterInterceptor (Apache Tomcat 7.0.104 API Documentation)

org.apache.catalina.tribes.group.interceptors

## Class DomainFilterInterceptor

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

- All Implemented Interfaces:
    ChannelInterceptor, Heartbeat, MembershipListener

      public class DomainFilterInterceptor
      extends ChannelInterceptorBase

  Title: Member domain filter interceptor

  Description: Filters membership based on domain.

  Version:
    1.0
  Author:
    Filip Hanik

- - ### Nested Class Summary

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

      `ChannelInterceptor.InterceptorEvent`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected byte[]` | `domain`
    `protected int` | `logInterval`
    `protected Membership` | `membership`

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

      `optionFlag`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DomainFilterInterceptor()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getDomain()`
    `Member` | `getLocalMember(boolean incAlive)` Return the member that represents this node.
    `int` | `getLogInterval()`
    `Member` | `getMember(Member mbr)` Intercepts the `Channel.getMember(Member)` method
    `Member[]` | `getMembers()` Get all current cluster members
    `boolean` | `hasMembers()` has members
    `void` | `memberAdded(Member member)` A member was added to the group
    `void` | `memberDisappeared(Member member)` A member was removed from the group If the member left voluntarily, the Member.getCommand will contain the Member.SHUTDOWN_PAYLOAD data
    `void` | `messageReceived(ChannelMessage msg)` the `messageReceived` is invoked when a message is received.
    `void` | `setDomain(byte[] domain)`
    `void` | `setDomain(String domain)`
    `void` | `setLogInterval(int logInterval)`
    `protected void` | `setupMembership()`

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

      `accept, fireInterceptorEvent, getChannel, getNext, getOptionFlag, getPrevious, heartbeat, okToProcess, sendMessage, setChannel, setNext, setOptionFlag, setPrevious, start, stop`

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

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

- - ### Field Detail

    - #### membership

          protected Membership membership

    - #### domain

          protected byte[] domain

    - #### logInterval

          protected int logInterval

  - ### Constructor Detail

    - #### DomainFilterInterceptor

          public DomainFilterInterceptor()

  - ### Method Detail

    - #### messageReceived

          public void messageReceived(ChannelMessage msg)

      Description copied from interface: `ChannelInterceptor`
      the `messageReceived` is invoked when a message is received. `ChannelMessage.getAddress()` is the sender, or the reply-to address if it has been overwritten.
      Specified by:
        `messageReceived` in interface `ChannelInterceptor`
      Overrides:
        `messageReceived` in class `ChannelInterceptorBase`
      Parameters:
        `msg` - ChannelMessage

    - #### memberAdded

          public void memberAdded(Member member)

      Description copied from interface: `MembershipListener`
      A member was added to the group
      Specified by:
        `memberAdded` in interface `MembershipListener`
      Overrides:
        `memberAdded` in class `ChannelInterceptorBase`
      Parameters:
        `member` - Member - the member that was added

    - #### memberDisappeared

          public void memberDisappeared(Member member)

      Description copied from interface: `MembershipListener`
      A member was removed from the group
      If the member left voluntarily, the Member.getCommand will contain the Member.SHUTDOWN_PAYLOAD data
      Specified by:
        `memberDisappeared` in interface `MembershipListener`
      Overrides:
        `memberDisappeared` in class `ChannelInterceptorBase`
      Parameters:
        `member` - Member
      See Also:
        `Member.SHUTDOWN_PAYLOAD`

    - #### hasMembers

          public boolean hasMembers()

      Description copied from class: `ChannelInterceptorBase`
      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()

      Description copied from class: `ChannelInterceptorBase`
      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 `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)

      Description copied from class: `ChannelInterceptorBase`
      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)`

    - #### setupMembership

          protected void setupMembership()

    - #### getDomain

          public byte[] getDomain()

    - #### setDomain

          public void setDomain(byte[] domain)

    - #### setDomain

          public void setDomain(String domain)

    - #### getLogInterval

          public int getLogInterval()

    - #### setLogInterval

          public void setLogInterval(int logInterval)

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.