public void close() { if (ssp != null) { ssp.removeListener (key, this); ssp = null; } } }
public void stopService () { listenerRegistered = false; sp.removeListener (in, this); } public void destroyService () {
@Override public void stopService () { if (server != null) { server.shutdown (); sp.removeListener(inQueue, this); } } @Override
public void setConfiguration (Configuration cfg) { if (this.cfg != null) sp.removeListener (from, this); this.cfg = cfg; from = cfg.get ("from"); to = cfg.get ("to"); sp.addListener (from, this); } public void notify (Object key, Object value) {
@Override public void notify(String key, ISOMsg m) { sp.removeListener(this.key, this); ISOSource source = (ISOSource) isp.inp (key); if (m != null && source != null && source.isConnected()) { try { source.send((ISOMsg) m.clone()); sp.inp(key); // actually pick it } catch (Exception e) { Q2.getQ2().getLog().warn(e); } } } }