本文整理汇总了Java中fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient类的典型用法代码示例。如果您正苦于以下问题:Java JsonRpcWebSocketClient类的具体用法?Java JsonRpcWebSocketClient怎么用?Java JsonRpcWebSocketClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JsonRpcWebSocketClient类属于fi.vtt.nubomedia.jsonrpcwsandroid包,在下文中一共展示了JsonRpcWebSocketClient类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: connectWebSocket
import fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient; //导入依赖的package包/类
/**
* Opens a web socket connection to the predefined URI as provided in the constructor.
* The method responds immediately, whether or not the connection is opened.
* The method isWebSocketConnected() should be called to ensure that the connection is open.
*/
public void connectWebSocket() {
try {
if(isWebSocketConnected()){
return;
}
URI uri = new URI(wsUri);
client = new JsonRpcWebSocketClient(uri, this,executor);
if (webSocketClientFactory != null) {
client.setWebSocketFactory(webSocketClientFactory);
}
executor.execute(new Runnable() {
public void run() {
client.connect();
}
});
} catch (Exception exc){
Log.e(LOG_TAG, "connectWebSocket", exc);
}
}
开发者ID:nubomedia-vtt,项目名称:kurento-tree-client-android,代码行数:26,代码来源:KurentoAPI.java
示例2: connectWebSocket
import fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient; //导入依赖的package包/类
/**
* Opens a web socket connection to the predefined URI as provided in the constructor.
* The method responds immediately, whether or not the connection is opened.
* The method isWebSocketConnected() should be called to ensure that the connection is open.
*/
public void connectWebSocket() {
try {
if(isWebSocketConnected()){
return;
}
URI uri = new URI(wsUri);
client = new JsonRpcWebSocketClient(uri, this,executor);
if (webSocketClientFactory != null) {
client.setWebSocketFactory(webSocketClientFactory);
}
executor.execute(new Runnable() {
public void run() {
client.connect();
}
});
} catch (Exception exc){
Log.e(LOG_TAG, "connectWebSocket", exc);
}
}
开发者ID:nubomedia-vtt,项目名称:kurento-room-client-android,代码行数:25,代码来源:KurentoAPI.java
示例3: isWebSocketConnected
import fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient; //导入依赖的package包/类
/**
* Method to check if the web socket connection is connected.
*
* @return true if the connection state is connected, and false otherwise.
*/
public boolean isWebSocketConnected(){
if(client!=null){
return (client.getConnectionState().equals(JsonRpcWebSocketClient.WebSocketConnectionState.CONNECTED));
} else {
return false;
}
}
开发者ID:nubomedia-vtt,项目名称:kurento-tree-client-android,代码行数:13,代码来源:KurentoAPI.java
注:本文中的fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论