mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: reorder KurentoClient event handlers on KmsManager
parent
a91fc4f870
commit
9e68dd6d10
|
@ -175,6 +175,32 @@ public abstract class KmsManager {
|
|||
protected JsonRpcWSConnectionListener generateKurentoConnectionListener(final String kmsId) {
|
||||
return new JsonRpcWSConnectionListener() {
|
||||
|
||||
@Override
|
||||
public void connected() {
|
||||
final Kms kms = kmss.get(kmsId);
|
||||
log.info("Kurento Client \"connected\" event for KMS {} [{}]", kms.getUri(),
|
||||
kms.getKurentoClient().toString());
|
||||
// TODO: This should be done here, not after KurentoClient#create method
|
||||
// returns, but it seems that this event is never triggered
|
||||
// kms.setKurentoClientConnected(true);
|
||||
// kms.setTimeOfKurentoClientConnection(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connectionFailed() {
|
||||
final Kms kms = kmss.get(kmsId);
|
||||
log.error("Kurento Client \"connectionFailed\" event for KMS {} [{}]", kms.getUri(),
|
||||
kms.getKurentoClient().toString());
|
||||
kms.setKurentoClientConnected(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reconnecting() {
|
||||
final Kms kms = kmss.get(kmsId);
|
||||
log.info("Kurento Client \"reconnecting\" event for KMS {} [{}]", kms.getUri(),
|
||||
kms.getKurentoClient().toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reconnected(boolean sameServer) {
|
||||
final Kms kms = kmss.get(kmsId);
|
||||
|
@ -318,32 +344,6 @@ public abstract class KmsManager {
|
|||
kurentoClientReconnectTimer.updateTimer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connectionFailed() {
|
||||
final Kms kms = kmss.get(kmsId);
|
||||
log.error("Kurento Client \"connectionFailed\" event for KMS {} [{}]", kms.getUri(),
|
||||
kms.getKurentoClient().toString());
|
||||
kms.setKurentoClientConnected(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connected() {
|
||||
final Kms kms = kmss.get(kmsId);
|
||||
log.info("Kurento Client \"connected\" event for KMS {} [{}]", kms.getUri(),
|
||||
kms.getKurentoClient().toString());
|
||||
// TODO: This should be done here, not after KurentoClient#create method
|
||||
// returns, but it seems that this event is never triggered
|
||||
// kms.setKurentoClientConnected(true);
|
||||
// kms.setTimeOfKurentoClientConnection(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reconnecting() {
|
||||
final Kms kms = kmss.get(kmsId);
|
||||
log.info("Kurento Client \"reconnecting\" event for KMS {} [{}]", kms.getUri(),
|
||||
kms.getKurentoClient().toString());
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue