public boolean isConnected() { if (running() && ready != null && ready.length > 0) { for (String aReady : ready) if (sp.rdp(aReady) != null) return true; return false; } return running(); } public void dump (PrintStream p, String indent) {
public void notify(String key, Object value) { if ( sp1.rdp(key) == null) sp2.out("lost-entry", value); } }
public static LocalSpace getSpace (String spaceName) { String key = "jpos:space/"+spaceName; Object obj = getSpace().rdp (key); Space sp = getSpace(); if (obj == null) { synchronized (TransientSpace.class) { obj = sp.rdp (key); if (obj == null) { obj = new TransientSpace (); sp.out (key, obj); } } } return (LocalSpace) obj; } /**
public void request (ISOMsg m, long timeout, ISOResponseListener rl, Object handBack) throws ISOException { String key = getKey (m); String req = key + ".req"; synchronized (isp) { if (isp.rdp (req) != null) throw new ISOException ("Duplicate key '" + req + "' detected."); m.setDirection(0); AsyncRequest ar = new AsyncRequest (rl, handBack); synchronized (ar) { if (timeout > 0) ar.setFuture(getScheduledThreadPoolExecutor().schedule(ar, timeout, TimeUnit.MILLISECONDS)); } isp.out (req, ar, timeout); } if (timeout > 0) sp.out (out, m, timeout); else sp.out (out, m); synchronized (this) { tx++; rxPending++; } } public void notify (Object k, Object value) {
String req = key + ".req"; synchronized (isp) { if (isp.rdp (req) != null) throw new ISOException ("Duplicate key '" + req + "' detected"); isp.out (req, m);