@Override public void endElement(String namespaceURI, String localName, String qName) { Map<Integer, ISOFieldPackager> m; if (localName.equals("isopackager")) { m = (Map) fieldStack.pop(); setFieldPackager(makeFieldArray(m)); } if (localName.equals("isofieldpackager")) { // Pop the 4 entries off the stack in the correct order m = (Map) fieldStack.pop(); ISOBasePackager msgPackager = (ISOBasePackager) fieldStack.pop(); msgPackager.setFieldPackager(makeFieldArray(m)); ISOFieldPackager fieldPackager = (ISOFieldPackager) fieldStack.pop(); Integer fno = (Integer) fieldStack.pop(); msgPackager.setLogger(getLogger(), getRealm() + "-fld-" + fno); // Create the ISOMsgField packager with the retrieved msg and field Packagers ISOMsgFieldPackager mfp = new ISOMsgFieldPackager(fieldPackager, msgPackager); // Add the newly created ISOMsgField packager to the // lower level field stack m = (Map) fieldStack.peek(); m.put(fno, mfp); } }
@Override public void setLogger(Logger logger, String realm) { super.setLogger(logger, realm); if (fld != null) { for (int i = 0; i < fld.length; i++) { if (fld[i] instanceof ISOMsgFieldPackager) { Object o = ((ISOMsgFieldPackager) fld[i]).getISOMsgPackager(); if (o instanceof LogSource) { ((LogSource) o).setLogger(logger, realm + "-fld-" + i); } } } } }