//package coco;

import java.awt.*;

/*command-driven components to be added to a coco page; watchers
  of the page will send requests to these objects; classes implementing
  this interface should be there at the client to work*/
public interface CocoComponent{
  /*should return a string _completely_ describing the current
    form of the instance*/
  public String getState();

  /*should set up the instance to look the way the given string
    describes its look; after that, the string returned by the
    getState() method should be the same as the parameter here*/
  public void setState(String s);

  /*return coco identifier of the instance*/
  public String getCocoId();

  /*give this instance an identifier*/
  public void setCocoId(String s);

  /*calls to this method will be initiated by the server whenever
    one of the watchers submitted a request on this particular
    component; then, all the watchers will get the same command
    so that their downloaded pages will change the same way*/
  public void request(String s);
}
