01: // MICPProp.java
02: // $Id: MICPProp.java,v 1.4 2000/08/16 21:38:05 ylafon Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1997.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.www.protocol.http.micp;
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: import org.w3c.tools.resources.StringAttribute;
13:
14: import org.w3c.jigsaw.http.httpd;
15:
16: import org.w3c.jigsaw.config.PropertySet;
17:
18: import org.w3c.www.protocol.http.HttpManager;
19:
20: public class MICPProp extends PropertySet {
21: private static String title = "mICP properties";
22:
23: static {
24: Class c = null;
25: Attribute a = null;
26:
27: try {
28: c = Class
29: .forName("org.w3c.www.protocol.http.micp.MICPProp");
30: } catch (Exception ex) {
31: ex.printStackTrace();
32: System.exit(1);
33: }
34: // port on which we will listen
35: a = new IntegerAttribute(MICPFilter.PORT_P, new Integer(2005),
36: Attribute.EDITABLE);
37: AttributeRegistry.registerAttribute(c, a);
38: // the multicast address
39: a = new StringAttribute(MICPFilter.ADDRESS_P, "224.0.2.67",
40: Attribute.EDITABLE);
41: AttributeRegistry.registerAttribute(c, a);
42: // the timeout, in ms
43: a = new IntegerAttribute(MICPFilter.TIMEOUT_P,
44: new Integer(300), Attribute.EDITABLE);
45: AttributeRegistry.registerAttribute(c, a);
46: // disable cache
47: a = new BooleanAttribute(MICPFilter.DISABLE_CACHE_P,
48: new Boolean(false), Attribute.EDITABLE);
49: AttributeRegistry.registerAttribute(c, a);
50: // debug?
51: a = new BooleanAttribute(MICPFilter.DEBUG_P,
52: new Boolean(false), 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: public MICPProp(String name, httpd server) {
66: super(name, server);
67: }
68: }
|