public void write(ObjectId id, OutputStream os) { byte[] key = id.getId(); os.write_octet_array(key, 0, key.length); }
public void write(ObjectId objectId, OutputStream os) { writeTemplate(os); objectId.write(os); }
public void write(ObjectId id, OutputStream os) { byte[] key = id.getId(); os.write_octet_array(key, 0, key.length); }
public void write(ObjectId objectId, OutputStream os) { writeTemplate(os); objectId.write(os); }
public CorbaServerRequestDispatcher getServerRequestDispatcher(ORB orb, ObjectId id) { byte[] bid = id.getId(); String str = new String(bid); return orb.getRequestDispatcherRegistry().getServerRequestDispatcher(str); } }
public CorbaServerRequestDispatcher getServerRequestDispatcher(ORB orb, ObjectId id) { byte[] bid = id.getId(); String str = new String(bid); return orb.getRequestDispatcherRegistry().getServerRequestDispatcher(str); } }
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(); }
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(); }
/** * Return the servant for this IOR, if it is local AND if the OA that implements this objref supports direct access * to servants outside of an invocation. XXX revisit: do we want this at all? If we do, it might move to the * ObjectKeyTemplate instead. */ public java.lang.Object getServant() { if (!isLocal()) return null; RequestDispatcherRegistry scr = orb.getRequestDispatcherRegistry(); ObjectAdapterFactory oaf = scr.getObjectAdapterFactory(oktemp.getSubcontractId()); ObjectAdapterId oaid = oktemp.getObjectAdapterId(); ObjectAdapter oa = null; try { oa = oaf.find(oaid); } catch (SystemException exc) { // Could not find the OA, so just return null. This usually happens when POAs are being deleted, and the POA // always return null for getLocalServant anyway. wrapper.getLocalServantFailure(exc, oaid.toString()); return null; } byte[] boid = oid.getId(); java.lang.Object servant = oa.getLocalServant(boid); return servant; }
/** * Return the servant for this IOR, if it is local AND if the OA that implements this objref supports direct access * to servants outside of an invocation. XXX revisit: do we want this at all? If we do, it might move to the * ObjectKeyTemplate instead. */ public java.lang.Object getServant() { if (!isLocal()) return null; RequestDispatcherRegistry scr = orb.getRequestDispatcherRegistry(); ObjectAdapterFactory oaf = scr.getObjectAdapterFactory(oktemp.getSubcontractId()); ObjectAdapterId oaid = oktemp.getObjectAdapterId(); ObjectAdapter oa = null; try { oa = oaf.find(oaid); } catch (SystemException exc) { // Could not find the OA, so just return null. This usually happens when POAs are being deleted, and the POA // always return null for getLocalServant anyway. wrapper.getLocalServantFailure(exc, oaid.toString()); return null; } byte[] boid = oid.getId(); java.lang.Object servant = oa.getLocalServant(boid); return servant; }