protected static void checkNotLocal(org.omg.CORBA.Object obj) throws WrongAdapter { if (obj instanceof org.omg.CORBA.LocalObject) { throw new WrongAdapter ("Local object"); } }
public static org.omg.PortableServer.POAPackage.WrongAdapter read (org.omg.CORBA.portable.InputStream istream) { org.omg.PortableServer.POAPackage.WrongAdapter value = new org.omg.PortableServer.POAPackage.WrongAdapter (); // read and discard the repository ID istream.read_string (); return value; }
public static org.omg.PortableServer.POAPackage.WrongAdapter read (final org.omg.CORBA.portable.InputStream in) { String id = in.read_string(); if (!id.equals(id())) throw new org.omg.CORBA.MARSHAL("wrong id: " + id); final org.omg.PortableServer.POAPackage.WrongAdapter result = new org.omg.PortableServer.POAPackage.WrongAdapter(id); return result; } public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.PortableServer.POAPackage.WrongAdapter s)
public static org.omg.PortableServer.POAPackage.WrongAdapter read (final org.omg.CORBA.portable.InputStream in) { String id = in.read_string(); if (!id.equals(id())) throw new org.omg.CORBA.MARSHAL("wrong id: " + id); final org.omg.PortableServer.POAPackage.WrongAdapter result = new org.omg.PortableServer.POAPackage.WrongAdapter(id); return result; } public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.PortableServer.POAPackage.WrongAdapter s)
public static WrongAdapter read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) throw new org.omg.CORBA.MARSHAL(); WrongAdapter _ob_v = new WrongAdapter(); return _ob_v; }
); throw new WrongAdapter(); "reference_to_id: oid not previously generated!"); throw new WrongAdapter(); "reference_to_id: reference not previously generated for this POA!"); throw new WrongAdapter();
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(); }
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 iter = ior.iterator() ; if (!iter.hasNext()) throw iorWrapper().noProfilesInIor() ; TaggedProfile prof = (TaggedProfile)(iter.next()) ; ObjectId oid = prof.getObjectId() ; return oid.getId(); }
throw new WrongAdapter();
); throw new WrongAdapter(); "reference_to_servant: oid not previously generated!"); throw new WrongAdapter(); "reference_to_id: reference not previously generated for this POA!"); throw new WrongAdapter();