Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.32
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`protected byte[]` | `domain`
`protected Membership` | `membership`

Fields inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBase
`optionFlag`

Constructor Summary
`DomainFilterInterceptor()`

Method Summary
`byte[]` | `getDomain()`
`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` | `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(java.lang.String domain)`
`protected void` | `setupMembership()`

Methods inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBase
`accept, fireInterceptorEvent, getNext, getOptionFlag, getPrevious, heartbeat, okToProcess, sendMessage, 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

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 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)

  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(java.lang.String domain)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.32
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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