Class StaticMembershipProvider
java.lang.Object
org.apache.catalina.tribes.membership.MembershipProviderBase
org.apache.catalina.tribes.membership.StaticMembershipProvider
- All Implemented Interfaces:
- ChannelListener,- RpcCallback,- Heartbeat,- MembershipProvider
public class StaticMembershipProvider
extends MembershipProviderBase
implements RpcCallback, ChannelListener, Heartbeat
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classprotected class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Channelprotected intprotected longprotected longprotected RpcChannelprotected longprotected booleanprotected intprotected static final StringManagerprotected intprotected ArrayList<StaticMember> protected StaticMembershipProvider.PingThreadprotected booleanFields inherited from class org.apache.catalina.tribes.membership.MembershipProviderBaseexecutor, membership, membershipListener, service
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaccept(Serializable msg, Member sender) Invoked by the channel to determine if the listener will process this message or not.protected voidvoidHeartbeat invocation for resources cleanup etcvoidinit(Properties properties) Initialize the membership provider with the specified configuration.voidleftOver(Serializable msg, Member sender) If the reply has already been sent to the requesting thread, the rpc callback can handle any data that comes in after the fact.protected voidmemberAdded(Member member) protected voidmemberAlive(Member member) protected voidmemberDisappeared(Member member) voidmessageReceived(Serializable msg, Member sender) Receive a message from the channelprotected voidping()replyRequest(Serializable msg, Member sender) Allows sending a response to a received message.voidsetChannel(Channel channel) voidsetStaticMembers(ArrayList<StaticMember> staticMembers) protected MembersetupMember(Member mbr) voidstart(int level) Start the membership provider.protected voidstartMembership(Member[] members) booleanstop(int level) Stop the membership provider.protected voidstopMembership(Member[] members) Methods inherited from class org.apache.catalina.tribes.membership.MembershipProviderBasegetMember, getMembers, hasMembers, setMembershipListener, setMembershipService
- 
Field Details- 
sm
- 
channel
- 
rpcChannel
- 
staticMembers
- 
sendOptionsprotected int sendOptions
- 
expirationTimeprotected long expirationTime
- 
connectTimeoutprotected int connectTimeout
- 
rpcTimeoutprotected long rpcTimeout
- 
startLevelprotected int startLevel
- 
useThreadprotected boolean useThread
- 
pingIntervalprotected long pingInterval
- 
runningprotected volatile boolean running
- 
thread
 
- 
- 
Constructor Details- 
StaticMembershipProviderpublic StaticMembershipProvider()
 
- 
- 
Method Details- 
initDescription copied from interface:MembershipProviderInitialize the membership provider with the specified configuration.- Specified by:
- initin interface- MembershipProvider
- Overrides:
- initin class- MembershipProviderBase
- Parameters:
- properties- configuration
- Throws:
- Exception- if an error occurs
 
- 
startDescription copied from interface:MembershipProviderStart the membership provider.- Specified by:
- startin interface- MembershipProvider
- Parameters:
- level- the readiness level- Channel.DEFAULT - will start all services
- Channel.MBR_RX_SEQ - starts the membership receiver
- Channel.MBR_TX_SEQ - starts the membership broadcaster
 
- Throws:
- Exception- if an error occurs
 
- 
stopDescription copied from interface:MembershipProviderStop the membership provider.- Specified by:
- stopin interface- MembershipProvider
- Parameters:
- level- the readiness level- Channel.DEFAULT - will stop all services
- Channel.MBR_RX_SEQ - stops the membership receiver
- Channel.MBR_TX_SEQ - stops the membership broadcaster
 
- Returns:
- trueif successful
- Throws:
- Exception- if an error occurs
 
- 
startMembership- Throws:
- ChannelException
 
- 
setupMember
- 
memberAdded
- 
memberDisappeared
- 
memberAlive
- 
stopMembership
- 
messageReceivedDescription copied from interface:ChannelListenerReceive a message from the channel- Specified by:
- messageReceivedin interface- ChannelListener
- Parameters:
- msg- Serializable
- sender- - the source of the message
 
- 
acceptDescription copied from interface:ChannelListenerInvoked by the channel to determine if the listener will process this message or not.- Specified by:
- acceptin interface- ChannelListener
- Parameters:
- msg- Serializable
- sender- Member
- Returns:
- boolean
 
- 
replyRequestDescription copied from interface:RpcCallbackAllows sending a response to a received message.- Specified by:
- replyRequestin interface- RpcCallback
- Parameters:
- msg- The message
- sender- Member
- Returns:
- Serializable object, nullif no reply should be sent
 
- 
leftOverDescription copied from interface:RpcCallbackIf the reply has already been sent to the requesting thread, the rpc callback can handle any data that comes in after the fact.- Specified by:
- leftOverin interface- RpcCallback
- Parameters:
- msg- The message
- sender- Member
 
- 
heartbeat
- 
ping- Throws:
- ChannelException
 
- 
checkExpiredprotected void checkExpired()
- 
setChannel
- 
setStaticMembers
 
-