This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Group Membership
Skip to end of metadata
Go to start of metadata

ActiveBlaze supports group membership using a GroupChannel - which can be created from a GroupChannelFactory.
You have to explicitly say which group you want to join/leave - and you can join multiple groups.
Each GroupChannel has both a globally unique id and a name.


import org.apache.activeblaze.group.*;

...
BlazeGroupChannelFactory factory = new BlazeGroupChannelFactory();

BlazeGroupChannel channel = factory.createGroupChannel("My Channel");
//join a group
channel.addToGroup("test");
channel.start();

//listen for other members

channel.addMemberChangedListener(new MemberChangedListener(){

     public void memberStarted(Member member) {
         System.out.println("Member started");
     }

     public void memberStopped(Member member) {
         System.out.println("Member stopped");
     }
            
 });
  • No labels