/////// CgiClient.java /////// import java.io.InputStream; /** * A CGI client interface. * for making post query and receiving response * @author Paul S. Wang */ public interface CgiClient { /** posts the query msg to cgi. * gets ready for reading response * This method can be called only once * @param msg the query message to send is assumed to be * correctly encoded and formatted already */ void postQuery(String msg); /** reads entire textual response from cgi. * @return TextLines object containing response */ TextLines textResponse(); /** reads next text line from cgi. * @return String object */ String readNextLine(); /** returns InputStream for reading response from cgi. */ InputStream getInputStream(); /** closes down the cgi client. */ void close(); }