1
2
3
4
5
6
7
8
9 package bexee.core;
10
11 import java.util.HashMap;
12 import java.util.Map;
13
14 import org.apache.commons.lang.builder.ToStringBuilder;
15 import org.apache.commons.lang.builder.ToStringStyle;
16
17 /***
18 * This class is used for crossing the bridge between Axis and bexee in both
19 * ways.
20 * <p>
21 * Note that the BexeeMessage contains no SOAP specific data, just XML together
22 * with other information such as the operation name etc. This allows for a
23 * decoupling of the bexee engine and thus keeping it relatively independent
24 * from the SOAP protocol and Axis.
25 *
26 * @version $Revision: 1.1 $, $Date: 2004/12/15 14:18:10 $
27 * @author Patric Fornasier
28 * @author Pawel Kowalski
29 */
30 public class BexeeMessage {
31
32
33
34
35
36
37
38
39 private String service;
40
41 private String operation;
42
43 private Map parts;
44
45 /***
46 * Creates a new <code>BexeeMessage</code>.
47 */
48 public BexeeMessage() {
49 parts = new HashMap();
50 }
51
52 //***************************************************/
53
54 //***************************************************/
55
56 /***
57 * Gets the name of the invoked operation.
58 *
59 * @return a <code>String</code> or null if the message hasn't been
60 * initialized.
61 */
62 public String getOperation() {
63 return operation;
64 }
65
66 public Object getPart(String name) {
67 return parts.get(name);
68 }
69
70 public void putPart(String name, Object value) {
71 parts.put(name, value);
72 }
73
74 public Map getParts() {
75 return parts;
76 }
77
78 public void setParts(Map parts) {
79 this.parts = parts;
80 }
81
82 public void setOperation(String operation) {
83 this.operation = operation;
84 }
85
86 /***
87 * The name of the invoked service.
88 *
89 * @return a <code>String</code>
90 */
91 public String getService() {
92 return service;
93 }
94
95 /***
96 * The name of the invoked service.
97 *
98 * @param service
99 * a <code>String</code>
100 */
101 public void setService(String service) {
102 this.service = service;
103 }
104
105 //***************************************************/
106
107 //***************************************************/
108
109 public String toString() {
110 return ToStringBuilder.reflectionToString(this,
111 ToStringStyle.MULTI_LINE_STYLE);
112 }
113 }