0

谁能解释一下当从黑莓设备发送 Http 请求时会发生什么?

我听到了很多事情,我对 MDS 连接服务等术语感到困惑。我什至听说我们需要更改 BES 中的一些设置才能接收 http 请求。真的需要更改设置吗?

作为黑莓应用程序开发的新手,请以清晰的方式解释。

4

2 回答 2

1

BES:把它想象成一个由一个组织的所有 BB 设备组成的专用网络。公司通常运行自己的 BES 服务器,这些服务器放置在自己的网络中并受其控制。BES 中的每个设备只能连接到该网络中的设备、BES 服务器以及可通过 BES 服务器访问的那些网络资源(通常是其他企业应用服务器)。通讯是加密的。还提供与企业邮件系统的集成。此外,BES 中的每个 BB 都由 BES 管理员管理,他可以控制每个设备的策略 - 例如,他可以为给定设备禁用 GPS 或互联网。他还可以从设备远程部署或删除应用程序。

MDS:它是 BES 的一个组成部分。

BIS:这是针对特定客户的。当您的 BB 在 BIS 中时,您的数据会被压缩发送到 RIM 服务器,该服务器将其中继到目的地。这是一个代理。这也是允许推送邮件和消息的原因。要让您的 BB 加入 BIS,您需要通过移动运营商与其签约。

更多信息:
http ://docs.blackberry.com/en/admin/deliverables/7335/BES_overview_658676_11.jsp

于 2012-11-13T09:34:18.370 回答
0

当从 BlackBerry 设备发送 Http 请求时,BlackBerry 客户端应用程序使用 HTTP 连接到 web 服务/servlet 并从客户端 -> servlet -> 客户端传输字节 []。客户端应用程序在尝试连接之前首先检查网络覆盖范围。

有多种方法可以创建从 BlackBerry 设备到 HTTP 服务器(Web 服务、servlet 等)的 HTTP 网络连接。这包括通过 Wifi、APN/Direct TCP、BlackBerry Internet Service (BIS) 和 BlackBerry Enterprise Server (BES/MDS) 发送 Http 请求,这需要将您的 BlackBerry 连接到 BES。

BlackBerry Mobile Data System (MDS) 是一个灵活的应用程序开发框架,也是 BlackBerry Enterprise Server (BES) 的一个组件。BlackBerry MDS 提供安全、无线连接和可管理性选项。BlackBerry MDS 服务包含在 BlackBerry Enterprise Server 软件中,可处理所有浏览器或连接请求并相应地路由请求。与 BIS 或其他连接不同,BlackBerry 智能手机和 BlackBerry Enterprise Server 之间的数据流动是加密的,通过 BlackBerry MDS 建立的连接提供跨支持 BlackBerry 智能手机服务的无线服务提供商的漫游。由于此连接要求手机在 BES 中注册,因此它对运行应用程序造成了一些限制,因为并非每个用户都可能已注册。所以,

可以调用以下方法以使用可用连接发出 http 请求。首先是Wifi,其次是BIS,第三是TCP,最后是MDS。

public String checkInternetConnection()
{
    String connectionString = null;
    if ((WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED)&& RadioInfo.areWAFsSupported(RadioInfo.WAF_WLAN))
    {
        //WiFi is available
        connectionString = ";interface=wifi";
    }
    // Is the carrier network the only way to connect?
    else if((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_DIRECT) == CoverageInfo.COVERAGE_DIRECT)
    {
        //Carrier coverage
        String carrierUid = getCarrierBIBSUid();
        if(carrierUid == null)
        {
            // Has carrier coverage, but not BIBS. So use the carrier's TCP network
            connectionString = ";deviceside=true";
        }
        else
        {
            // otherwise, use the Uid to construct a valid carrier BIBS request
            connectionString = ";deviceside=false;connectionUID="+carrierUid + ";ConnectionType=mds-public";
        }
    }
    // Check for an MDS connection instead (BlackBerry Enterprise Server)
    else if((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS)
    {
        connectionString = ";deviceside=false";
    }
    // If there is no connection available abort to avoid bugging the user unnecssarily.
    else if(CoverageInfo.getCoverageStatus() == CoverageInfo.COVERAGE_NONE)
    {
        Dialog.alert("There is no available connection.");
    }
    return connectionString;
}

/**
 * Looks through the phone's service book for a carrier provided BIBS network
 * @return The uid used to connect to that network.
 */
public String getCarrierBIBSUid()
{
    ServiceRecord[] records = ServiceBook.getSB().getRecords();
    int currentRecord;
    for(currentRecord = 0; currentRecord < records.length; currentRecord++)
    {
        if(records[currentRecord].getCid().toLowerCase().equals("ippp"))
        {
            if(records[currentRecord].getName().toLowerCase().indexOf("bibs") >= 0)
            {
                return records[currentRecord].getUid();
            }
        }
    }
    return null;
}
于 2012-11-13T07:17:30.140 回答