Beispiel #1
0
        private void Parse(string iiopUrl, Codec codec,
                           IList /* TaggedComponent */ additionalComponents)
        {
            Uri uri = new Uri(iiopUrl);

            if (IiopLocIiopAddr.IsResponsibleForProtocol(uri.Scheme))
            {
                m_objAddr = new IiopLocIiopAddr(uri.Scheme, uri.Host, uri.Port);
            }
            else if (IiopLocIiopSslAddr.IsResponsibleForProtocol(uri.Scheme))
            {
                m_objAddr = new IiopLocIiopSslAddr(uri.Scheme, uri.Host, uri.Port);
            }
            else
            {
                throw new INTERNAL(145, CompletionStatus.Completed_MayBe);
            }
            try {
                m_objectUri = uri.PathAndQuery;
                if ((m_objectUri != null) && (m_objectUri.StartsWith("/")))
                {
                    m_objectUri = m_objectUri.Substring(1);
                    int    startIndex = 0;
                    string escaped    = IorUtil.EscapeNonAscii(m_objectUri, ref startIndex);
                    m_keyBytes = IorUtil.GetKeyBytesForId(escaped, startIndex);
                }
            } catch (Exception) {
                throw new INV_OBJREF(146, CompletionStatus.Completed_MayBe);
            }
            m_profiles = new IorProfile[] {
                GetProfileFor(m_objAddr, GetKeyAsByteArray(), codec,
                              additionalComponents)
            };
        }
Beispiel #2
0
        private IorProfile GetProfileFor(IiopLocObjAddr objAddr, byte[] objKey, Codec codec,
                                         IList /* TaggedComponent */ additionalComponents)
        {
            IorProfile addrProfile =
                objAddr.GetProfileForAddr(objKey, codec);

            for (int i = 0; i < additionalComponents.Count; i++)
            {
                addrProfile.AddTaggedComponent((TaggedComponent)additionalComponents[i]);
            }
            return(addrProfile);
        }
Beispiel #3
0
 private void Parse(string iiopUrl, Codec codec,
                    IList /* TaggedComponent */ additionalComponents) {
     Uri uri = new Uri(iiopUrl);
     if (IiopLocIiopAddr.IsResponsibleForProtocol(uri.Scheme)) {
         m_objAddr = new IiopLocIiopAddr(uri.Scheme, uri.Host, uri.Port);
     } else if (IiopLocIiopSslAddr.IsResponsibleForProtocol(uri.Scheme)) {
         m_objAddr = new IiopLocIiopSslAddr(uri.Scheme, uri.Host, uri.Port);
     } else {
         throw new INTERNAL(145, CompletionStatus.Completed_MayBe);
     }
     try {
         m_objectUri = uri.PathAndQuery;
         if ((m_objectUri != null) && (m_objectUri.StartsWith("/"))) {
             m_objectUri = m_objectUri.Substring(1);
             int startIndex = 0;
             string escaped = IorUtil.EscapeNonAscii(m_objectUri, ref startIndex);
             m_keyBytes = IorUtil.GetKeyBytesForId(escaped, startIndex);
         }
     } catch (Exception) {
         throw new INV_OBJREF(146, CompletionStatus.Completed_MayBe);
     }
     m_profiles = new IorProfile[] {
         GetProfileFor(m_objAddr, GetKeyAsByteArray(), codec,
                       additionalComponents) };
 }
Beispiel #4
0
 private IorProfile GetProfileFor(IiopLocObjAddr objAddr, byte[] objKey, Codec codec,
                                  IList /* TaggedComponent */ additionalComponents) {
     IorProfile addrProfile =
         objAddr.GetProfileForAddr(objKey, codec);
     for (int i = 0; i < additionalComponents.Count; i++) {
         addrProfile.AddTaggedComponent((TaggedComponent)additionalComponents[i]);
     }
     return addrProfile;
 }