use of org.jpos.iso.ISORequestListener in project jPOS by jpos.
the class QMUXTest method testRemoveISORequestListener1.
@Test
public void testRemoveISORequestListener1() throws Throwable {
QMUX qMUX = new QMUX();
ISORequestListener l = new Connector();
qMUX.addISORequestListener(l);
boolean result = qMUX.removeISORequestListener(l);
assertEquals("qMUX.listeners.size()", 0, qMUX.listeners.size());
assertFalse("qMUX.listeners.contains(l)", qMUX.listeners.contains(l));
assertTrue("result", result);
}
use of org.jpos.iso.ISORequestListener in project jPOS by jpos.
the class QServer method addListeners.
private void addListeners() throws ConfigurationException {
QFactory factory = getFactory();
Iterator iter = getPersist().getChildren("request-listener").iterator();
while (iter.hasNext()) {
Element l = (Element) iter.next();
ISORequestListener listener = (ISORequestListener) factory.newInstance(l.getAttributeValue("class"));
factory.setLogger(listener, l);
factory.setConfiguration(listener, l);
server.addISORequestListener(listener);
}
}