w3c.model.tools.basicweb.Agent

w3c.model.tools.basicweb.Agent

/* basicweb.Agent.java
 * $Id, $Date eric Exp $
 * (c) COPYRIGHT MIT and INRIA, 1997.
 * Please first read the full copyright statement in file COPYRIGHT.html
 *
 * Do not taunt super-happy-fun-code.
 */

/*
A web agent is any program that takes part in some part of an http request/reply conversation. Basicweb agents include:

*/
package w3c.model.tools.basicweb;

//import w3c.model.www.pep.PEPAgent;
//import w3c.model.www.pep.altlib.ErrorContext;
import w3c.model.www.pep.PEPAgent;
import w3c.model.www.pep.PEPServer;
import w3c.model.www.pep.altlib.*;

abstract class Agent 
    PEPAgent pepAgent;
    ErrorContext errorContext =  ErrorContext();

    Agent () {
	try {
	    prepPEP();
	} catch (HttpParserException p)) {
	    System.out.println("<!- error setting up PEPClient ->");
	    System.out.println(p);
	    p.printStackTrace();
	} catch (HTTPException e)) {
	    System.out.println("<!- error setting up PEPClient ->");
	    System.out.println(e);
	    e.printStackTrace();
	}
    }

    Agent (PEPAgent pepAgent) {
	this.pepAgent = pepAgent;
    }

    abstract void prepPEP () throwsHttpParserException HTTPException;