1 24 package com.scalagent.kjoram.jms; 25 26 import com.scalagent.kjoram.excepts.MomException; 27 import java.util.Hashtable ; 28 import java.util.Enumeration ; 29 30 31 35 public class MomExceptionReply extends AbstractJmsReply 36 { 37 38 private MomException momExcept; 39 40 46 public MomExceptionReply(int correlationId, MomException momExcept) 47 { 48 super(correlationId); 49 this.momExcept = momExcept; 50 } 51 52 57 public MomExceptionReply(MomException momExcept) 58 { 59 this.momExcept = momExcept; 60 } 61 62 63 64 public MomException getException() 65 { 66 return momExcept; 67 } 68 69 73 public Hashtable soapCode() { 74 Hashtable h = super.soapCode(); 75 if (momExcept != null) 76 h.put("momExcept",momExcept.getMessage()); 77 return h; 78 } 79 80 84 public static Object soapDecode(Hashtable h) { 85 return new MomExceptionReply( 86 ((Integer ) h.get("correlationId")).intValue(), 87 new MomException((String ) h.get("momExcept"))); 88 } 89 } 90 | Popular Tags |