Produced by Araxis Merge on 6/11/2019 10:54:16 AM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\service\jms | WrappedObjectBuilder.java | Wed May 29 15:26:02 2019 UTC |
| 2 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\service\jms | WrappedObjectBuilder.java | Mon Jun 10 19:30:05 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 122 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | // Created May 24, 2 005 10:51: 25 AM | |
| 2 | ||
| 3 | /********* ********** ********** ********** ********** ********** ********* | |
| 4 | * Copyrii ght 2005 V HA. All ri ghts reser ved | |
| 5 | ********* ********** ********** ********** ********** ********** *********/ | |
| 6 | ||
| 7 | package go v.va.med.f w.service. jms; | |
| 8 | ||
| 9 | import jav a.io.Seria lizable; | |
| 10 | import jav a.util.Enu meration; | |
| 11 | import jav a.util.Has hMap; | |
| 12 | import jav a.util.Map ; | |
| 13 | ||
| 14 | import jav ax.jms.JMS Exception; | |
| 15 | import jav ax.jms.Map Message; | |
| 16 | import jav ax.jms.Mes sage; | |
| 17 | import jav ax.jms.Obj ectMessage ; | |
| 18 | import jav ax.jms.Tex tMessage; | |
| 19 | ||
| 20 | import gov .va.med.fw .util.buil der.Abstra ctBuilder; | |
| 21 | import gov .va.med.fw .util.buil der.Builde rException ; | |
| 22 | ||
| 23 | /** | |
| 24 | * Simple wrapper wh en "buildi ng" implie s simply g etting the payload i n a JMS | |
| 25 | * Message . | |
| 26 | * | |
| 27 | * @author DNS DN S
|
|
| 28 | */ | |
| 29 | public cla ss Wrapped ObjectBuil der extend s Abstract Builder { | |
| 30 | /* * | |
| 31 | * An instan ce of seri alVersionU ID | |
| 32 | * / | |
| 33 | pr ivate stat ic final l ong serial VersionUID = -741040 6623154234 070L; | |
| 34 | ||
| 35 | pu blic Objec t build(JM SMetaData meta) thro ws Builder Exception { | |
| 36 | retu rn getWrap pedObject( meta.getJM SMessage() ); | |
| 37 | } | |
| 38 | ||
| 39 | pu blic stati c Object g etWrappedO bject(Mess age msg) t hrows Buil derExcepti on { | |
| 40 | try { | |
| 41 | if (ms g instance of ObjectM essage) | |
| 42 | return ( (ObjectMes sage) msg) .getObject (); | |
| 43 | else i f (msg ins tanceof Te xtMessage) | |
| 44 | return ( (TextMessa ge) msg).g etText(); | |
| 45 | else i f (msg ins tanceof Ma pMessage) { | |
| 46 | // rebui ld the Map | |
| 47 | Map<Stri ng, Serial izable> da ta = new H ashMap<Str ing, Seria lizable>() ; | |
| 48 | Enumerat ion mapNam es = ((Map Message) m sg).getMap Names(); | |
| 49 | String k ey = null; | |
| 50 | while (m apNames.ha sMoreEleme nts()) { | |
| 51 | key = (Str ing) mapNa mes.nextEl ement(); | |
| 52 | data.put(k ey, (Seria lizable) ( (MapMessag e) msg).ge tObject(ke y)); | |
| 53 | } | |
| 54 | return d ata; | |
| 55 | } else | |
| 56 | throw ne w BuilderE xception( | |
| 57 | "T he JMS Mes sage is no t capable of having a wrapped Object"); | |
| 58 | } ca tch (JMSEx ception e) { | |
| 59 | throw new Builde rException ("Exceptio n while ge tting wrap ped Object ", e); | |
| 60 | } | |
| 61 | } | |
| 62 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.