01: package vicazh.hyperpool.stream.net.http.html;
02:
03: import java.io.*;
04: import vicazh.hyperpool.stream.net.http.Service;
05:
06: /**
07: * The message service
08: *
09: * @author Victor Zhigunov
10: * @version 0.4.0
11: */
12: public class MessageService extends Service implements
13: MessageServiceMBean, Serializable {
14: public MessageService() {
15: }
16:
17: String base;
18:
19: ClassLoader loader;
20:
21: /**
22: * @param base
23: * resource bundle base name
24: * @param loader
25: * resource bundle class loader
26: */
27: public MessageService(String base, ClassLoader loader) {
28: this .base = base;
29: this .loader = loader;
30: }
31:
32: public Connection getConnection() {
33: return new MessageConnection(this );
34: }
35:
36: private String text;
37:
38: public String getText() {
39: return text;
40: }
41:
42: public void setText(String text) {
43: this .text = text;
44: }
45:
46: private String theme;
47:
48: public String getTheme() {
49: return theme;
50: }
51:
52: public void setTheme(String theme) {
53: this .theme = theme;
54: }
55:
56: private String url;
57:
58: public void setUrl(String url) {
59: this .url = url;
60: }
61:
62: public String getUrl() {
63: return url;
64: }
65:
66: public void setAttribute(String name, Object value)
67: throws Exception {
68: if (name.equals(MessageServiceMBean.OPTIONS)) {
69: setText(((MessageService) value).getText());
70: setTheme(((MessageService) value).getTheme());
71: setUrl(((MessageService) value).getUrl());
72: }
73: super.setAttribute(name, value);
74: }
75: }
|