/** * locate an agent giving a transaction Image * @param b a transaction image * @return given agent * @exception CardAgentNotFoundException */ synchronized public static CardAgent getAgent (byte[] b) throws CardAgentNotFoundException { try { ByteArrayInputStream i = new ByteArrayInputStream (b); ObjectInputStream o = new ObjectInputStream (i); int id = o.readInt(); return getAgent (id); } catch (Exception e) { } throw new CardAgentNotFoundException (); }
protected void stopService () throws Exception { CardAgentLookup.remove ((CardAgent) getObject ()); } }
protected void startService () throws Exception { Object obj = getObject(); if (obj instanceof Configurable) { QFactory factory = getServer().getFactory(); Element e = getPersist (); ((Configurable)obj).setConfiguration ( factory.getConfiguration (e) ); } CardAgentLookup.add ((CardAgent) getObject ()); } protected void stopService () throws Exception {