public class DomainFilterInterceptor extends ChannelInterceptorBase
Title: Member domain filter interceptor
Description: Filters membership based on domain.
ChannelInterceptor.InterceptorEvent
Modifier and Type | Field and Description |
---|---|
protected byte[] |
domain |
protected Membership |
membership |
optionFlag
Constructor and Description |
---|
DomainFilterInterceptor() |
Modifier and Type | Method and Description |
---|---|
byte[] |
getDomain() |
Member |
getLocalMember(boolean incAlive)
Return the member that represents this node.
|
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) |
protected void |
setupMembership() |
fireInterceptorEvent, getNext, getOptionFlag, getPrevious, heartbeat, okToProcess, sendMessage, setNext, setOptionFlag, setPrevious, start, stop
protected Membership membership
protected byte[] domain
public void messageReceived(ChannelMessage msg)
ChannelInterceptor
messageReceived
is invoked when a message is received.
ChannelMessage.getAddress()
is the sender, or the reply-to address
if it has been overwritten.messageReceived
in interface ChannelInterceptor
messageReceived
in class ChannelInterceptorBase
msg
- ChannelMessagepublic void memberAdded(Member member)
MembershipListener
memberAdded
in interface MembershipListener
memberAdded
in class ChannelInterceptorBase
member
- Member - the member that was addedpublic void memberDisappeared(Member member)
MembershipListener
memberDisappeared
in interface MembershipListener
memberDisappeared
in class ChannelInterceptorBase
member
- MemberMember.SHUTDOWN_PAYLOAD
public boolean hasMembers()
ChannelInterceptorBase
hasMembers
in interface ChannelInterceptor
hasMembers
in class ChannelInterceptorBase
Channel.hasMembers()
public Member[] getMembers()
ChannelInterceptorBase
getMembers
in interface ChannelInterceptor
getMembers
in class ChannelInterceptorBase
Channel.getMembers()
public Member getMember(Member mbr)
ChannelInterceptor
Channel.getMember(Member)
methodgetMember
in interface ChannelInterceptor
getMember
in class ChannelInterceptorBase
mbr
- MemberChannel.getMember(Member)
public Member getLocalMember(boolean incAlive)
ChannelInterceptorBase
getLocalMember
in interface ChannelInterceptor
getLocalMember
in class ChannelInterceptorBase
incAlive
- booleanChannel.getLocalMember(boolean)
protected void setupMembership()
public byte[] getDomain()
public void setDomain(byte[] domain)
public void setDomain(String domain)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.