jGCS Documentation

net.sf.jgcs.membership
Interface BlockSession

All Superinterfaces:
ControlSession, MembershipSession
All Known Implementing Classes:
AbstractBlockSession

public interface BlockSession
extends MembershipSession

This class defines a BlockSession. This session should be used by toolkits that implement Group Communication with flush of messages before a view change.

Version:
1.0
Author:
Nuno Carvalho

Method Summary
 void blockOk()
          This method must be used by the application after it received a block notification and flushed all pending messages.
 boolean isBlocked()
          Verifies if the group is blocked or not.
 void setBlockListener(BlockListener listener)
          Registers a listener for the block notification.
 
Methods inherited from interface net.sf.jgcs.membership.MembershipSession
getMembership, getMembershipID, setMembershipListener
 
Methods inherited from interface net.sf.jgcs.ControlSession
getLocalAddress, isJoined, join, leave, setControlListener, setExceptionListener
 

Method Detail

blockOk

void blockOk()
             throws NotJoinedException,
                    JGCSException
This method must be used by the application after it received a block notification and flushed all pending messages. After calling this method, the application cannot send any more messages until it receives a notification of a membership change.

Throws:
NotJoinedException - if the member is not in a group.
JGCSException - if an error ocurs.

isBlocked

boolean isBlocked()
                  throws NotJoinedException
Verifies if the group is blocked or not.

Returns:
true if the group is blocked, false otherwise.
Throws:
NotJoinedException - if the member is not in a group.

setBlockListener

void setBlockListener(BlockListener listener)
                      throws JGCSException
Registers a listener for the block notification.

Parameters:
listener - the listener to register.
Throws:
JGCSException - if an error ocurs.

jGCS Documentation

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