1 package org.opensync.engine.server;
2
3 import java.io.*;
4
5 /***
6 * This class indicate if the source gives information after synchronization
7 */
8
9 public class Return implements Serializable {
10 /***
11 * The source don't give information
12 *
13 */
14 public final static String TYPE_VERBOSE = "verbose";
15 /***
16 * The source gives information
17 *
18 */
19 public final static String TYPE_DUMB = "dumb";
20
21 /***
22 * The type of the return
23 *
24 */
25 private String type;
26 /***
27 * The time-out
28 *
29 */
30 private String timeOut;
31 /***
32 * The unit time-out
33 *
34 */
35 private String unit;
36
37 /***
38 * Construct a Return object
39 *
40 */
41 public Return() {
42 }
43 /***
44 * Set the type of the return ojbect
45 *
46 * @param type the type of the return object
47 */
48 public void setType(String type) {
49 this.type = type;
50 }
51 /***
52 * Get the type of the return ojbect
53 *
54 */
55 public String getType() {
56 return type;
57 }
58 /***
59 * Set the time-out
60 *
61 * @param timeOut the time-out
62 */
63 public void setTimeOut(String timeOut) {
64 this.timeOut = timeOut;
65 }
66 /***
67 * Get the time-out
68 *
69 */
70 public String getTimeOut() {
71 return timeOut;
72 }
73 /***
74 * Set the unit time-out (s | m | h)
75 *
76 * @param unit the unit
77 */
78 public void setUnit(String unit) {
79 this.unit = unit;
80 }
81 /***
82 * Get the unit time-out (s | m | h)
83 *
84 */
85 public String getUnit() {
86 return unit;
87 }
88 /***
89 * Use for debug only
90 *
91 */
92 public String toString(){
93 StringBuffer buffer = new StringBuffer();
94 buffer.append("Return{\n");
95 buffer.append("\ttype : ").append(type).append("\n");
96 buffer.append("\ttimeOut : ").append(timeOut).append("\n");
97 buffer.append("\tunit : ").append(unit).append("\n");
98 buffer.append("}\n");
99 return buffer.toString();
100 }
101 }