/** * Create an IOR passing an ETF Profile. */ // This is a public function - do not remove. public static IOR createObjectIOR(org.omg.ETF.Profile profile) { return createObjectIOR((ORBSingleton)org.omg.CORBA.ORBSingleton.init(), profile); }
@Override public boolean is_equivalent(org.omg.CORBA.Object self, org.omg.CORBA.Object obj) { checkORB(); boolean result = true; if (self != obj) { ParsedIOR pior1 = new ParsedIOR( orb, obj.toString() ); ParsedIOR pior2 = new ParsedIOR( orb, self.toString() ); result = pior2.getIDString().equals( pior1.getIDString() ); } return result; }
/** * Creates a new <code>ParsedIOR</code> instance. * @param orb an <code>org.jacorb.orb.ORB</code> value * @param ior an <code>IOR</code> value */ public ParsedIOR( org.jacorb.orb.ORB orb, IOR ior ) { this(orb); decode( ior ); }
public Profile getNextEffectiveProfile() { effectiveProfile = getProfileSelector().selectNextProfile (profiles, effectiveProfile); if (effectiveProfile != null && effectiveProfile != getLastUsedProfile()) { cs_info = (CodeSetComponentInfo) getComponent (TAG_CODE_SETS.value, CodeSetComponentInfoHelper.class); orbTypeId = getLongComponent (TAG_ORB_TYPE.value); } return effectiveProfile; }
private void setEffectiveProfile () { effectiveProfile = getProfileSelector().selectProfile (profiles, orb.getClientConnectionManager()); lastUsedProfile = effectiveProfile; if (effectiveProfile != null) { cs_info = (CodeSetComponentInfo) getComponent (TAG_CODE_SETS.value, CodeSetComponentInfoHelper.class); orbTypeId = getLongComponent (TAG_ORB_TYPE.value); } }
ior.patchSSL (); if (protocols != null && !ior.isProfileSelectorSet()) ior.setProfileSelector (new SpecificProfileSelector(protocols)); org.omg.ETF.Profile profile = ior.getEffectiveProfile(); ior.get_object_key(), connections[currentConnection.ordinal ()].getId(), ior.getEffectiveProfile().version().minor ); lros.getRequestId(), true ); //response expected getParsedIOR ().markLastUsedProfile ();
IIOPProfile p = new IIOPProfile (addr,object_key,giop_minor); p.configure(configuration); _ior = ParsedIOR.createObjectIOR ((ORB)orb, p); (new ParsedIOR( (org.jacorb.orb.ORB) orb, _ior)).getIORString());
ior = createObjectIOR(orb, corbaLoc.profileList); decode(ior);
public static String generateCorbaloc(org.omg.CORBA.ORB orb, org.omg.CORBA.Object ref) { ParsedIOR pior = new ParsedIOR((org.jacorb.orb.ORB) orb, orb.object_to_string(ref)); Profile profile = pior.getEffectiveProfile(); if (profile instanceof IIOPProfile) { return createCorbalocForIIOPProfile((IIOPProfile) profile); } else if (profile instanceof MIOPProfile) { return createCorbalocForMIOPProfile((MIOPProfile) profile); } else { throw new IllegalArgumentException("Profile type not suported: tag number=" + profile.tag()); } }
if ( ParsedIOR.isParsableProtocol ( (String)found ) ) ParsedIOR ior = new ParsedIOR( orb, (String)found ); result = ior.get_object_key();
pior = new ParsedIOR((ORB) orb, iorString); ior = pior.getIOR (); pior = new ParsedIOR ((org.jacorb.orb.ORB)orb, ior); bw.write (pior.getIORString ()); bw.close ();
private Vector createRow (NameComponent last, org.jacorb.orb.ParsedIOR pior) { Vector row = new Vector (); row.addElement (last.id); row.addElement (last.kind); row.addElement (pior.getTypeId ()); IIOPProfile p = (IIOPProfile)pior.getEffectiveProfile (); final IIOPAddress iiopAddress = (IIOPAddress)p.getAddress (); row.addElement (iiopAddress.getIP ()); row.addElement (Integer.toString (iiopAddress.getPort ())); return row; } }
@Override public org.omg.CORBA.Object string_to_object (String str) { work_pending(); if (str == null) { return null; } try { ParsedIOR pior = new ParsedIOR( this, str ); if ( pior.isNull() ) { return null; } return _getDelegate(pior); } catch (Exception e) { logger.error("Exception while converting string to object", e); throw new BAD_PARAM(10, CompletionStatus.COMPLETED_NO); } }
public static String generateCorbalocForMultiIIOPProfiles(org.omg.CORBA.ORB orb, String ref) { ParsedIOR pior = new ParsedIOR((org.jacorb.orb.ORB) orb, ref); String result = null; String object_key = null; Iterator<Profile> iterator; for (iterator = pior.getProfiles().iterator(); iterator.hasNext();) { Profile profile = iterator.next(); if (profile instanceof IIOPProfile) { String s = createCorbalocForIIOPProfile((IIOPProfile) profile, true); if (result != null) { result += "," + s; } else { result = "corbaloc:" + s; object_key = parseKey(profile.get_object_key()); } } } if (result != null) { result += "/" + object_key; } return result; }
final String key = pior.getIORString(); org.omg.CORBA.portable.ObjectImpl object; else if ( pior.getEffectiveProfile() .is_match(delpior.getEffectiveProfile()))
final ParsedIOR pior = new ParsedIOR(jorb, iorString ); if (urlForm) out.println(CorbaLoc.parseKey(pior.get_object_key()));
if( pior.getEffectiveProfile().version().minor == 0 ) CodeSetComponentInfo info = pior.getCodeSetComponentInfo(); if (info != null && !ignoreComponentInfo)
@Override public void locateRequestReceived( byte[] request, GIOPConnection connection ) { connection.incPendingMessages(); final LocateRequestInputStream in = new LocateRequestInputStream( orb, request ); try { replyNewLocation(ParsedIOR.extractObjectKey(in.req_hdr.target, (org.jacorb.orb.ORB) orb), in.req_hdr.request_id, in.getGIOPMinor(), connection, true); } finally { in.close(); } }
@Override public org.omg.CORBA.Object duplicate( org.omg.CORBA.Object self ) { return orb._getDelegate (new ParsedIOR( orb, toString())); }
/** * Try to get the MIOP profile of an object reference. * * @param ref the group ref * @return the MIOP profile of the ref * * @throws NotAGroupObject if the ref doesn't have a MIOP profile */ private MIOPProfile getMIOPProfile (org.omg.CORBA.Object ref) throws NotAGroupObject { Delegate delegate = (Delegate)((ObjectImpl)ref)._get_delegate (); Profile profile = delegate.getParsedIOR ().getEffectiveProfile (); if (profile instanceof MIOPProfile) { return (MIOPProfile)profile; } else { throw new NotAGroupObject (ref.toString ()); } }