public IORTemplateList getIORTemplateList() { IORTemplateList tl = IORFactories.makeIORTemplateList(); tl.add(iorTemplate); tl.makeImmutable(); return tl; } }
/** * Write the state to the OutputStream. */ public void _write(OutputStream os) { org.omg.CORBA_2_3.portable.OutputStream ostr = (org.omg.CORBA_2_3.portable.OutputStream) os; iorTemplates.write(ostr); }
public boolean isEquivalent(IORFactory other) { if (!(other instanceof IORTemplateList)) return false; IORTemplateList list = (IORTemplateList) other; Iterator<Object> thisIterator = iterator(); Iterator<Object> listIterator = list.iterator(); while (thisIterator.hasNext() && listIterator.hasNext()) { IORTemplate thisTemplate = (IORTemplate) thisIterator.next(); IORTemplate listTemplate = (IORTemplate) listIterator.next(); if (!thisTemplate.isEquivalent(listTemplate)) return false; } return thisIterator.hasNext() == listIterator.hasNext(); } }
/** * Construct an IOR from an IORTemplate by applying the same object id to each TaggedProfileTemplate in the * IORTemplate. */ public IORImpl(ORB orb, String typeId, IORTemplate iortemp, ObjectId id) { this(orb, typeId); this.iortemps = IORFactories.makeIORTemplateList(); this.iortemps.add(iortemp); addTaggedProfiles(iortemp, id); makeImmutable(); }
public synchronized void makeImmutable() { makeElementsImmutable(); if (iortemps != null) iortemps.makeImmutable(); super.makeImmutable(); }
private byte[] internalReferenceToId(org.omg.CORBA.Object reference) throws WrongAdapter { IOR ior = ORBUtility.getIOR(reference); IORTemplateList thisTemplate = ior.getIORTemplates(); ObjectReferenceFactory orf = getCurrentFactory(); IORTemplateList poaTemplate = IORFactories.getIORTemplateList(orf); if (!poaTemplate.isEquivalent(thisTemplate)) throw new WrongAdapter(); // Extract the ObjectId from the first TaggedProfile in the IOR. If ior was created in this POA, the same ID was // used for every profile through the profile templates in the currentFactory, so we will get the same result // from any profile. Iterator<Object> iter = ior.iterator(); if (!iter.hasNext()) throw iorWrapper().noProfilesInIor(); TaggedProfile prof = (TaggedProfile) (iter.next()); ObjectId oid = prof.getObjectId(); return oid.getId(); }
public boolean isEquivalent(IORFactory other) { if (!(other instanceof IORTemplateList)) return false; IORTemplateList list = (IORTemplateList) other; Iterator<Object> thisIterator = iterator(); Iterator<Object> listIterator = list.iterator(); while (thisIterator.hasNext() && listIterator.hasNext()) { IORTemplate thisTemplate = (IORTemplate) thisIterator.next(); IORTemplate listTemplate = (IORTemplate) listIterator.next(); if (!thisTemplate.isEquivalent(listTemplate)) return false; } return thisIterator.hasNext() == listIterator.hasNext(); } }
/** * Construct an IOR from an IORTemplate by applying the same object id to each TaggedProfileTemplate in the * IORTemplate. */ public IORImpl(ORB orb, String typeId, IORTemplate iortemp, ObjectId id) { this(orb, typeId); this.iortemps = IORFactories.makeIORTemplateList(); this.iortemps.add(iortemp); addTaggedProfiles(iortemp, id); makeImmutable(); }
public synchronized void makeImmutable() { makeElementsImmutable(); if (iortemps != null) iortemps.makeImmutable(); super.makeImmutable(); }
private byte[] internalReferenceToId(org.omg.CORBA.Object reference) throws WrongAdapter { IOR ior = ORBUtility.getIOR(reference); IORTemplateList thisTemplate = ior.getIORTemplates(); ObjectReferenceFactory orf = getCurrentFactory(); IORTemplateList poaTemplate = IORFactories.getIORTemplateList(orf); if (!poaTemplate.isEquivalent(thisTemplate)) throw new WrongAdapter(); // Extract the ObjectId from the first TaggedProfile in the IOR. If ior was created in this POA, the same ID was // used for every profile through the profile templates in the currentFactory, so we will get the same result // from any profile. Iterator<Object> iter = ior.iterator(); if (!iter.hasNext()) throw iorWrapper().noProfilesInIor(); TaggedProfile prof = (TaggedProfile) (iter.next()); ObjectId oid = prof.getObjectId(); return oid.getId(); }
public IORTemplateList getIORTemplateList() { IORTemplateList tl = IORFactories.makeIORTemplateList(); tl.add(iorTemplate); tl.makeImmutable(); return tl; } }
/** * Construct an IOR from an IORTemplate by applying the same object id to each TaggedProfileTemplate in the * IORTemplate. */ public IORImpl(ORB orb, String typeId, IORTemplateList iortemps, ObjectId id) { this(orb, typeId); this.iortemps = iortemps; Iterator<Object> iter = iortemps.iterator(); while (iter.hasNext()) { IORTemplate iortemp = (IORTemplate) (iter.next()); addTaggedProfiles(iortemp, id); } makeImmutable(); }
/** * Write the state to the OutputStream. */ public void _write(OutputStream os) { org.omg.CORBA_2_3.portable.OutputStream ostr = (org.omg.CORBA_2_3.portable.OutputStream) os; iorTemplates.write(ostr); }
private void initializeIORTemplateList() { // Maps ObjectKeyTemplate to IORTemplate Map<ObjectKeyTemplate, IORTemplate> oktempToIORTemplate = new HashMap<ObjectKeyTemplate, IORTemplate>(); iortemps = IORFactories.makeIORTemplateList(); Iterator<Object> iter = iterator(); ObjectId oid = null; // used to check that all profiles have the same oid. while (iter.hasNext()) { TaggedProfile prof = (TaggedProfile) (iter.next()); TaggedProfileTemplate ptemp = prof.getTaggedProfileTemplate(); ObjectKeyTemplate oktemp = prof.getObjectKeyTemplate(); // Check that all oids for all profiles are the same: if they are not, // throw exception. if (oid == null) oid = prof.getObjectId(); else if (!oid.equals(prof.getObjectId())) throw wrapper.badOidInIorTemplateList(); // Find or create the IORTemplate for oktemp. IORTemplate iortemp = oktempToIORTemplate.get(oktemp); if (iortemp == null) { iortemp = IORFactories.makeIORTemplate(oktemp); oktempToIORTemplate.put(oktemp, iortemp); iortemps.add(iortemp); } iortemp.add(ptemp); } iortemps.makeImmutable(); }
/** * Construct an IOR from an IORTemplate by applying the same object id to each TaggedProfileTemplate in the * IORTemplate. */ public IORImpl(ORB orb, String typeId, IORTemplateList iortemps, ObjectId id) { this(orb, typeId); this.iortemps = iortemps; Iterator<Object> iter = iortemps.iterator(); while (iter.hasNext()) { IORTemplate iortemp = (IORTemplate) (iter.next()); addTaggedProfiles(iortemp, id); } makeImmutable(); }
private void initializeIORTemplateList() { // Maps ObjectKeyTemplate to IORTemplate Map<ObjectKeyTemplate, IORTemplate> oktempToIORTemplate = new HashMap<ObjectKeyTemplate, IORTemplate>(); iortemps = IORFactories.makeIORTemplateList(); Iterator<Object> iter = iterator(); ObjectId oid = null; // used to check that all profiles have the same oid. while (iter.hasNext()) { TaggedProfile prof = (TaggedProfile) (iter.next()); TaggedProfileTemplate ptemp = prof.getTaggedProfileTemplate(); ObjectKeyTemplate oktemp = prof.getObjectKeyTemplate(); // Check that all oids for all profiles are the same: if they are not, // throw exception. if (oid == null) oid = prof.getObjectId(); else if (!oid.equals(prof.getObjectId())) throw wrapper.badOidInIorTemplateList(); // Find or create the IORTemplate for oktemp. IORTemplate iortemp = oktempToIORTemplate.get(oktemp); if (iortemp == null) { iortemp = IORFactories.makeIORTemplate(oktemp); oktempToIORTemplate.put(oktemp, iortemp); iortemps.add(iortemp); } iortemp.add(ptemp); } iortemps.makeImmutable(); }