Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » MobiLink - 服务器管理 » MobiLink 服务器 API » 使用 Java 语言编写同步脚本 » 用于 Java 的 MobiLink 服务器 API 参考 » DBConnectionContext 接口

 

getServerContext 方法

语法
public ServerContext getServerContext( )
注释

为 MobiLink 服务器返回 ServerContext。

返回值

此 MobiLink 服务器的 ServerContext。

另请参见
示例

以下示例显示如何获取 DBConnectionContext 的 ServerContext 实例并关闭服务器。

注意

此示例假定您拥有一个名为 _cc 的 DBConnectionContext 实例。

// A method that uses an instance of the ServerContext to shut down the server
public void shutDownServer() {
    ServerContext context = _cc.getServerContext();
    context.shutdown();
}