private void addTaggedProfiles(IORTemplate iortemp, ObjectId id) { ObjectKeyTemplate oktemp = iortemp.getObjectKeyTemplate(); Iterator<Object> templateIterator = iortemp.iterator(); while (templateIterator.hasNext()) { TaggedProfileTemplate ptemp = (TaggedProfileTemplate) (templateIterator.next()); TaggedProfile profile = ptemp.create(oktemp, id); add(profile); } }
/** * 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; iorTemplate.write(ostr); }
public String server_id() { int val = iorTemplate.getObjectKeyTemplate().getServerId(); return Integer.toString(val); }
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(); } }
final public void initializeTemplate(ObjectKeyTemplate oktemp, boolean notifyORB, Policies policies, String codebase, String objectAdapterManagerId, ObjectAdapterId objectAdapterId) { adapterId = oktemp.getAdapterId(); iortemp = IORFactories.makeIORTemplate(oktemp); // This calls acceptors which create profiles and may // add tagged components to those profiles. orb.getCorbaTransportManager().addToIORTemplate(iortemp, policies, codebase, objectAdapterManagerId, objectAdapterId); adapterTemplate = IORFactories.makeObjectReferenceTemplate(orb, iortemp); currentFactory = adapterTemplate; if (notifyORB) { PIHandler pih = orb.getPIHandler(); if (pih != null) // This runs the IORInterceptors. pih.objectAdapterCreated(this); } iortemp.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(); }
public String orb_id() { return iorTemplate.getObjectKeyTemplate().getORBId(); }
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(); } }
final public void initializeTemplate(ObjectKeyTemplate oktemp, boolean notifyORB, Policies policies, String codebase, String objectAdapterManagerId, ObjectAdapterId objectAdapterId) { adapterId = oktemp.getAdapterId(); iortemp = IORFactories.makeIORTemplate(oktemp); // This calls acceptors which create profiles and may // add tagged components to those profiles. orb.getCorbaTransportManager().addToIORTemplate(iortemp, policies, codebase, objectAdapterManagerId, objectAdapterId); adapterTemplate = IORFactories.makeObjectReferenceTemplate(orb, iortemp); currentFactory = adapterTemplate; if (notifyORB) { PIHandler pih = orb.getPIHandler(); if (pih != null) // This runs the IORInterceptors. pih.objectAdapterCreated(this); } iortemp.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(); }
private void addTaggedProfiles(IORTemplate iortemp, ObjectId id) { ObjectKeyTemplate oktemp = iortemp.getObjectKeyTemplate(); Iterator<Object> templateIterator = iortemp.iterator(); while (templateIterator.hasNext()) { TaggedProfileTemplate ptemp = (TaggedProfileTemplate) (templateIterator.next()); TaggedProfile profile = ptemp.create(oktemp, id); add(profile); } }
public String server_id() { int val = iorTemplate.getObjectKeyTemplate().getServerId(); return Integer.toString(val); }
/** * 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; iorTemplate.write(ostr); }
public boolean isEquivalent(IORFactory other) { if (!(other instanceof IORTemplate)) return false; IORTemplate list = (IORTemplate) other; Iterator<Object> thisIterator = iterator(); Iterator<Object> listIterator = list.iterator(); while (thisIterator.hasNext() && listIterator.hasNext()) { TaggedProfileTemplate thisTemplate = (TaggedProfileTemplate) thisIterator.next(); TaggedProfileTemplate listTemplate = (TaggedProfileTemplate) listIterator.next(); if (!thisTemplate.isEquivalent(listTemplate)) return false; } return (thisIterator.hasNext() == listIterator.hasNext()) && getObjectKeyTemplate().equals(list.getObjectKeyTemplate()); }
public String orb_id() { return iorTemplate.getObjectKeyTemplate().getORBId(); }
public void write(OutputStream os) { os.write_long(size()); Iterator<Object> iter = iterator(); while (iter.hasNext()) { IORTemplate iortemp = (IORTemplate) (iter.next()); iortemp.write(os); } }
public boolean isEquivalent(IORFactory other) { if (!(other instanceof IORTemplate)) return false; IORTemplate list = (IORTemplate) other; Iterator<Object> thisIterator = iterator(); Iterator<Object> listIterator = list.iterator(); while (thisIterator.hasNext() && listIterator.hasNext()) { TaggedProfileTemplate thisTemplate = (TaggedProfileTemplate) thisIterator.next(); TaggedProfileTemplate listTemplate = (TaggedProfileTemplate) listIterator.next(); if (!thisTemplate.isEquivalent(listTemplate)) return false; } return (thisIterator.hasNext() == listIterator.hasNext()) && getObjectKeyTemplate().equals(list.getObjectKeyTemplate()); }
public String[] adapter_name() { ObjectAdapterId poaid = iorTemplate.getObjectKeyTemplate().getObjectAdapterId(); return poaid.getAdapterName(); }
public void write(OutputStream os) { os.write_long(size()); Iterator<Object> iter = iterator(); while (iter.hasNext()) { IORTemplate iortemp = (IORTemplate) (iter.next()); iortemp.write(os); } }
public String[] adapter_name() { ObjectAdapterId poaid = iorTemplate.getObjectKeyTemplate().getObjectAdapterId(); return poaid.getAdapterName(); }