Example #1
0
	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);
	}
Example #2
0
	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");
		}		
	}
Example #3
0
	public static boolean has(MbMessage msg) throws MbException {
		MbElement elm = msg.getRootElement().getFirstElementByPath("/MQRFH2");
		return elm != null;
	}