01: // RequestEvent.java
02: // $Id: RequestEvent.java,v 1.5 2000/08/16 21:38:03 ylafon Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1996.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.www.protocol.http;
07:
08: /**
09: * The base class for request events.
10: * Request events are emited to request observers (if available) while
11: * requests are being processed.
12: * <p>This class is the base class for all request events.
13: */
14:
15: public class RequestEvent {
16: /**
17: * Status definition - The request is now queued for processing.
18: */
19: public static int EVT_QUEUED = 1;
20: /**
21: * Status definition - Connection is now settle, about to emit
22: * the request to target host.
23: */
24: public static int EVT_CONNECTED = 2;
25: /**
26: * Status definition - Request headers are now emited, the HttpManager
27: * is now waiting for the reply.
28: */
29: public static int EVT_EMITED = 3;
30: /**
31: * Status definition - Reply headers have been received, the reply
32: * will be handed out right after this to the observer.
33: */
34: public static int EVT_REPLIED = 4;
35: /**
36: * Error definition - The target server has improperly closed the
37: * connection.
38: */
39: public static int EVT_CLOSED = 5;
40: // FIXME doc
41: public static int EVT_CONTINUE = 6;
42: public static int EVT_UNREACHABLE = 7;
43:
44: /**
45: * The server instance that issued the event.
46: */
47: public HttpServer server = null;
48: /**
49: * The request that trigered the event.
50: */
51: public Request request = null;
52: /**
53: * The associated event code.
54: */
55: public int code = -1;
56:
57: public RequestEvent(HttpServer server, Request request, int code) {
58: this.server = server;
59: this.request = request;
60: this.code = code;
61: }
62: }
|