public static Rfh2Header wrap(MbMessage msg, boolean readOnly) throws MbException { MbElement elm = msg.getRootElement().getFirstElementByPath("/MQRFH2"); if (elm == null) { throw new NiceMbException("Failed to find Rfh2Header"); } return new Rfh2Header(elm, readOnly); }
public static Rfh2Header remove(MbMessage msg) throws MbException { MbElement elm = msg.getRootElement().getFirstElementByPath("/MQRFH2"); if (elm != null) { elm.detach(); return new Rfh2Header(elm, true); } else { throw new NiceMbException("Failed to find Rfh2Header"); } }
public static boolean has(MbMessage msg) throws MbException { MbElement elm = msg.getRootElement().getFirstElementByPath("/MQRFH2"); return elm != null; }