/**
         * Returns a {@code MessagingAccessPoint} instance from the specified OMS driver URL with some preset userHeaders.
         *
         * @param url the driver URL.
         * @param attributes the preset userHeaders.
         * @return a {@code MessagingAccessPoint} instance.
         * @throws OMSRuntimeException if the adapter fails to create a {@code MessagingAccessPoint} instance from the URL.
         */
        public static IMessagingAccessPoint getMessagingAccessPoint(string url, IKeyValue attributes)
        {
            AccessPointURI accessPointURI = new AccessPointURI(url);
            string         driverImpl     = parseDriverImpl(accessPointURI.getDriverType(), attributes);

            attributes.put(OMSBuiltinKeys.ACCESS_POINTS, accessPointURI.getHosts());
            attributes.put(OMSBuiltinKeys.DRIVER_IMPL, driverImpl);
            attributes.put(OMSBuiltinKeys.REGION, accessPointURI.getRegion());
            attributes.put(OMSBuiltinKeys.ACCOUNT_ID, accessPointURI.getAccountId());

            try
            {
                var driverImplClass = Type.GetType(driverImpl);
                var constructor     = driverImplClass.GetConstructor(new Type[] { typeof(IKeyValue) });
                IMessagingAccessPoint vendorImpl = (IMessagingAccessPoint)constructor.Invoke(new object[] { attributes });
                checkSpecVersion(OMS.specVersion, vendorImpl.version());
                return(vendorImpl);
            }
            catch
            {
                throw OMSResponseStatus.generateException(OMSResponseStatus.STATUS_10000, url);
            }
        }