package org.greenstone.p2p;

import java.util.*;
import java.net.URL;

public interface GreenstoneClient
{ /**
   * This interface needs to be fulfilled by a Greenstone machine wanting to
   * register and receive messages from the Greenstone Distributed Service.
   *
   */

  /**
   * This method is called by a GDS server when an action (message) has a response
   * sent in reply.  The Greenstone server that sends the action will have this
   * method called for each response received from the GDS network.
   *
   * @param: <code>NameServerAction</code> - at present, </code>null</code>.
   * This method *must* be synchronized
   * @param: <code>ClientResponse</code> - is a simple wrapper for the Map class.
   * 
   */
  public void receiveResponse(NameServerAction action, ClientResponse response);

  /**
   *
   */
  public void receiveMessage(String message, Map parameters);
  public String getIdentifier();
  public URL    getURL();
}