Package org.kurento.client
Class KurentoClient
- java.lang.Object
-
- org.kurento.client.KurentoClient
-
public class KurentoClient extends Object
Factory to createMediaPipeline
in the media server.- Since:
- 2.0.0
- Author:
- Luis López (llopez@gsyc.es), Ivan Gracia (igracia@gsyc.es), Micael Gallego (micael.gallego@gmail.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected org.kurento.client.internal.client.RomManager
manager
-
Constructor Summary
Constructors Modifier Constructor Description protected
KurentoClient(org.kurento.jsonrpc.client.JsonRpcClient client)
protected
KurentoClient(org.kurento.jsonrpc.client.JsonRpcClient client, boolean overrideClientTimeouts)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Transaction
beginTransaction()
protected static void
configureJsonRpcClient(org.kurento.jsonrpc.client.AbstractJsonRpcClientWebSocket client)
static KurentoClient
create()
static KurentoClient
create(String websocketUrl)
static KurentoClient
create(String websocketUrl, KurentoConnectionListener listener)
static KurentoClient
create(String websocketUrl, KurentoConnectionListener listener, Properties properties)
static KurentoClient
create(String websocketUrl, Properties properties)
protected static KurentoClient
create(String kmsWsUri, Properties properties, Handler connectedHandler, Handler connectionFailedHandler, Handler reconnectingHandler, Handler disconnectedHandler, ReconnectedHandler reconnectedHandler, Long tryReconnectingMaxTime, Long connectionTimeout)
static KurentoClient
create(Properties properties)
static KurentoClient
create(Properties properties, KurentoConnectionListener listener)
static KurentoClient
createFromJsonRpcClient(org.kurento.jsonrpc.client.JsonRpcClient jsonRpcClient)
static KurentoClient
createFromJsonRpcClientHonoringClientTimeouts(org.kurento.jsonrpc.client.JsonRpcClient jsonRpcClient)
MediaPipeline
createMediaPipeline()
Creates a newMediaPipeline
in the media server.void
createMediaPipeline(Continuation<MediaPipeline> cont)
Creates a newMediaPipeline
in the media server.MediaPipeline
createMediaPipeline(Properties properties)
Creates a newMediaPipeline
in the media server.void
createMediaPipeline(Properties properties, Continuation<MediaPipeline> cont)
Creates a newMediaPipeline
in the media server.MediaPipeline
createMediaPipeline(Transaction tx)
MediaPipeline
createMediaPipeline(Transaction tx, Properties properties)
void
destroy()
<T extends KurentoObject>
TgetById(String id, Class<T> clazz)
static String
getKmsUrl(String id, Properties properties)
String
getLabel()
ServerManager
getServerManager()
String
getSessionId()
boolean
isClosed()
boolean
isDestroyed()
org.kurento.jsonrpc.message.Response<com.google.gson.JsonElement>
sendJsonRpcRequest(org.kurento.jsonrpc.message.Request<com.google.gson.JsonObject> request)
void
setLabel(String label)
-
-
-
Method Detail
-
getKmsUrl
public static String getKmsUrl(String id, Properties properties)
-
create
public static KurentoClient create()
-
create
public static KurentoClient create(Properties properties)
-
create
public static KurentoClient create(String websocketUrl)
-
create
public static KurentoClient create(String websocketUrl, Properties properties)
-
configureJsonRpcClient
protected static void configureJsonRpcClient(org.kurento.jsonrpc.client.AbstractJsonRpcClientWebSocket client)
-
create
public static KurentoClient create(String websocketUrl, KurentoConnectionListener listener)
-
create
public static KurentoClient create(Properties properties, KurentoConnectionListener listener)
-
create
public static KurentoClient create(String websocketUrl, KurentoConnectionListener listener, Properties properties)
-
create
protected static KurentoClient create(String kmsWsUri, Properties properties, Handler connectedHandler, Handler connectionFailedHandler, Handler reconnectingHandler, Handler disconnectedHandler, ReconnectedHandler reconnectedHandler, Long tryReconnectingMaxTime, Long connectionTimeout)
-
createMediaPipeline
public MediaPipeline createMediaPipeline()
Creates a newMediaPipeline
in the media server.- Returns:
- The media pipeline
-
createMediaPipeline
public void createMediaPipeline(Continuation<MediaPipeline> cont) throws org.kurento.commons.exception.KurentoException
Creates a newMediaPipeline
in the media server.- Parameters:
cont
- An asynchronous callback handler. If the element was successfully created, theonSuccess
method from the handler will receive aMediaPipeline
stub from the media server.- Throws:
org.kurento.commons.exception.KurentoException
-
createMediaPipeline
public MediaPipeline createMediaPipeline(Transaction tx)
-
createMediaPipeline
public MediaPipeline createMediaPipeline(Properties properties)
Creates a newMediaPipeline
in the media server.- Returns:
- The media pipeline
-
createMediaPipeline
public void createMediaPipeline(Properties properties, Continuation<MediaPipeline> cont) throws org.kurento.commons.exception.KurentoException
Creates a newMediaPipeline
in the media server.- Parameters:
cont
- An asynchronous callback handler. If the element was successfully created, theonSuccess
method from the handler will receive aMediaPipeline
stub from the media server.- Throws:
org.kurento.commons.exception.KurentoException
-
createMediaPipeline
public MediaPipeline createMediaPipeline(Transaction tx, Properties properties)
-
destroy
@PreDestroy public void destroy()
-
isClosed
public boolean isClosed()
-
isDestroyed
public boolean isDestroyed()
-
createFromJsonRpcClient
public static KurentoClient createFromJsonRpcClient(org.kurento.jsonrpc.client.JsonRpcClient jsonRpcClient)
-
createFromJsonRpcClientHonoringClientTimeouts
public static KurentoClient createFromJsonRpcClientHonoringClientTimeouts(org.kurento.jsonrpc.client.JsonRpcClient jsonRpcClient)
-
beginTransaction
public Transaction beginTransaction()
-
getServerManager
public ServerManager getServerManager()
-
getById
public <T extends KurentoObject> T getById(String id, Class<T> clazz)
-
getSessionId
public String getSessionId()
-
setLabel
public void setLabel(String label)
-
getLabel
public String getLabel()
-
sendJsonRpcRequest
public org.kurento.jsonrpc.message.Response<com.google.gson.JsonElement> sendJsonRpcRequest(org.kurento.jsonrpc.message.Request<com.google.gson.JsonObject> request) throws IOException
- Throws:
IOException
-
-