Class WkaMembershipService

  • All Implemented Interfaces:
    org.apache.catalina.tribes.MembershipService

    public class WkaMembershipService
    extends Object
    implements org.apache.catalina.tribes.MembershipService
    This is the MembershipService which manages group membership based on a Well-Known Addressing (WKA) scheme.
    • Field Detail

      • properties

        protected Properties properties
        The implementation specific properties
      • payload

        protected byte[] payload
        This payload contains some membership information, such as some member specific properties e.g. HTTP/S ports
      • domain

        protected byte[] domain
        The domain name of this cluster
    • Constructor Detail

      • WkaMembershipService

        public WkaMembershipService​(MembershipManager membershipManager)
    • Method Detail

      • setProperties

        public void setProperties​(Properties properties)
        Specified by:
        setProperties in interface org.apache.catalina.tribes.MembershipService
      • getProperties

        public Properties getProperties()
        Specified by:
        getProperties in interface org.apache.catalina.tribes.MembershipService
      • getChannel

        public org.apache.catalina.tribes.Channel getChannel()
        Specified by:
        getChannel in interface org.apache.catalina.tribes.MembershipService
      • setChannel

        public void setChannel​(org.apache.catalina.tribes.Channel channel)
        Specified by:
        setChannel in interface org.apache.catalina.tribes.MembershipService
      • start

        public void start()
                   throws Exception
        Specified by:
        start in interface org.apache.catalina.tribes.MembershipService
        Throws:
        Exception
      • start

        public void start​(int i)
                   throws Exception
        Specified by:
        start in interface org.apache.catalina.tribes.MembershipService
        Throws:
        Exception
      • stop

        public void stop​(int i)
        Specified by:
        stop in interface org.apache.catalina.tribes.MembershipService
      • hasMembers

        public boolean hasMembers()
        Specified by:
        hasMembers in interface org.apache.catalina.tribes.MembershipService
      • getMember

        public org.apache.catalina.tribes.Member getMember​(org.apache.catalina.tribes.Member member)
        Specified by:
        getMember in interface org.apache.catalina.tribes.MembershipService
      • getMembers

        public org.apache.catalina.tribes.Member[] getMembers()
        Specified by:
        getMembers in interface org.apache.catalina.tribes.MembershipService
      • getLocalMember

        public org.apache.catalina.tribes.Member getLocalMember​(boolean b)
        Specified by:
        getLocalMember in interface org.apache.catalina.tribes.MembershipService
      • getMembersByName

        public String[] getMembersByName()
        Specified by:
        getMembersByName in interface org.apache.catalina.tribes.MembershipService
      • findMemberByName

        public org.apache.catalina.tribes.Member findMemberByName​(String name)
        Specified by:
        findMemberByName in interface org.apache.catalina.tribes.MembershipService
      • setLocalMemberProperties

        public void setLocalMemberProperties​(String s,
                                             int i,
                                             int i1,
                                             int i2)
        Specified by:
        setLocalMemberProperties in interface org.apache.catalina.tribes.MembershipService
      • setLocalMemberProperties

        public void setLocalMemberProperties​(String listenHost,
                                             int listenPort)
      • setMembershipListener

        public void setMembershipListener​(org.apache.catalina.tribes.MembershipListener membershipListener)
        Specified by:
        setMembershipListener in interface org.apache.catalina.tribes.MembershipService
      • removeMembershipListener

        public void removeMembershipListener()
        Specified by:
        removeMembershipListener in interface org.apache.catalina.tribes.MembershipService
      • setPayload

        public void setPayload​(byte[] payload)
        Specified by:
        setPayload in interface org.apache.catalina.tribes.MembershipService
      • setDomain

        public void setDomain​(byte[] domain)
        Specified by:
        setDomain in interface org.apache.catalina.tribes.MembershipService
      • broadcast

        public void broadcast​(org.apache.catalina.tribes.ChannelMessage channelMessage)
                       throws org.apache.catalina.tribes.ChannelException
        Specified by:
        broadcast in interface org.apache.catalina.tribes.MembershipService
        Throws:
        org.apache.catalina.tribes.ChannelException
      • getMembershipProvider

        public org.apache.catalina.tribes.MembershipProvider getMembershipProvider()
        Specified by:
        getMembershipProvider in interface org.apache.catalina.tribes.MembershipService
      • setMembershipProvider

        public void setMembershipProvider​(org.apache.catalina.tribes.MembershipProvider memberProvider)