/** * Read the data into a (presumably) empty ORTImpl. This sets the orb to the ORB of the InputStream. */ public void _read(InputStream is) { org.omg.CORBA_2_3.portable.InputStream istr = (org.omg.CORBA_2_3.portable.InputStream) is; iorTemplate = IORFactories.makeIORTemplate(istr); orb = (ORB) (istr.orb()); }
/** * Read the data into a (presumably) empty ObjectReferenceFactoryImpl. This sets the orb to the ORB of the * InputStream. */ public void _read(InputStream is) { org.omg.CORBA_2_3.portable.InputStream istr = (org.omg.CORBA_2_3.portable.InputStream) is; iorTemplates = IORFactories.makeIORTemplateList(istr); }
public ObjectKey getObjectKey() { ObjectKey result = IORFactories.makeObjectKey(oktemp, oid); return result; }
public void read(org.omg.CORBA.portable.InputStream istream) { super.read(istream); this.request_id = istream.read_ulong(); this.reply_status = istream.read_long(); isValidReplyStatus(this.reply_status); // raises exception on error // The code below reads the reply body if status is OBJECT_FORWARD if (this.reply_status == OBJECT_FORWARD) { CDRInputStream cdr = (CDRInputStream) istream; this.ior = IORFactories.makeIOR(cdr); } }
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 org.omg.CORBA.Object make_object(String repositoryId, byte[] objectId) { ObjectId oid = IORFactories.makeObjectId(objectId); IOR ior = getIORFactory().makeIOR(orb, repositoryId, oid); return ORBUtility.makeObjectReference(ior); } }
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 void read(org.omg.CORBA.portable.InputStream istream) { super.read(istream); this.request_id = istream.read_ulong(); this.reply_status = istream.read_long(); isValidReplyStatus(this.reply_status); // raises exception on error // The code below reads the reply body if status is OBJECT_FORWARD if (this.reply_status == OBJECT_FORWARD) { CDRInputStream cdr = (CDRInputStream) istream; this.ior = IORFactories.makeIOR(cdr); } }
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 org.omg.CORBA.Object make_object(String repositoryId, byte[] objectId) { ObjectId oid = IORFactories.makeObjectId(objectId); IOR ior = getIORFactory().makeIOR(orb, repositoryId, oid); return ORBUtility.makeObjectReference(ior); } }
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 void read(org.omg.CORBA.portable.InputStream istream) { super.read(istream); this.request_id = istream.read_ulong(); this.locate_status = istream.read_long(); isValidReplyStatus(this.locate_status); // raises exception on error // The code below reads the reply body if status is OBJECT_FORWARD if (this.locate_status == OBJECT_FORWARD) { CDRInputStream cdr = (CDRInputStream) istream; this.ior = IORFactories.makeIOR(cdr); } }
/** * Read the data into a (presumably) empty ObjectReferenceFactoryImpl. This sets the orb to the ORB of the * InputStream. */ public void _read(InputStream is) { org.omg.CORBA_2_3.portable.InputStream istr = (org.omg.CORBA_2_3.portable.InputStream) is; iorTemplates = IORFactories.makeIORTemplateList(istr); }
/** * Read the data into a (presumably) empty ORTImpl. This sets the orb to the ORB of the InputStream. */ public void _read(InputStream is) { org.omg.CORBA_2_3.portable.InputStream istr = (org.omg.CORBA_2_3.portable.InputStream) is; iorTemplate = IORFactories.makeIORTemplate(istr); orb = (ORB) (istr.orb()); }
public ObjectKey getObjectKey() { ObjectKey result = IORFactories.makeObjectKey(oktemp, oid); return result; }
public void read(org.omg.CORBA.portable.InputStream istream) { super.read(istream); this.request_id = istream.read_ulong(); this.locate_status = istream.read_long(); isValidReplyStatus(this.locate_status); // raises exception on error // The code below reads the reply body if status is OBJECT_FORWARD if (this.locate_status == OBJECT_FORWARD) { CDRInputStream cdr = (CDRInputStream) istream; this.ior = IORFactories.makeIOR(cdr); } }
public IORTemplateList getIORTemplateList() { IORTemplateList tl = IORFactories.makeIORTemplateList(); tl.add(iorTemplate); tl.makeImmutable(); return tl; } }
public IORTemplateListImpl(InputStream is) { this(); int size = is.read_long(); for (int ctr = 0; ctr < size; ctr++) { IORTemplate iortemp = IORFactories.makeIORTemplate(is); add(iortemp); } makeImmutable(); }