jGCS Documentation

net.sf.jgcs.membership
Class AbstractMembershipSession

java.lang.Object
  extended by net.sf.jgcs.AbstractControlSession
      extended by net.sf.jgcs.membership.AbstractMembershipSession
All Implemented Interfaces:
ControlSession, MembershipSession
Direct Known Subclasses:
AbstractBlockSession

public abstract class AbstractMembershipSession
extends AbstractControlSession
implements MembershipSession


Constructor Summary
AbstractMembershipSession()
           
 
Method Summary
protected  void boot()
          Initializes any variables needed by this session.
 Membership getMembership()
          Gets the current Membership.
 MembershipID getMembershipID()
          Gets the current membership ID
protected  boolean hasAllListeners()
          Returns true if all listeners are registered.
protected  void notifyAndSetMembership(Membership m)
           
protected  void notifyRemoved()
           
protected  void setMembership(Membership m)
           
 void setMembershipListener(MembershipListener listener)
          Registers a listener for the membership changes.
 
Methods inherited from class net.sf.jgcs.AbstractControlSession
notifyExceptionListeners, notifyFailed, notifyJoin, notifyLeave, setControlListener, setExceptionListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jgcs.ControlSession
getLocalAddress, isJoined, join, leave, setControlListener, setExceptionListener
 

Constructor Detail

AbstractMembershipSession

public AbstractMembershipSession()
Method Detail

boot

protected void boot()
Description copied from class: AbstractControlSession
Initializes any variables needed by this session.

Overrides:
boot in class AbstractControlSession

setMembershipListener

public void setMembershipListener(MembershipListener listener)
Description copied from interface: MembershipSession
Registers a listener for the membership changes.

Specified by:
setMembershipListener in interface MembershipSession
Parameters:
listener - the listener to register.

hasAllListeners

protected boolean hasAllListeners()
Description copied from class: AbstractControlSession
Returns true if all listeners are registered.

Overrides:
hasAllListeners in class AbstractControlSession
Returns:

notifyAndSetMembership

protected void notifyAndSetMembership(Membership m)

notifyRemoved

protected void notifyRemoved()

getMembership

public Membership getMembership()
                         throws NotJoinedException
Description copied from interface: MembershipSession
Gets the current Membership.

Specified by:
getMembership in interface MembershipSession
Returns:
a membership.
Throws:
NotJoinedException - if the member is not joined

setMembership

protected void setMembership(Membership m)

getMembershipID

public MembershipID getMembershipID()
                             throws NotJoinedException
Description copied from interface: MembershipSession
Gets the current membership ID

Specified by:
getMembershipID in interface MembershipSession
Returns:
the current membership ID
Throws:
NotJoinedException - if the member is not joined

jGCS Documentation

Copyright (c) 2006, Universidade de Lisboa
For updates and related information please see jGCS home page