Class StaticMembershipInterceptor
java.lang.Object
org.apache.catalina.tribes.group.ChannelInterceptorBase
org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor
- All Implemented Interfaces:
- ChannelInterceptor,- StaticMembershipInterceptorMBean,- Heartbeat,- MembershipListener
public class StaticMembershipInterceptor
extends ChannelInterceptorBase
implements StaticMembershipInterceptorMBean
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.catalina.tribes.ChannelInterceptorChannelInterceptor.InterceptorEvent
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Memberprotected static final byte[]protected static final byte[]protected static final StringManagerFields inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBaseoptionFlag
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddStaticMember(Member member) protected ChannelInterceptorgetLocalMember(boolean incAlive) Intercepts theChannel.getLocalMember(boolean)methodIntercepts theChannel.getMember(Member)methodMember[]Intercepts theChannel.getMembers()methodbooleanIntercepts theChannel.hasMembers()methodvoidThemessageReceivedis invoked when a message is received.voidremoveStaticMember(Member member) protected voidsendLocalMember(Member[] members) protected voidsendMemberMessage(Member[] members, byte[] message) protected voidsendShutdown(Member[] members) voidsetLocalMember(Member member) voidstart(int svc) Starts up the channel.voidstop(int svc) Shuts down the channel.Methods inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBasefireInterceptorEvent, getChannel, getNext, getOptionFlag, getPrevious, heartbeat, memberAdded, memberDisappeared, okToProcess, sendMessage, setChannel, setNext, setOptionFlag, setPreviousMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptorMBeangetOptionFlag
- 
Field Details- 
sm
- 
MEMBER_STARTprotected static final byte[] MEMBER_START
- 
MEMBER_STOPprotected static final byte[] MEMBER_STOP
- 
members
- 
localMember
 
- 
- 
Constructor Details- 
StaticMembershipInterceptorpublic StaticMembershipInterceptor()
 
- 
- 
Method Details- 
addStaticMember
- 
removeStaticMember
- 
setLocalMember
- 
messageReceivedDescription copied from interface:ChannelInterceptorThemessageReceivedis invoked when a message is received.ChannelMessage.getAddress()is the sender, or the reply-to address if it has been overwritten.- Specified by:
- messageReceivedin interface- ChannelInterceptor
- Overrides:
- messageReceivedin class- ChannelInterceptorBase
- Parameters:
- msg- ChannelMessage
 
- 
hasMemberspublic boolean hasMembers()Description copied from interface:ChannelInterceptorIntercepts theChannel.hasMembers()method- Specified by:
- hasMembersin interface- ChannelInterceptor
- Overrides:
- hasMembersin class- ChannelInterceptorBase
- Returns:
- boolean - if the channel has members in its membership group
- See Also:
 
- 
getMembersDescription copied from interface:ChannelInterceptorIntercepts theChannel.getMembers()method- Specified by:
- getMembersin interface- ChannelInterceptor
- Overrides:
- getMembersin class- ChannelInterceptorBase
- Returns:
- the members
- See Also:
 
- 
getMemberDescription copied from interface:ChannelInterceptorIntercepts theChannel.getMember(Member)method- Specified by:
- getMemberin interface- ChannelInterceptor
- Overrides:
- getMemberin class- ChannelInterceptorBase
- Parameters:
- mbr- Member
- Returns:
- Member - the actual member information, including stay alive
- See Also:
 
- 
getLocalMemberDescription copied from interface:ChannelInterceptorIntercepts theChannel.getLocalMember(boolean)method- Specified by:
- getLocalMemberin interface- ChannelInterceptor
- Specified by:
- getLocalMemberin interface- StaticMembershipInterceptorMBean
- Overrides:
- getLocalMemberin class- ChannelInterceptorBase
- Parameters:
- incAlive- boolean
- Returns:
- the member that represents this node
- See Also:
 
- 
startStarts up the channel. This can be called multiple times for individual services to start The svc parameter can be the logical or value of any constantsSends notifications upwards. - Specified by:
- startin interface- ChannelInterceptor
- Overrides:
- startin class- ChannelInterceptorBase
- Parameters:
- svc- one of:- Channel.DEFAULT - will start all services
- Channel.MBR_RX_SEQ - starts the membership receiver
- Channel.MBR_TX_SEQ - starts the membership broadcaster
- Channel.SND_TX_SEQ - starts the replication transmitter
- Channel.SND_RX_SEQ - starts the replication receiver
 
- Throws:
- ChannelException- if a startup error occurs or the service is already started.
- See Also:
 
- 
stopShuts down the channel. This can be called multiple times for individual services to shut down. The svc parameter can be the logical or value of any constantsSends local member shutdown. - Specified by:
- stopin interface- ChannelInterceptor
- Overrides:
- stopin class- ChannelInterceptorBase
- Parameters:
- svc- one of:- Channel.DEFAULT - will shut down all services
- Channel.MBR_RX_SEQ - stops the membership receiver
- Channel.MBR_TX_SEQ - stops the membership broadcaster
- Channel.SND_TX_SEQ - stops the replication transmitter
- Channel.SND_RX_SEQ - stops the replication receiver
 
- Throws:
- ChannelException- if a startup error occurs or the service is already started.
- See Also:
 
- 
sendLocalMember
- 
sendShutdown
- 
getfirstInterceptor
- 
sendMemberMessage- Throws:
- ChannelException
 
 
-