当前位置: 首页>>代码示例>>Java>>正文


Java OnDisablePresence类代码示例

本文整理汇总了Java中ibt.ortc.api.OnDisablePresence的典型用法代码示例。如果您正苦于以下问题:Java OnDisablePresence类的具体用法?Java OnDisablePresence怎么用?Java OnDisablePresence使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


OnDisablePresence类属于ibt.ortc.api包,在下文中一共展示了OnDisablePresence类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: disablePresence

import ibt.ortc.api.OnDisablePresence; //导入依赖的package包/类
private void disablePresence() {

        Ortc.disablePresence(
                server,
                isCluster,
                appKey,
                privateKey,
                channel,
                new OnDisablePresence() {
                    @Override
                    public void run(Exception error, String result) {
                        final Exception exception = error;
                        final String resultText = result;
                        runOnUiThread(new Runnable() {
                            @Override
                            public void run() {
                                if (exception != null) {
                                    log(String.format("Error: %s", exception.getMessage()));
                                } else {
                                    log(resultText);
                                }
                            }
                        });
                    }
                });
    }
 
开发者ID:realtime-framework,项目名称:RealtimeMessaging-Android,代码行数:27,代码来源:MainActivity.java

示例2: disablePresence

import ibt.ortc.api.OnDisablePresence; //导入依赖的package包/类
/**
 * Disables presence for the specified channel.
 * 
 * <pre>
 * Ortc.disablePresence(&quot;PRIVATE_KEY&quot;, &quot;CHANNEL&quot;, new onDisablePresence() {
 * 
 * 	public void run(Exception error, String result) {
 * 		if (error != null) {
 * 			System.out.println(error.getMessage());
 * 		} else {
 * 			System.out.println(result);
 * 
 * 		}
 * 	}
 * });
 * </pre>
 * 
 * @param privateKey
 *            The private key provided when the ORTC service is purchased.
 * @param channel
 *            Channel to disable presence
 * @param callback
 *            Callback with error and result.
 * @throws OrtcNotConnectedException
 */
public void disablePresence(String privateKey, String channel,
		OnDisablePresence callback) throws OrtcNotConnectedException {
	if (!this.isConnected) {
		throw new OrtcNotConnectedException();
	} else {
		String presenceUrl = this.isCluster ? this.clusterUrl : this.url;

		Ortc.disablePresence(presenceUrl, this.isCluster,
				this.applicationKey, privateKey, channel, callback);
	}
}
 
开发者ID:realtime-framework,项目名称:RealtimeMessaging-Android,代码行数:37,代码来源:OrtcClient.java

示例3: disablePresence

import ibt.ortc.api.OnDisablePresence; //导入依赖的package包/类
/**
 * Disables presence for the specified channel.
 * 
 * <pre>
 * Ortc.disablePresence(&quot;PRIVATE_KEY&quot;, &quot;CHANNEL&quot;, new onDisablePresence() {
 * 
 * 	public void run(Exception error, String result) {
 * 		if (error != null) {
 * 			System.out.println(error.getMessage());
 * 		} else {
 * 			System.out.println(result);
 * 
 * 		}
 * 	}
 * });
 * </pre>
 * 
 * @param privateKey
 *            The private key provided when the ORTC service is purchased.
 * @param channel
 *            Channel to disable presence
 * @param callback
 *            Callback with error and result.
 * @throws ibt.ortc.extensibility.exception.OrtcNotConnectedException
 */
public void disablePresence(String privateKey, String channel,
		OnDisablePresence callback) throws OrtcNotConnectedException {
	if (!this.isConnected) {
		throw new OrtcNotConnectedException();
	} else {
		String presenceUrl = this.isCluster ? this.clusterUrl : this.url;

		Ortc.disablePresence(presenceUrl, this.isCluster, this.applicationKey, privateKey, channel, this.proxy, callback);
	}
}
 
开发者ID:realtime-framework,项目名称:RealtimeMessaging-Java,代码行数:36,代码来源:OrtcClient.java


注:本文中的ibt.ortc.api.OnDisablePresence类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。