-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibHttpServer.emx
More file actions
536 lines (536 loc) · 50 KB
/
Copy pathLibHttpServer.emx
File metadata and controls
536 lines (536 loc) · 50 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
<?xml version="1.0" encoding="UTF-8"?>
<!--xtools2_universal_type_manager-->
<!--HCL RealTime Software Tooling 10.3.0-->
<?com.ibm.xtools.emf.core.signature <signature id="com.ibm.xtools.uml.msl.model" version="7.0.0"><feature description="" name="com.ibm.xtools.ruml.feature" url="" version="7.0.0"/></signature>?>
<?com.ibm.xtools.emf.core.signature <signature id="com.ibm.xtools.mmi.ui.signatures.diagram" version="7.0.0"><feature description="" name="RTist Modeling Platform (com.ibm.xtools.rmp)" url="" version="7.0.0"/></signature>?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:CppPropertySets="http:///schemas/CppPropertySets/_5TG7AMk4EeO2m9WtkWjeeQ/67" xmlns:Default="http:///schemas/Default/_fNm3AAqoEd6-N_NOT9vsCA/2" xmlns:UMLRealTime="http:///schemas/UMLRealTime/_3TUzoHq6Ed2hSeAAWZznoA/119" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmlns:umlnotation="http://www.ibm.com/xtools/1.5.3/Umlnotation" xsi:schemaLocation="http:///schemas/CppPropertySets/_5TG7AMk4EeO2m9WtkWjeeQ/67 pathmap://CPP_LANGUAGE_PROFILE/CppPropertySets.epx#_5TYAwMk4EeO2m9WtkWjeeQ?CppPropertySets/CppPropertySets? http:///schemas/Default/_fNm3AAqoEd6-N_NOT9vsCA/2 pathmap://UML2_MSL_PROFILES/Default.epx#_fNwoAAqoEd6-N_NOT9vsCA?Default/Default? http:///schemas/UMLRealTime/_3TUzoHq6Ed2hSeAAWZznoA/119 pathmap://RT_PROPERTIES/UMLRealTime.epx#_3TUzoXq6Ed2hSeAAWZznoA?UMLRealTime/UMLRealTime?">
<uml:Package xmi:id="_rx2SkNXDEei3BJT-OqdJZA" name="LibHttpServer">
<eAnnotations xmi:id="_rx2SkdXDEei3BJT-OqdJZA" source="uml2.diagrams">
<contents xmi:type="umlnotation:UMLDiagram" xmi:id="_Iy1FoN6wEeife8wA8rm4kw" type="Class" name="APIs">
<children xmi:type="umlnotation:UMLShape" xmi:id="_LBKlcN6wEeife8wA8rm4kw" element="_K_gYkN6wEeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" transparency="0" lineColor="14263149" lineWidth="1" showStereotype="Label">
<children xmi:type="notation:DecorationNode" xmi:id="_LBLMgN6wEeife8wA8rm4kw" type="ImageCompartment">
<layoutConstraint xmi:type="notation:Size" xmi:id="_LBLMgd6wEeife8wA8rm4kw" width="1320" height="1320"/>
</children>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_LBLzkN6wEeife8wA8rm4kw" type="Stereotype"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_LBLzkd6wEeife8wA8rm4kw" type="Name"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_LBLzkt6wEeife8wA8rm4kw" type="Parent"/>
<children xmi:type="notation:SemanticListCompartment" xmi:id="_LBLzk96wEeife8wA8rm4kw" type="AttributeCompartment"/>
<children xmi:type="notation:SemanticListCompartment" xmi:id="_LBMaoN6wEeife8wA8rm4kw" type="OperationCompartment"/>
<children xmi:type="notation:SemanticListCompartment" xmi:id="_LBMaod6wEeife8wA8rm4kw" visible="false" type="SignalCompartment"/>
<children xmi:type="umlnotation:UMLShapeCompartment" xmi:id="_LBMaot6wEeife8wA8rm4kw" visible="false" type="StructureCompartment"/>
<children xmi:id="_LBMao96wEeife8wA8rm4kw" type="portCompartment">
<styles xmi:type="notation:DrawerStyle" xmi:id="_LBMapN6wEeife8wA8rm4kw"/>
<styles xmi:type="notation:TitleStyle" xmi:id="_LBMapd6wEeife8wA8rm4kw"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_LBMapt6wEeife8wA8rm4kw"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_LBMap96wEeife8wA8rm4kw"/>
</children>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_LBKlcd6wEeife8wA8rm4kw" x="2794" y="1778"/>
</children>
<children xmi:type="umlnotation:UMLShape" xmi:id="_fJEG0N67Eeife8wA8rm4kw" element="_wbBJEN62Eeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" transparency="0" lineColor="14263149" lineWidth="1" showStereotype="Label">
<children xmi:type="notation:DecorationNode" xmi:id="_fJEG0t67Eeife8wA8rm4kw" type="ImageCompartment">
<layoutConstraint xmi:type="notation:Size" xmi:id="_fJEG0967Eeife8wA8rm4kw" width="1320" height="1320"/>
</children>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_fJEt4N67Eeife8wA8rm4kw" type="Stereotype"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_fJFU8N67Eeife8wA8rm4kw" type="Name"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_fJFU8d67Eeife8wA8rm4kw" type="Parent"/>
<children xmi:type="notation:SemanticListCompartment" xmi:id="_fJFU8t67Eeife8wA8rm4kw" type="AttributeCompartment"/>
<children xmi:type="notation:SemanticListCompartment" xmi:id="_fJFU8967Eeife8wA8rm4kw" type="OperationCompartment"/>
<children xmi:type="notation:SemanticListCompartment" xmi:id="_fJFU9N67Eeife8wA8rm4kw" visible="false" type="SignalCompartment"/>
<children xmi:type="umlnotation:UMLShapeCompartment" xmi:id="_fJFU9d67Eeife8wA8rm4kw" visible="false" type="StructureCompartment"/>
<children xmi:id="_fJF8AN67Eeife8wA8rm4kw" type="portCompartment">
<styles xmi:type="notation:DrawerStyle" xmi:id="_fJF8Ad67Eeife8wA8rm4kw"/>
<styles xmi:type="notation:TitleStyle" xmi:id="_fJF8At67Eeife8wA8rm4kw"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_fJF8A967Eeife8wA8rm4kw"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_fJF8BN67Eeife8wA8rm4kw"/>
</children>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_fJEG0d67Eeife8wA8rm4kw" x="12700" y="1651"/>
</children>
<children xmi:type="umlnotation:UMLShape" xmi:id="_t6JVYOK0Eeife8wA8rm4kw" element="_t6FrAOK0Eeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" transparency="0" lineColor="12632258" lineWidth="1" showStereotype="Label">
<eAnnotations xmi:id="_t6J8cOK0Eeife8wA8rm4kw" source="com.ibm.xtools.uml.ui.diagram.internal.styles">
<details xmi:id="_t6J8ceK0Eeife8wA8rm4kw" key="ImageModeStyle" value="true"/>
</eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_t6KjgOK0Eeife8wA8rm4kw" type="ImageCompartment">
<layoutConstraint xmi:type="notation:Size" xmi:id="_t6KjgeK0Eeife8wA8rm4kw" width="1320" height="1320"/>
</children>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_t6KjguK0Eeife8wA8rm4kw" type="Stereotype"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_t6Kjg-K0Eeife8wA8rm4kw" type="CommentBody"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6JVYeK0Eeife8wA8rm4kw" x="6604" y="635" width="5351" height="8656"/>
</children>
<children xmi:type="umlnotation:UMLShape" xmi:id="_tOAgwOK3Eeife8wA8rm4kw" element="_tN1hoOK3Eeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" transparency="0" lineColor="12632258" lineWidth="1" showStereotype="Label">
<eAnnotations xmi:id="_tOBH0OK3Eeife8wA8rm4kw" source="com.ibm.xtools.uml.ui.diagram.internal.styles">
<details xmi:id="_tOBH0eK3Eeife8wA8rm4kw" key="ImageModeStyle" value="true"/>
</eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_tOBu4OK3Eeife8wA8rm4kw" type="ImageCompartment">
<layoutConstraint xmi:type="notation:Size" xmi:id="_tOBu4eK3Eeife8wA8rm4kw" width="1320" height="1320"/>
</children>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_tOBu4uK3Eeife8wA8rm4kw" type="Stereotype"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_tOBu4-K3Eeife8wA8rm4kw" type="CommentBody"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_tOAgweK3Eeife8wA8rm4kw" x="18711" y="1206" width="6325" height="8085"/>
</children>
<element xsi:nil="true"/>
<edges xmi:type="notation:Connector" xmi:id="_BY3X4OK1Eeife8wA8rm4kw" type="NoteAttachment" source="_t6JVYOK0Eeife8wA8rm4kw" target="_LBKlcN6wEeife8wA8rm4kw" lineColor="0" lineWidth="1">
<styles xmi:type="notation:ArrowStyle" xmi:id="_BY3X4eK1Eeife8wA8rm4kw"/>
<styles xmi:type="notation:LineTypeStyle" xmi:id="_BY3X4uK1Eeife8wA8rm4kw"/>
<element xsi:nil="true"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_BY3X4-K1Eeife8wA8rm4kw" points="[-139, -62, 111, 16]$[-218, -139, 32, -61]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_BY7pUOK1Eeife8wA8rm4kw" id="(0.6038312614632159,1.0)"/>
</edges>
<edges xmi:type="notation:Connector" xmi:id="_tAQjMOK4Eeife8wA8rm4kw" type="NoteAttachment" source="_tOAgwOK3Eeife8wA8rm4kw" target="_fJEG0N67Eeife8wA8rm4kw" lineColor="0" lineWidth="1">
<styles xmi:type="notation:ArrowStyle" xmi:id="_tAQjMeK4Eeife8wA8rm4kw"/>
<styles xmi:type="notation:LineTypeStyle" xmi:id="_tAQjMuK4Eeife8wA8rm4kw"/>
<element xsi:nil="true"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_tAQjM-K4Eeife8wA8rm4kw" points="[0, -5, 186, 10]$[-88, -5, 98, 10]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_tAaUMOK4Eeife8wA8rm4kw" id="(0.0,0.3063698206555349)"/>
</edges>
</contents>
</eAnnotations>
<eAnnotations xmi:id="_rx2SytXDEei3BJT-OqdJZA" source="com.ibm.xtools.common.ui.reduction.editingCapabilities">
<details xmi:id="_rx2Sy9XDEei3BJT-OqdJZA" key="umldt.rt.activity" value="2"/>
<details xmi:id="_rx2SzNXDEei3BJT-OqdJZA" key="uml.rt.activity" value="2"/>
<details xmi:id="_rx2SzdXDEei3BJT-OqdJZA" key="umldt.activity" value="2"/>
<details xmi:id="_rx2SztXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBStateMachine2" value="1"/>
<details xmi:id="_rx2Sz9XDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBFunction" value="1"/>
<details xmi:id="_rx2S0NXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBStateMachine1" value="1"/>
<details xmi:id="_rx2S0dXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBComponentDiagram" value="1"/>
<details xmi:id="_rx2S0tXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBTypes1" value="1"/>
<details xmi:id="_rx2S09XDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBArtifact" value="1"/>
<details xmi:id="_rx2S1NXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBSequence1" value="1"/>
<details xmi:id="_rx2S1dXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBStructureDiagram" value="1"/>
<details xmi:id="_rx2S1tXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBEvent1" value="1"/>
<details xmi:id="_rx2S19XDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBSequence2" value="1"/>
<details xmi:id="_rx2S2NXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBClassTemplateParameter" value="1"/>
<details xmi:id="_rx2S2dXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBRelationship1" value="1"/>
<details xmi:id="_rx2S2tXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBUsage" value="1"/>
<details xmi:id="_rx2S29XDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBRelationship2" value="1"/>
<details xmi:id="_rx2S3NXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBSequenceDiagram" value="1"/>
<details xmi:id="_rx2S3dXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBTypes4" value="1"/>
<details xmi:id="_rx2S3tXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBElementImport1" value="1"/>
<details xmi:id="_rx2S39XDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBProfile" value="1"/>
<details xmi:id="_rx2S4NXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBTypes3" value="1"/>
<details xmi:id="_rx2S4dXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBTypes2" value="1"/>
<details xmi:id="_rx2S4tXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBCompositeStructure1" value="1"/>
<details xmi:id="_rx2S49XDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBFragment" value="1"/>
<details xmi:id="_rx2S5NXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBInteraction" value="1"/>
<details xmi:id="_rx2S5dXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBInterface" value="1"/>
<details xmi:id="_rx2S5tXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBClassDiagram" value="1"/>
<details xmi:id="_rx2S59XDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBLifeLine" value="1"/>
<details xmi:id="_rx2S6NXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBStateChartDiagram" value="1"/>
<details xmi:id="_rx2S6dXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBFunctionTemplateParameter" value="1"/>
<details xmi:id="_rx2S6tXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBDependancy" value="1"/>
<details xmi:id="_rx2S69XDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBPackage" value="1"/>
<details xmi:id="_rx2S7NXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBConstraint" value="1"/>
<details xmi:id="_rx2S7dXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBClass" value="1"/>
<details xmi:id="_rx2S7tXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBComment2" value="1"/>
<details xmi:id="_rx2S79XDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.umlBBComment1" value="1"/>
<details xmi:id="_rx2S8NXDEei3BJT-OqdJZA" key="com.ibm.xtools.activities.cppModelingActivity" value="1"/>
</eAnnotations>
<ownedComment xmi:id="_t6FrAOK0Eeife8wA8rm4kw">
<body><p>A capsule for outgoing communication with an HTTP server. You should inherit this capsule and create an instance of it in your application. Initialize the instance by calling the operation <b>configureServer</b><b>()</b> before you make any HTTP requests (for example by redefining the initial transition). In the state machine of your inherited capsule, handle all events that you want to map to HTTP requests. Call operations such as <b>httpGet()</b> to perform the HTTP requests. You can for example use the <b>RTJsonEncoding </b>class to encode the received message and its data to a JSON representation which then can be sent in the HTTP request.</p><p>Running your capsule instance in its own thread is recommended but not strictly necessary if the HTTP response comes fast enough.</p></body>
</ownedComment>
<ownedComment xmi:id="_tN1hoOK3Eeife8wA8rm4kw">
<body><p>A capsule for incoming communication with an HTTP server. You should inherit this capsule and create an instance of it in your application. You need to initialize the instance by calling the operation <b>configureServer()</b> before you can receive any messages from the HTTP server. </p><p>Fetching messages from the HTTP server uses a long-running HTTP request that only completes when an incoming message is available. You must therefore run your capsule instance in its own thread so that the rest of your application is not blocked. When a message from the HTTP server is available, the <b>onMessageReceived()</b> operation will be called. Override it to handle the received HTTP message, for example by mapping it to sending of corresponding protocol events to other parts of your application.</p></body>
</ownedComment>
<packageImport xmi:id="_rx2S8dXDEei3BJT-OqdJZA">
<eAnnotations xmi:id="_rx2S8tXDEei3BJT-OqdJZA" source="RSA_ElementImport"/>
<importedPackage xmi:type="uml:Model" href="platform:/plugin/com.ibm.xtools.umldt.rt.cpp.core/libraries/RTClasses.emx#_1MnNgJwwEdu4wYUZIlQWkw?RTClasses?"/>
</packageImport>
<packageImport xmi:id="_rx2S89XDEei3BJT-OqdJZA">
<eAnnotations xmi:id="_rx2S9NXDEei3BJT-OqdJZA" source="RSA_ElementImport"/>
<importedPackage xmi:type="uml:Model" href="platform:/plugin/com.ibm.xtools.umldt.rt.cpp.core/libraries/CppPrimitiveDatatypes.emx#_f0875BKyEdyaM9S2zG4bgA?CppPrimitiveDatatypes?"/>
</packageImport>
<packageImport xmi:id="_rx2S9dXDEei3BJT-OqdJZA">
<eAnnotations xmi:id="_rx2S9tXDEei3BJT-OqdJZA" source="RSA_ElementImport"/>
<importedPackage xmi:type="uml:Model" href="platform:/plugin/com.ibm.xtools.umldt.rt.cpp.core/libraries/RTComponents.emx#__QdLdUB2PEd2Vrcc_Gxok_A37F129B1035A?RTComponents?"/>
</packageImport>
<packagedElement xmi:type="uml:Class" xmi:id="_K_gYkN6wEeife8wA8rm4kw" name="HttpServer_Out">
<eAnnotations xmi:id="_LAFAUN6wEeife8wA8rm4kw" source="uml2.diagrams" references="_LAFAUd6wEeife8wA8rm4kw">
<contents xmi:type="umlnotation:UMLDiagram" xmi:id="_LAFAUd6wEeife8wA8rm4kw" type="Structure" element="_K_gYkN6wEeife8wA8rm4kw" measurementUnit="Himetric">
<children xmi:type="umlnotation:UMLShape" xmi:id="_LAFAUt6wEeife8wA8rm4kw" type="StructureDiagramFrame" element="_K_gYkN6wEeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" transparency="0" lineColor="14263149" lineWidth="1" showStereotype="Label">
<children xmi:type="umlnotation:UMLShapeCompartment" xmi:id="_LAFAU96wEeife8wA8rm4kw" type="StructureCompartment">
<children xmi:type="umlnotation:UMLShape" xmi:id="_m5YawN62Eeife8wA8rm4kw" visible="false" element="_6d7AIN6wEeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" showListVisibility="None" showListSignature="true" transparency="0" lineColor="14263149" lineWidth="1" showStereotype="Label">
<eAnnotations xmi:id="_m5ZB0N62Eeife8wA8rm4kw" source="com.ibm.xtools.uml.ui.diagram.internal.styles">
<details xmi:id="_m5Zo4N62Eeife8wA8rm4kw" key="ShowTypeLabelStyle" value="Represents Name and Type Name"/>
</eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_m5Zo4d62Eeife8wA8rm4kw" type="ImageCompartment">
<layoutConstraint xmi:type="notation:Size" xmi:id="_m5Zo4t62Eeife8wA8rm4kw" width="1320" height="1320"/>
</children>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_m5Zo4962Eeife8wA8rm4kw" type="PartTextCompartment"/>
<children xmi:type="umlnotation:UMLShapeCompartment" xmi:id="_m5Zo5N62Eeife8wA8rm4kw" visible="false" type="PartStructureCompartment"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_m5Yawd62Eeife8wA8rm4kw"/>
</children>
<children xmi:type="umlnotation:UMLShape" xmi:id="_m5aP8N62Eeife8wA8rm4kw" visible="false" element="_LrzBYN6xEeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" showListVisibility="None" showListSignature="true" transparency="0" lineColor="14263149" lineWidth="1" showStereotype="Label">
<eAnnotations xmi:id="_m5aP8t62Eeife8wA8rm4kw" source="com.ibm.xtools.uml.ui.diagram.internal.styles">
<details xmi:id="_m5aP8962Eeife8wA8rm4kw" key="ShowTypeLabelStyle" value="Represents Name and Type Name"/>
</eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_m5a3AN62Eeife8wA8rm4kw" type="ImageCompartment">
<layoutConstraint xmi:type="notation:Size" xmi:id="_m5a3Ad62Eeife8wA8rm4kw" width="1320" height="1320"/>
</children>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_m5a3At62Eeife8wA8rm4kw" type="PartTextCompartment"/>
<children xmi:type="umlnotation:UMLShapeCompartment" xmi:id="_m5a3A962Eeife8wA8rm4kw" visible="false" type="PartStructureCompartment"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_m5aP8d62Eeife8wA8rm4kw"/>
</children>
</children>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_LAFAVN6wEeife8wA8rm4kw" type="Name"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_LAFAVd6wEeife8wA8rm4kw" x="635" y="635"/>
</children>
</contents>
</eAnnotations>
<ownedComment xmi:id="_AqgSoN67Eeife8wA8rm4kw" annotatedElement="_K_gYkN6wEeife8wA8rm4kw">
<body><p>Incarnate this capsule to send outgoing messages to an HTTP server.</p></body>
</ownedComment>
<ownedAttribute xmi:id="_6d7AIN6wEeife8wA8rm4kw" name="host" visibility="private"/>
<ownedAttribute xmi:id="_LrzBYN6xEeife8wA8rm4kw" name="port" visibility="private">
<type xmi:type="uml:PrimitiveType" href="platform:/plugin/com.ibm.xtools.umldt.rt.cpp.core/libraries/CppPrimitiveDatatypes.emx#_b5qeIMuSEdy4n9Rh8xcU5g?CppPrimitiveDatatypes/unsigned%20int?"/>
</ownedAttribute>
<ownedBehavior xmi:type="uml:StateMachine" xmi:id="_K_o7cN6wEeife8wA8rm4kw" name="State Machine">
<eAnnotations xmi:id="_LAB9AN6wEeife8wA8rm4kw" source="uml2.diagrams" references="_LACkEN6wEeife8wA8rm4kw">
<contents xmi:type="umlnotation:UMLDiagram" xmi:id="_LACkEN6wEeife8wA8rm4kw" type="Statechart" element="_K_o7cN6wEeife8wA8rm4kw" measurementUnit="Himetric">
<children xmi:type="umlnotation:UMLFrame" xmi:id="_LACkEd6wEeife8wA8rm4kw" type="Statemachine" element="_K_o7cN6wEeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" bold="true" transparency="0" lineColor="14263149" lineWidth="1" showStereotype="Label" alignment="Horizontal">
<children xmi:type="umlnotation:UMLShapeCompartment" xmi:id="_LACkEt6wEeife8wA8rm4kw" type="Region" element="_K_qJkN6wEeife8wA8rm4kw" verticalAlignment="false">
<children xmi:type="umlnotation:UMLShape" xmi:id="_SEEAcN6wEeife8wA8rm4kw" element="_K_rXsN6wEeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" fillColor="15912618" transparency="0" lineColor="15912618" lineWidth="1" showStereotype="Label">
<children xmi:type="notation:DecorationNode" xmi:id="_SEEngN6wEeife8wA8rm4kw" type="NameLabel">
<children xmi:type="notation:BasicDecorationNode" xmi:id="_SEFOkN6wEeife8wA8rm4kw" type="Stereotype"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_SEFOkd6wEeife8wA8rm4kw" type="Name"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_SEFOkt6wEeife8wA8rm4kw" type="Parent"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_SEEngd6wEeife8wA8rm4kw" y="-149"/>
</children>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_SEEAcd6wEeife8wA8rm4kw" x="5092" y="172"/>
</children>
<children xmi:type="umlnotation:UMLShape" xmi:id="_SEF1oN6wEeife8wA8rm4kw" element="_K_tz8N6wEeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" transparency="0" lineColor="14263149" lineWidth="1" showStereotype="Label">
<children xmi:type="notation:DecorationNode" xmi:id="_SEGcsN6wEeife8wA8rm4kw" type="ImageCompartment">
<layoutConstraint xmi:type="notation:Size" xmi:id="_SEGcsd6wEeife8wA8rm4kw" width="1320" height="1320"/>
</children>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_SEHDwN6wEeife8wA8rm4kw" type="Stereotype"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_SEHDwd6wEeife8wA8rm4kw" type="Name"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_SEHDwt6wEeife8wA8rm4kw" type="Parent"/>
<children xmi:type="notation:ListCompartment" xmi:id="_SEHq0N6wEeife8wA8rm4kw" visible="false" type="Activities"/>
<children xmi:type="notation:ListCompartment" xmi:id="_SEI48N6wEeife8wA8rm4kw" visible="false" type="InternalTransitionCompartment"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_SEF1od6wEeife8wA8rm4kw" x="3822" y="1950"/>
</children>
</children>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_LACkE96wEeife8wA8rm4kw" type="Name"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_LACkFN6wEeife8wA8rm4kw" x="635" y="635"/>
</children>
</contents>
</eAnnotations>
<region xmi:id="_K_qJkN6wEeife8wA8rm4kw" name="Region1">
<subvertex xmi:type="uml:Pseudostate" xmi:id="_K_rXsN6wEeife8wA8rm4kw"/>
<subvertex xmi:type="uml:State" xmi:id="_K_tz8N6wEeife8wA8rm4kw" name="WaitForMessage"/>
<transition xmi:id="_K_ubAN6wEeife8wA8rm4kw" name="Initial" source="_K_rXsN6wEeife8wA8rm4kw" target="_K_tz8N6wEeife8wA8rm4kw">
<eAnnotations xmi:id="_K_yFYN6wEeife8wA8rm4kw" source="uml2.alias">
<details xmi:id="_K_yscN6wEeife8wA8rm4kw" key="Initial"/>
</eAnnotations>
<effect xmi:type="uml:OpaqueBehavior" xmi:id="_ertdcN6wEeife8wA8rm4kw" name="Effect">
<language>C++</language>
<body>// Configure with default host name and port number. Override this transition to use other values.
configureServer("localhost", 12345);</body>
</effect>
</transition>
</region>
</ownedBehavior>
<ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_zNHE8N6wEeife8wA8rm4kw" name="configureServer" specification="_pzwv8N6wEeife8wA8rm4kw">
<language>C++</language>
<body>// Called when the server is initialized.
host = theHost;
port = thePort;</body>
</ownedBehavior>
<ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_bteDUN6zEeife8wA8rm4kw" name="httpGet" specification="_0UyMwN6yEeife8wA8rm4kw">
<language>C++</language>
<body>try {
std::string encodedResource;
Poco::URI::encode(resource, " ", encodedResource);

HTTPClientSession session(host, port);
HTTPRequest request(HTTPRequest::HTTP_GET, "/" + encodedResource, HTTPMessage::HTTP_1_1);
HTTPResponse response;
session.sendRequest(request);
std::istream& rs = session.receiveResponse(response);
if (response.getStatus() != Poco::Net::HTTPResponse::HTTP_OK)
return "ERROR";

std::string s(std::istreambuf_iterator<char>(rs), {}); 
return s;
}
catch (Poco::Exception& exc) {
std::cerr << exc.displayText() << std::endl;
return "ERROR";
}</body>
</ownedBehavior>
<ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_SYPeADBwEemdXd9vu5XPZQ" name="httpPostFile" specification="_SYNBwDBwEemdXd9vu5XPZQ">
<language>C++</language>
<body>try {
std::string encodedResource;
Poco::URI::encode(resource, " ", encodedResource);

HTTPRequest request(HTTPRequest::HTTP_POST, "/" + encodedResource, HTTPMessage::HTTP_1_1);
HTMLForm form;
form.setEncoding(HTMLForm::ENCODING_MULTIPART);
form.addPart("file", new FilePartSource(file));
form.prepareSubmit(request);

HTTPClientSession session(host, port);
session.setTimeout(Poco::Timespan(20, 0));
form.write(session.sendRequest(request));

HTTPResponse response;
std::istream& rs = session.receiveResponse(response);
if (response.getStatus() != Poco::Net::HTTPResponse::HTTP_OK)
return "ERROR";

std::string s(std::istreambuf_iterator<char>(rs), {}); 
return s;
}
catch (Poco::Exception& exc) {
std::cerr << exc.displayText() << std::endl;
return "ERROR";
}</body>
</ownedBehavior>
<ownedOperation xmi:id="_pzwv8N6wEeife8wA8rm4kw" name="configureServer" method="_zNHE8N6wEeife8wA8rm4kw">
<ownedParameter xmi:id="_Z6Wx0N6xEeife8wA8rm4kw" name="theHost"/>
<ownedParameter xmi:id="_eOKJUN6xEeife8wA8rm4kw" name="thePort"/>
<ownedParameter xmi:id="_WOmU8N61Eeife8wA8rm4kw" name="return" direction="return">
<type xmi:type="uml:PrimitiveType" href="platform:/plugin/com.ibm.xtools.umldt.rt.cpp.core/libraries/CppPrimitiveDatatypes.emx#_f0877hKyEdyaM9S2zG4bgA?CppPrimitiveDatatypes/void?"/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:id="_0UyMwN6yEeife8wA8rm4kw" name="httpGet" method="_bteDUN6zEeife8wA8rm4kw">
<ownedComment xmi:id="__EOK8N6yEeife8wA8rm4kw" annotatedElement="_0UyMwN6yEeife8wA8rm4kw">
<body><p>Perform an http GET operation on the specified resource. The response string is returned (or "ERROR" in case an error occurs).</p></body>
</ownedComment>
<ownedParameter xmi:id="__aNCAN6yEeife8wA8rm4kw" name="resource"/>
<ownedParameter xmi:id="_VLaEgN6zEeife8wA8rm4kw" name="return" direction="return"/>
</ownedOperation>
<ownedOperation xmi:id="_SYNBwDBwEemdXd9vu5XPZQ" name="httpPostFile" method="_SYPeADBwEemdXd9vu5XPZQ">
<ownedComment xmi:id="_SYNBwTBwEemdXd9vu5XPZQ" annotatedElement="_SYNBwDBwEemdXd9vu5XPZQ">
<body><p>Perform an http POST operation on the specified resource with form data containing a file to upload. The response string is returned (or "ERROR" in case an error occurs).</p></body>
</ownedComment>
<ownedParameter xmi:id="_SYNBwjBwEemdXd9vu5XPZQ" name="resource"/>
<ownedParameter xmi:id="_eNfNsDBwEemdXd9vu5XPZQ" name="file"/>
<ownedParameter xmi:id="_SYNBwzBwEemdXd9vu5XPZQ" name="return" direction="return"/>
</ownedOperation>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_wbBJEN62Eeife8wA8rm4kw" name="HttpServer_In">
<eAnnotations xmi:id="_wbJr8N62Eeife8wA8rm4kw" source="uml2.diagrams" references="_wbKTAN62Eeife8wA8rm4kw">
<contents xmi:type="umlnotation:UMLDiagram" xmi:id="_wbKTAN62Eeife8wA8rm4kw" type="Structure" element="_wbBJEN62Eeife8wA8rm4kw" measurementUnit="Himetric">
<children xmi:type="umlnotation:UMLShape" xmi:id="_wbKTAd62Eeife8wA8rm4kw" type="StructureDiagramFrame" element="_wbBJEN62Eeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" transparency="0" lineColor="14263149" lineWidth="1" showStereotype="Label">
<children xmi:type="umlnotation:UMLShapeCompartment" xmi:id="_wbKTAt62Eeife8wA8rm4kw" type="StructureCompartment"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_wbKTA962Eeife8wA8rm4kw" type="Name"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_wbKTBN62Eeife8wA8rm4kw" x="635" y="635"/>
</children>
</contents>
</eAnnotations>
<ownedComment xmi:id="_5qRKEN66Eeife8wA8rm4kw" annotatedElement="_wbBJEN62Eeife8wA8rm4kw">
<body><p>Incarnate this capsule if you need communication from the HTTP server to the application. Incarnate it into a separate thread since it will make a long-running HTTP GET request that will not terminate until a message is sent from the server to the application.</p></body>
</ownedComment>
<ownedAttribute xmi:type="uml:Port" xmi:id="_b6M68N63Eeife8wA8rm4kw" name="timer" visibility="public" aggregation="composite" isBehavior="true" isService="false">
<type xmi:type="uml:Collaboration" href="platform:/plugin/com.ibm.xtools.umldt.rt.cpp.core/libraries/RTClasses.emx#_18QelrIlEduJc5NEaBCMOw?RTClasses/Timing/Timing?"/>
</ownedAttribute>
<ownedAttribute xmi:id="_eUbFMN64Eeife8wA8rm4kw" name="host" visibility="private"/>
<ownedAttribute xmi:id="_eUbFMd64Eeife8wA8rm4kw" name="port" visibility="private">
<type xmi:type="uml:PrimitiveType" href="platform:/plugin/com.ibm.xtools.umldt.rt.cpp.core/libraries/CppPrimitiveDatatypes.emx#_b5qeIMuSEdy4n9Rh8xcU5g?CppPrimitiveDatatypes/unsigned%20int?"/>
</ownedAttribute>
<ownedAttribute xmi:id="_jmI2cN64Eeife8wA8rm4kw" name="resource" visibility="private"/>
<ownedBehavior xmi:type="uml:StateMachine" xmi:id="_wbEMYN62Eeife8wA8rm4kw" name="State Machine">
<eAnnotations xmi:id="_wbId0N62Eeife8wA8rm4kw" source="uml2.diagrams" references="_wbId0d62Eeife8wA8rm4kw">
<contents xmi:type="umlnotation:UMLDiagram" xmi:id="_wbId0d62Eeife8wA8rm4kw" type="Statechart" element="_wbEMYN62Eeife8wA8rm4kw" measurementUnit="Himetric">
<children xmi:type="umlnotation:UMLFrame" xmi:id="_wbId0t62Eeife8wA8rm4kw" type="Statemachine" element="_wbEMYN62Eeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" bold="true" transparency="0" lineColor="14263149" lineWidth="1" showStereotype="Label" alignment="Horizontal">
<children xmi:type="umlnotation:UMLShapeCompartment" xmi:id="_wbId0962Eeife8wA8rm4kw" type="Region" element="_wbEMYd62Eeife8wA8rm4kw" verticalAlignment="false">
<children xmi:type="umlnotation:UMLShape" xmi:id="_psdJ4N63Eeife8wA8rm4kw" element="_wbEzcN62Eeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" fillColor="15912618" transparency="0" lineColor="15912618" lineWidth="1" showStereotype="Label">
<children xmi:type="notation:DecorationNode" xmi:id="_psdJ4t63Eeife8wA8rm4kw" type="NameLabel">
<children xmi:type="notation:BasicDecorationNode" xmi:id="_psdw8N63Eeife8wA8rm4kw" type="Stereotype"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_psdw8d63Eeife8wA8rm4kw" type="Name"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_psdw8t63Eeife8wA8rm4kw" type="Parent"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_psdJ4963Eeife8wA8rm4kw" y="-149"/>
</children>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_psdJ4d63Eeife8wA8rm4kw" x="4584" y="299"/>
</children>
<children xmi:type="umlnotation:UMLShape" xmi:id="_psdw8963Eeife8wA8rm4kw" element="_wbFagN62Eeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" transparency="0" lineColor="14263149" lineWidth="1" showStereotype="Label">
<children xmi:type="notation:DecorationNode" xmi:id="_psdw9d63Eeife8wA8rm4kw" type="ImageCompartment">
<layoutConstraint xmi:type="notation:Size" xmi:id="_psdw9t63Eeife8wA8rm4kw" width="1320" height="1320"/>
</children>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_pseYAN63Eeife8wA8rm4kw" type="Stereotype"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_pseYAd63Eeife8wA8rm4kw" type="Name"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_pseYAt63Eeife8wA8rm4kw" type="Parent"/>
<children xmi:type="notation:ListCompartment" xmi:id="_pseYA963Eeife8wA8rm4kw" visible="false" type="Activities"/>
<children xmi:type="notation:ListCompartment" xmi:id="_pseYBN63Eeife8wA8rm4kw" visible="false" type="InternalTransitionCompartment"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_psdw9N63Eeife8wA8rm4kw" x="2679" y="2077" height="1417"/>
</children>
</children>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_wbId1N62Eeife8wA8rm4kw" type="Name"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_wbId1d62Eeife8wA8rm4kw" x="635" y="635"/>
</children>
<edges xmi:type="umlnotation:UMLConnector" xmi:id="_pshbUN63Eeife8wA8rm4kw" element="_wbFagd62Eeife8wA8rm4kw" source="_psdJ4N63Eeife8wA8rm4kw" target="_psdw8963Eeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" roundedBendpointsRadius="4" lineColor="8421504" lineWidth="1" showStereotype="Text">
<children xmi:type="notation:DecorationNode" xmi:id="_psiCYN63Eeife8wA8rm4kw" type="TransitionLabelCompartment">
<children xmi:type="notation:BasicDecorationNode" xmi:id="_psiCYt63Eeife8wA8rm4kw" type="Stereotype"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_psiCY963Eeife8wA8rm4kw" type="TransitionLabel"/>
<children xmi:type="notation:ListCompartment" xmi:id="_psiCZN63Eeife8wA8rm4kw" type="Triggers"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_psiCYd63Eeife8wA8rm4kw" y="-149"/>
</children>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pshbUd63Eeife8wA8rm4kw" points="[0, 0, 0, -1270]$[0, 1270, 0, 0]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_psm64N63Eeife8wA8rm4kw" id="(0.4988179669030733,1.0)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_psm64d63Eeife8wA8rm4kw" id="(0.49774774774774777,0.0)"/>
</edges>
<edges xmi:type="umlnotation:UMLConnector" xmi:id="_Ai5WIN64Eeife8wA8rm4kw" element="_Ai3g8N64Eeife8wA8rm4kw" source="_psdw8963Eeife8wA8rm4kw" target="_psdw8963Eeife8wA8rm4kw" fontName="Segoe UI" fontHeight="8" roundedBendpointsRadius="4" lineColor="8421504" lineWidth="1" showStereotype="Text">
<children xmi:type="notation:DecorationNode" xmi:id="_Ai59MN64Eeife8wA8rm4kw" type="TransitionLabelCompartment">
<children xmi:type="notation:BasicDecorationNode" xmi:id="_Ai59Mt64Eeife8wA8rm4kw" type="Stereotype"/>
<children xmi:type="notation:BasicDecorationNode" xmi:id="_Ai59M964Eeife8wA8rm4kw" type="TransitionLabel"/>
<children xmi:type="notation:ListCompartment" xmi:id="_Ai59NN64Eeife8wA8rm4kw" type="Triggers"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ai59Md64Eeife8wA8rm4kw" x="-84" y="677"/>
</children>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Ai5WId64Eeife8wA8rm4kw" points="[42, 0, 21, 551]$[1058, 0, 1037, 551]$[1058, -572, 1037, -21]$[42, -572, 21, -21]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ai9AgN64Eeife8wA8rm4kw" id="(0.9852352352352353,0.6273817925194072)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ai9Agd64Eeife8wA8rm4kw" id="(0.9904904904904905,0.23853211009174313)"/>
</edges>
</contents>
</eAnnotations>
<region xmi:id="_wbEMYd62Eeife8wA8rm4kw" name="Region1">
<subvertex xmi:type="uml:Pseudostate" xmi:id="_wbEzcN62Eeife8wA8rm4kw"/>
<subvertex xmi:type="uml:State" xmi:id="_wbFagN62Eeife8wA8rm4kw" name="WaitForIncomingMessage">
<entry xmi:type="uml:OpaqueBehavior" xmi:id="_-EINoN63Eeife8wA8rm4kw" name="Entry">
<language>C++</language>
<body>waitForIncomingMessage();
</body>
</entry>
</subvertex>
<transition xmi:id="_wbFagd62Eeife8wA8rm4kw" name="Initial" source="_wbEzcN62Eeife8wA8rm4kw" target="_wbFagN62Eeife8wA8rm4kw">
<eAnnotations xmi:id="_wbGBkN62Eeife8wA8rm4kw" source="uml2.alias">
<details xmi:id="_wbGBkd62Eeife8wA8rm4kw" key="Initial"/>
</eAnnotations>
<effect xmi:type="uml:OpaqueBehavior" xmi:id="_VCaxgN68Eeife8wA8rm4kw" name="Effect">
<language>C++</language>
<body>// Configure with default host name and port number. Override this transition to use other values.
configureServer("localhost", 12345, "getMessage");</body>
</effect>
</transition>
<transition xmi:id="_Ai3g8N64Eeife8wA8rm4kw" name="messageReceived" source="_wbFagN62Eeife8wA8rm4kw" target="_wbFagN62Eeife8wA8rm4kw">
<trigger xmi:id="_NzN8sN64Eeife8wA8rm4kw" name="" port="_b6M68N63Eeife8wA8rm4kw">
<event xmi:type="uml:CallEvent" href="platform:/plugin/com.ibm.xtools.umldt.rt.cpp.core/libraries/RTClasses.emx#_18o5ErIlEduJc5NEaBCMOw?RTClasses/Timing/timeout?"/>
</trigger>
</transition>
</region>
</ownedBehavior>
<ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_UhekcN64Eeife8wA8rm4kw" name="waitForIncomingMessage" specification="_Uhd9YN64Eeife8wA8rm4kw">
<language>C++</language>
<body>try {
HTTPClientSession session(host, port);
HTTPRequest request(HTTPRequest::HTTP_GET, "/" + resource, HTTPMessage::HTTP_1_1);
HTTPResponse response; 
session.sendRequest(request);
StreamSocket &str = session.socket(); 
Poco::Timespan ts(600L, 0L); // 10 min timeout
str.setReceiveTimeout(ts);
std::istream& rs = session.receiveResponse(response);
if (response.getStatus() == Poco::Net::HTTPResponse::HTTP_OK) {
std::string s(std::istreambuf_iterator<char>(rs), {});
onMessageReceived(s);
}
}
catch (Poco::Exception& exc) {
std::cerr << "Failed to GET http://" << host << ":" << port << "/" << resource << ": " << exc.displayText() << std::endl << std::flush;
}

timer.informIn(RTTimespec(0,0)); // Schedule the waiting for another message to arrive
</body>
</ownedBehavior>
<ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_VfoucN67Eeife8wA8rm4kw" name="onMessageReceived" specification="_M_U6QN67Eeife8wA8rm4kw">
<language>C++</language>
<body>// Called when a message is received from the HTTP server. Subclasses should override this operation
// to handle the received message.</body>
</ownedBehavior>
<ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_h_LYUN67Eeife8wA8rm4kw" name="configureServer" specification="_h_KxQN67Eeife8wA8rm4kw">
<language>C++</language>
<body>// Called when the server is initialized.
host = theHost;
port = thePort;
resource = theResource;</body>
</ownedBehavior>
<ownedOperation xmi:id="_Uhd9YN64Eeife8wA8rm4kw" name="waitForIncomingMessage" visibility="protected" method="_UhekcN64Eeife8wA8rm4kw">
<ownedParameter xmi:id="_BEsmMN65Eeife8wA8rm4kw" name="return" direction="return">
<type xmi:type="uml:PrimitiveType" href="platform:/plugin/com.ibm.xtools.umldt.rt.cpp.core/libraries/CppPrimitiveDatatypes.emx#_f0877hKyEdyaM9S2zG4bgA?CppPrimitiveDatatypes/void?"/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:id="_M_U6QN67Eeife8wA8rm4kw" name="onMessageReceived" method="_VfoucN67Eeife8wA8rm4kw">
<ownedParameter xmi:id="_WnXLgN67Eeife8wA8rm4kw" name="return" direction="return">
<type xmi:type="uml:PrimitiveType" href="platform:/plugin/com.ibm.xtools.umldt.rt.cpp.core/libraries/CppPrimitiveDatatypes.emx#_f0877hKyEdyaM9S2zG4bgA?CppPrimitiveDatatypes/void?"/>
</ownedParameter>
<ownedParameter xmi:id="_XNWNcN67Eeife8wA8rm4kw" name="msg"/>
</ownedOperation>
<ownedOperation xmi:id="_h_KxQN67Eeife8wA8rm4kw" name="configureServer" method="_h_LYUN67Eeife8wA8rm4kw">
<ownedParameter xmi:id="_h_KxQd67Eeife8wA8rm4kw" name="theHost"/>
<ownedParameter xmi:id="_h_KxQt67Eeife8wA8rm4kw" name="thePort"/>
<ownedParameter xmi:id="_i1eHIN67Eeife8wA8rm4kw" name="theResource"/>
<ownedParameter xmi:id="_h_KxQ967Eeife8wA8rm4kw" name="return" direction="return">
<type xmi:type="uml:PrimitiveType" href="platform:/plugin/com.ibm.xtools.umldt.rt.cpp.core/libraries/CppPrimitiveDatatypes.emx#_f0877hKyEdyaM9S2zG4bgA?CppPrimitiveDatatypes/void?"/>
</ownedParameter>
</ownedOperation>
</packagedElement>
<profileApplication xmi:id="_rx25zNXDEei3BJT-OqdJZA">
<eAnnotations xmi:id="_rx25zdXDEei3BJT-OqdJZA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbnfB2L_5w"/>
</eAnnotations>
<appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
</profileApplication>
<profileApplication xmi:id="_rx25ztXDEei3BJT-OqdJZA">
<eAnnotations xmi:id="_rx25z9XDEei3BJT-OqdJZA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="pathmap://UML2_MSL_PROFILES/Default.epx#_fNwoAAqoEd6-N_NOT9vsCA?Default/Default?"/>
</eAnnotations>
<appliedProfile href="pathmap://UML2_MSL_PROFILES/Default.epx#_a_S3wNWLEdiy4IqP8whjFA?Default?"/>
</profileApplication>
<profileApplication xmi:id="_rx250NXDEei3BJT-OqdJZA">
<eAnnotations xmi:id="_rx250dXDEei3BJT-OqdJZA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="pathmap://UML2_MSL_PROFILES/Deployment.epx#_4OVBUD0TEeKt-L0gyEptgQ?Deployment/Deployment?"/>
</eAnnotations>
<appliedProfile href="pathmap://UML2_MSL_PROFILES/Deployment.epx#_vjbuwOvHEdiDX5bji0iVSA?Deployment?"/>
</profileApplication>
<profileApplication xmi:id="_rx250tXDEei3BJT-OqdJZA">
<eAnnotations xmi:id="_rx2509XDEei3BJT-OqdJZA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="pathmap://CPP_LANGUAGE_PROFILE/CppPropertySets.epx#_5TYAwMk4EeO2m9WtkWjeeQ?CppPropertySets/CppPropertySets?"/>
</eAnnotations>
<appliedProfile href="pathmap://CPP_LANGUAGE_PROFILE/CppPropertySets.epx#_TNvRgL3gEduxAOGdMW1qJA?CppPropertySets?"/>
</profileApplication>
<profileApplication xmi:id="_rx251NXDEei3BJT-OqdJZA">
<eAnnotations xmi:id="_rx251dXDEei3BJT-OqdJZA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="pathmap://RT_PROPERTIES/UMLRealTime.epx#_3TUzoXq6Ed2hSeAAWZznoA?UMLRealTime/UMLRealTime?"/>
</eAnnotations>
<appliedProfile href="pathmap://RT_PROPERTIES/UMLRealTime.epx#_uTDwIRHVEdu19OChlR9tHg?UMLRealTime?"/>
</profileApplication>
<profileApplication xmi:id="_rx251tXDEei3BJT-OqdJZA">
<eAnnotations xmi:id="_rx2519XDEei3BJT-OqdJZA" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="pathmap://RT_PROPERTIES/InteractionProfile.epx#_dDVwwX8wEd2ags_Lr77Vow?InteractionProfile/InteractionProfile?"/>
</eAnnotations>
<appliedProfile href="pathmap://RT_PROPERTIES/InteractionProfile.epx#_LyeQ4HnVEd2No7ra0rEeOg?InteractionProfile?"/>
</profileApplication>
</uml:Package>
<Default:DefaultLanguage xmi:id="_rx252NXDEei3BJT-OqdJZA" base_Package="_rx2SkNXDEei3BJT-OqdJZA" defaultLanguage="C++"/>
<UMLRealTime:Capsule xmi:id="_K_1vwN6wEeife8wA8rm4kw" base_Class="_K_gYkN6wEeife8wA8rm4kw"/>
<CppPropertySets:GeneralOperationProperties xmi:id="_202nsN6wEeife8wA8rm4kw" base_Operation="_pzwv8N6wEeife8wA8rm4kw"/>
<CppPropertySets:GeneralAttributeProperties xmi:id="_A1DhUN6xEeife8wA8rm4kw" base_Property="_6d7AIN6wEeife8wA8rm4kw" nativeType="std::string"/>
<CppPropertySets:GeneralCapsuleProperties xmi:id="_KPjF0N6xEeife8wA8rm4kw" base_Class="_K_gYkN6wEeife8wA8rm4kw">
<headerPreface xmi:id="_fdIkECVhEem0UtZqFR6jHw" body="#include <string>"/>
<implementationPreface xmi:id="_BjC7oB4eEemsy6WLp4yALQ" body="#include "Poco/Net/HTTPClientSession.h"
#include "Poco/Net/HTTPRequest.h"
#include "Poco/Net/HTTPResponse.h"
#include "Poco/Net/HTMLForm.h"
#include "Poco/Net/FilePartSource.h"
#include "Poco/Exception.h"
#include "Poco/URI.h"
#include <iostream>
using Poco::Net::HTTPClientSession;
using Poco::Net::HTTPRequest;
using Poco::Net::HTTPResponse;
using Poco::Net::HTMLForm;
using Poco::Net::FilePartSource;
using Poco::Net::HTTPMessage;
"/>
</CppPropertySets:GeneralCapsuleProperties>
<CppPropertySets:GeneralParameterProperties xmi:id="_byRVsN6xEeife8wA8rm4kw" base_Parameter="_Z6Wx0N6xEeife8wA8rm4kw" nativeType="const std::string&"/>
<CppPropertySets:GeneralParameterProperties xmi:id="_fjLbgN6xEeife8wA8rm4kw" base_Parameter="_eOKJUN6xEeife8wA8rm4kw" nativeType="const unsigned int"/>
<Default:Documentation xmi:id="__EROQN6yEeife8wA8rm4kw" base_Comment="__EOK8N6yEeife8wA8rm4kw"/>
<CppPropertySets:GeneralParameterProperties xmi:id="_AdLh8N6zEeife8wA8rm4kw" base_Parameter="__aNCAN6yEeife8wA8rm4kw" nativeType="const std::string&"/>
<CppPropertySets:GeneralParameterProperties xmi:id="_Y1iz8N6zEeife8wA8rm4kw" base_Parameter="_VLaEgN6zEeife8wA8rm4kw" nativeType="std::string"/>
<UMLRealTime:Capsule xmi:id="_wbHPsN62Eeife8wA8rm4kw" base_Class="_wbBJEN62Eeife8wA8rm4kw"/>
<UMLRealTime:RTPort xmi:id="_HjS2wd64Eeife8wA8rm4kw" isWired="false" base_Port="_b6M68N63Eeife8wA8rm4kw"/>
<CppPropertySets:GeneralAttributeProperties xmi:id="_eUbsQN64Eeife8wA8rm4kw" base_Property="_eUbFMN64Eeife8wA8rm4kw" nativeType="std::string"/>
<CppPropertySets:GeneralAttributeProperties xmi:id="_jmI2cd64Eeife8wA8rm4kw" base_Property="_jmI2cN64Eeife8wA8rm4kw" nativeType="std::string"/>
<Default:Documentation xmi:id="_5qSYMN66Eeife8wA8rm4kw" base_Comment="_5qRKEN66Eeife8wA8rm4kw"/>
<Default:Documentation xmi:id="_AqiH0N67Eeife8wA8rm4kw" base_Comment="_AqgSoN67Eeife8wA8rm4kw"/>
<CppPropertySets:GeneralOperationProperties xmi:id="_Osj4IN67Eeife8wA8rm4kw" base_Operation="_M_U6QN67Eeife8wA8rm4kw" polymorphic="true"/>
<CppPropertySets:GeneralParameterProperties xmi:id="_YvO28N67Eeife8wA8rm4kw" base_Parameter="_XNWNcN67Eeife8wA8rm4kw" nativeType="const std::string&"/>
<CppPropertySets:GeneralOperationProperties xmi:id="_h_LYUd67Eeife8wA8rm4kw" base_Operation="_h_KxQN67Eeife8wA8rm4kw"/>
<CppPropertySets:GeneralParameterProperties xmi:id="_h_LYUt67Eeife8wA8rm4kw" base_Parameter="_h_KxQd67Eeife8wA8rm4kw" nativeType="const std::string&"/>
<CppPropertySets:GeneralParameterProperties xmi:id="_h_L_YN67Eeife8wA8rm4kw" base_Parameter="_h_KxQt67Eeife8wA8rm4kw" nativeType="const unsigned int"/>
<CppPropertySets:GeneralParameterProperties xmi:id="_i1euMN67Eeife8wA8rm4kw" base_Parameter="_i1eHIN67Eeife8wA8rm4kw" nativeType="const std::string&"/>
<CppPropertySets:GeneralCapsuleProperties xmi:id="_pK_XYN6-Eeife8wA8rm4kw" base_Class="_wbBJEN62Eeife8wA8rm4kw">
<headerPreface xmi:id="_pK_XYd6-Eeife8wA8rm4kw" body="#include <iostream>"/>
<implementationPreface xmi:id="_eph1sB42Eem-F63zUfAe3Q" body="#include "Poco/Net/HTTPClientSession.h"
#include "Poco/Net/HTTPRequest.h"
#include "Poco/Net/HTTPResponse.h"
#include "Poco/Net/StreamSocket.h"
#include "Poco/Exception.h"
#include "Poco/Timespan.h"
using Poco::Net::HTTPClientSession;
using Poco::Net::HTTPRequest;
using Poco::Net::HTTPResponse;
using Poco::Net::HTTPMessage;
using Poco::Net::StreamSocket;"/>
</CppPropertySets:GeneralCapsuleProperties>
<Default:Documentation xmi:id="_SYQsIDBwEemdXd9vu5XPZQ" base_Comment="_SYNBwTBwEemdXd9vu5XPZQ"/>
<CppPropertySets:GeneralParameterProperties xmi:id="_SYQsITBwEemdXd9vu5XPZQ" base_Parameter="_SYNBwjBwEemdXd9vu5XPZQ" nativeType="const std::string&"/>
<CppPropertySets:GeneralParameterProperties xmi:id="_SYQsIjBwEemdXd9vu5XPZQ" base_Parameter="_SYNBwzBwEemdXd9vu5XPZQ" nativeType="std::string"/>
<CppPropertySets:GeneralParameterProperties xmi:id="_g3ZPMDBwEemdXd9vu5XPZQ" base_Parameter="_eNfNsDBwEemdXd9vu5XPZQ" nativeType="const std::string&"/>
</xmi:XMI>