protected Servant internalKeyToServant(ActiveObjectMap.Key key) { AOMEntry entry = activeObjectMap.get(key); if (entry == null) return null; return activeObjectMap.getServant(entry); }
private AOMEntry enterEntry(ActiveObjectMap.Key key) { AOMEntry result = null; boolean failed; do { failed = false; result = activeObjectMap.get(key); try { result.enter(); } catch (Exception exc) { failed = true; } } while (failed); return result; }
protected Servant internalKeyToServant(ActiveObjectMap.Key key) { AOMEntry entry = activeObjectMap.get(key); if (entry == null) return null; return activeObjectMap.getServant(entry); }
private AOMEntry enterEntry(ActiveObjectMap.Key key) { AOMEntry result = null; boolean failed; do { failed = false; result = activeObjectMap.get(key); try { result.enter(); } catch (Exception exc) { failed = true; } } while (failed); return result; }
public Servant idToServant(byte[] id) throws WrongPolicy, ObjectNotActive { ActiveObjectMap.Key key = new ActiveObjectMap.Key(id); AOMEntry entry = activeObjectMap.get(key); Servant servant = activeObjectMap.getServant(entry); if (servant != null) return servant; else throw new ObjectNotActive(); } }
public void returnServant() { OAInvocationInfo info = orb.peekInvocationInfo(); byte[] id = info.id(); ActiveObjectMap.Key key = new ActiveObjectMap.Key(id); AOMEntry entry = activeObjectMap.get(key); entry.exit(); }
public Servant idToServant(byte[] id) throws WrongPolicy, ObjectNotActive { ActiveObjectMap.Key key = new ActiveObjectMap.Key(id); AOMEntry entry = activeObjectMap.get(key); Servant servant = activeObjectMap.getServant(entry); if (servant != null) return servant; else throw new ObjectNotActive(); } }
public void returnServant() { OAInvocationInfo info = orb.peekInvocationInfo(); byte[] id = info.id(); ActiveObjectMap.Key key = new ActiveObjectMap.Key(id); AOMEntry entry = activeObjectMap.get(key); entry.exit(); }
public Servant deactivateObject(ActiveObjectMap.Key key) throws ObjectNotActive, WrongPolicy { if (orb.poaDebugFlag) { ORBUtility.dprint(this, "Calling deactivateObject for key " + key); } try { AOMEntry entry = activeObjectMap.get(key); if (entry == null) throw new ObjectNotActive(); Servant s = activeObjectMap.getServant(entry); if (s == null) throw new ObjectNotActive(); if (orb.poaDebugFlag) { System.out.println("Deactivating object " + s + " with POA " + poa); } deactivateHelper(key, entry, s); return s; } finally { if (orb.poaDebugFlag) { ORBUtility.dprint(this, "Exiting deactivateObject"); } } }
public final void activateObject(byte[] id, Servant servant) throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive { if (isUnique && activeObjectMap.contains(servant)) throw new ServantAlreadyActive(); ActiveObjectMap.Key key = new ActiveObjectMap.Key(id); // Note that this can't happen for system assigned IDs since the POA never hands out the same ID. However, we // make this redundant check here to share the code. if (activeObjectMap.containsKey(key)) throw new ObjectAlreadyActive(); AOMEntry entry = activeObjectMap.get(key); entry.activateObject(); activateServant(key, entry, servant); }
public Servant deactivateObject(ActiveObjectMap.Key key) throws ObjectNotActive, WrongPolicy { if (orb.poaDebugFlag) { ORBUtility.dprint(this, "Calling deactivateObject for key " + key); } try { AOMEntry entry = activeObjectMap.get(key); if (entry == null) throw new ObjectNotActive(); Servant s = activeObjectMap.getServant(entry); if (s == null) throw new ObjectNotActive(); if (orb.poaDebugFlag) { System.out.println("Deactivating object " + s + " with POA " + poa); } deactivateHelper(key, entry, s); return s; } finally { if (orb.poaDebugFlag) { ORBUtility.dprint(this, "Exiting deactivateObject"); } } }
public final void activateObject(byte[] id, Servant servant) throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive { if (isUnique && activeObjectMap.contains(servant)) throw new ServantAlreadyActive(); ActiveObjectMap.Key key = new ActiveObjectMap.Key(id); // Note that this can't happen for system assigned IDs since the POA never hands out the same ID. However, we // make this redundant check here to share the code. if (activeObjectMap.containsKey(key)) throw new ObjectAlreadyActive(); AOMEntry entry = activeObjectMap.get(key); entry.activateObject(); activateServant(key, entry, servant); }
AOMEntry entry = activeObjectMap.get(key); Servant servant = activeObjectMap.getServant(entry); if (servant != null)
AOMEntry entry = activeObjectMap.get(key); Servant servant = activeObjectMap.getServant(entry); if (servant != null)