org.kurento.client.KurentoClientBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kurento-client Show documentation
Show all versions of kurento-client Show documentation
Kurento Client
The Kurento Client project allows server applications to control media server resources.
package org.kurento.client;
public class KurentoClientBuilder {
private Properties properties;
private String kmsWsUri;
private Handler connectedHandler;
private Handler connectionFailedHandler;
private Handler disconnectedHandler;
private ReconnectedHandler reconnectedHandler;
private Handler reconnectingHandler;
private Long tryReconnectingMaxTime;
private Long connectionTimeout;
public KurentoClientBuilder() {
}
public KurentoClientBuilder setProperties(Properties properties) {
this.properties = properties;
return this;
}
public KurentoClientBuilder setKmsWsUri(String kmsWsUri) {
this.kmsWsUri = kmsWsUri;
return this;
}
public KurentoClientBuilder onConnected(Handler connectedHandler) {
this.connectedHandler = connectedHandler;
return this;
}
public KurentoClientBuilder onConnectionFailed(Handler connectionFailedHandler) {
this.connectionFailedHandler = connectionFailedHandler;
return this;
}
public KurentoClientBuilder onDisconnected(Handler disconnectedHandler) {
this.disconnectedHandler = disconnectedHandler;
return this;
}
public KurentoClientBuilder onReconnecting(Handler reconnectingHandler) {
this.reconnectingHandler = reconnectingHandler;
return this;
}
public KurentoClientBuilder onReconnected(ReconnectedHandler reconnectedHandler) {
this.reconnectedHandler = reconnectedHandler;
return this;
}
public KurentoClientBuilder setTryReconnectingMaxTime(Long tryReconnectingMaxTime) {
this.tryReconnectingMaxTime = tryReconnectingMaxTime;
return this;
}
public KurentoClientBuilder setConnectionTimeout(Long connectionTimeout) {
this.connectionTimeout = connectionTimeout;
return this;
}
public KurentoClient connect() {
return KurentoClient.create(kmsWsUri, properties, connectedHandler, connectionFailedHandler,
reconnectingHandler, disconnectedHandler, reconnectedHandler, tryReconnectingMaxTime,
connectionTimeout);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy