/**
  * File: 		DomainGroupUser.java
  * Content: 	part of the RMI specification of sensei domains
  *           Interface to be implemented optionally by members using domains
  * Author: 	LuisM Pena
  * Date: 		27th October 2001
  * Version:  0.51.00
  * Last change:
  *
  **/


package sensei.middleware.domains;

import java.rmi.Remote;
import java.rmi.RemoteException;

/**
  * Interface to be implemented optionally by members using domains
  */
public interface DomainGroupUser extends Remote
{
  /**
   * Invoked when the DomainGroup is accepted into its subgroup
   */
  public void domainAccepted(int groupMemberId) throws RemoteException;

  /**
   * Invoked when the DomainGroup is expulsed from its subgroup
   */
  public void domainExpulsed(DomainExpulsionReason reason) throws RemoteException;

  /**
   * Invoked when the DomainGroup is considered to have state
   * @param assumed set to true if this member is assuming state, i.e, is not transfered
   */
  public void stateObtained(boolean assumed) throws RemoteException;

  /**
   * Invoked when the a subgroup in the domain is not reachable. This
   * call will be followed by a domainExpulsed call eventually.
   * @param subgroupId the identity of the subgroup causing the problem
   * @param reason an string explaining the problem
   */
  public void offendingSubgroup(int subgroupId, String reason) throws RemoteException;

};