Source code: mobile/Library.java
1 /** Java class "Library.java" generated from Poseidon for UML.
2 * Poseidon for UML is developed by <A HREF="http://www.gentleware.com">Gentleware</A>.
3 * Generated with <A HREF="http://jakarta.apache.org/velocity/">velocity</A> template engine.
4 */
5
6 package mobile;
7
8 import mobile.bearer.http.TalkingWithProxy;
9 import mobile.protocol.MobileRequestManager;
10
11 /**
12 * <p>
13 * This class provides access to the MobileRequestManager and TalkingWithProxy
14 * objects and ensures that both objects exist as singletons.
15 * </p>
16 */
17 public class Library {
18
19 ///////////////////////////////////////
20 // attributes
21 /**
22 * <p>
23 * Represents the URL of the proxy server
24 * </p>
25 */
26 private static String URL = "http://192.168.0.160:8080/page";
27
28 /**
29 * <p>
30 * Represents the number of messages which are sent without waiting for an
31 * acknowledge.
32 * </p>
33 */
34
35 public static int MESSAGES_PER_PACK = 1;
36
37 /**
38 * <p>
39 * Represents ...
40 * </p>
41 */
42 private static MobileRequestManager requestManager = new MobileRequestManager();
43
44
45 /**
46 * <p>
47 * Represents ...
48 * </p>
49 */
50 private static TalkingWithProxy talkingWithProxy = new TalkingWithProxy(URL, MESSAGES_PER_PACK);
51
52 ///////////////////////////////////////
53 // operations
54
55
56 /**
57 * <p>
58 * Returns the singleton object of the MobileRequestManager class.
59 * </p>
60 * <p>
61 * @return The singleton object of the MobileRequestManager class.
62 * </p>
63 */
64 public static MobileRequestManager getRequestManager() {
65 return requestManager;
66 } // end getRequestManager
67
68 /**
69 * <p>
70 * Represents ...
71 * </p>
72 */
73
74 /* public void setRequestManager(MobileRequestManager _requestManager) {
75 requestManager = _requestManager;
76 } // end setRequestManager
77 */
78
79 /**
80 * <p>
81 * Returns the singleton object of the TalkingWithProxy class.
82 * </p>
83 * <p>
84 * @return The singleton object of the TalkingWithProxy class.
85 * </p>
86 */
87
88 public static TalkingWithProxy getTalkingWithProxy() {
89 return talkingWithProxy;
90 } // end getTalkingWithProxy
91
92 /**
93 * <p>
94 * Represents ...
95 * </p>
96 */
97
98 /*public void setTalkingWithProxy(TalkingWithProxy _talkingWithProxy) {
99 talkingWithProxy = _talkingWithProxy;
100 } // end setTalkingWithProxy
101
102 */
103
104 public static void setURL(String _URL)
105 {
106 URL = _URL;
107 talkingWithProxy.setUrl(URL);
108 }
109 /**
110 * <p>
111 * Starts the library threads (optional)
112 * </p><p>
113 *
114 * </p>
115 */
116 public void start() {
117 // your code here
118 } // end start
119
120 /**
121 * <p>
122 * Stops the library threads (optional)
123 * </p><p>
124 *
125 * </p>
126 */
127 public void stop() {
128 // your code here
129 } // end stop
130
131 } // end Library
132
133
134
135
136