01: // ConnectionProp.java
02: // $Id: ConnectionProp.java,v 1.9 2000/08/16 21:37:40 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.jigsaw.http;
07:
08: import org.w3c.tools.resources.Attribute;
09: import org.w3c.tools.resources.AttributeRegistry;
10: import org.w3c.tools.resources.BooleanAttribute;
11: import org.w3c.tools.resources.IntegerAttribute;
12:
13: import org.w3c.jigsaw.config.PropertySet;
14:
15: /**
16: * A wrapper class to give access to editable properties through a resource.
17: * This class allows to reuse entirely the generic resource editor to
18: * edit the properties of the server.
19: */
20:
21: class ConnectionProp extends PropertySet {
22: private static String title = "Connection properties";
23:
24: static {
25: Class c = null;
26: Attribute a = null;
27:
28: try {
29: c = Class.forName("org.w3c.jigsaw.http.ConnectionProp");
30: } catch (Exception ex) {
31: ex.printStackTrace();
32: System.exit(1);
33: }
34: // Keep-Alive flag:
35: a = new BooleanAttribute(httpd.KEEP_ALIVE_P, null,
36: Attribute.EDITABLE);
37: AttributeRegistry.registerAttribute(c, a);
38: // Client's threads priority:
39: a = new IntegerAttribute(httpd.CLIENT_PRIORITY_P, null,
40: Attribute.EDITABLE);
41: AttributeRegistry.registerAttribute(c, a);
42: // Client's buffer size
43: a = new IntegerAttribute(httpd.CLIENT_BUFSIZE_P, null,
44: Attribute.EDITABLE);
45: AttributeRegistry.registerAttribute(c, a);
46: // Client's debug flag
47: a = new BooleanAttribute(httpd.CLIENT_DEBUG_P, null,
48: Attribute.EDITABLE);
49: AttributeRegistry.registerAttribute(c, a);
50: // Request time out:
51: a = new IntegerAttribute(httpd.REQUEST_TIMEOUT_P, null,
52: Attribute.EDITABLE);
53: AttributeRegistry.registerAttribute(c, a);
54: }
55:
56: /**
57: * Get this property set title.
58: * @return A String encoded title.
59: */
60:
61: public String getTitle() {
62: return title;
63: }
64:
65: ConnectionProp(String name, httpd server) {
66: super(name, server);
67: }
68: }
|