本文整理汇总了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);
}
}
});
}
});
}
示例2: disablePresence
import ibt.ortc.api.OnDisablePresence; //导入依赖的package包/类
/**
* Disables presence for the specified channel.
*
* <pre>
* Ortc.disablePresence("PRIVATE_KEY", "CHANNEL", 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);
}
}
示例3: disablePresence
import ibt.ortc.api.OnDisablePresence; //导入依赖的package包/类
/**
* Disables presence for the specified channel.
*
* <pre>
* Ortc.disablePresence("PRIVATE_KEY", "CHANNEL", 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);
}
}