mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: environmentId on mediaServerCrashed
parent
c98276a196
commit
b55072b394
|
@ -7,16 +7,22 @@ import io.openvidu.server.kurento.kms.Kms;
|
||||||
public class CDREventMediaServerCrashed extends CDREvent {
|
public class CDREventMediaServerCrashed extends CDREvent {
|
||||||
|
|
||||||
private Kms kms;
|
private Kms kms;
|
||||||
|
private String environmentId;
|
||||||
|
|
||||||
public CDREventMediaServerCrashed(CDREventName eventName, String sessionId, Long timeStamp, Kms kms) {
|
public CDREventMediaServerCrashed(CDREventName eventName, String sessionId, Long timeStamp, Kms kms,
|
||||||
|
String environmentId) {
|
||||||
super(eventName, sessionId, timeStamp);
|
super(eventName, sessionId, timeStamp);
|
||||||
this.kms = kms;
|
this.kms = kms;
|
||||||
|
this.environmentId = environmentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JsonObject toJson() {
|
public JsonObject toJson() {
|
||||||
JsonObject json = super.toJson();
|
JsonObject json = super.toJson();
|
||||||
json.addProperty("id", this.kms.getId());
|
json.addProperty("id", this.kms.getId());
|
||||||
|
if (this.environmentId != null) {
|
||||||
|
json.addProperty("environmentId", this.environmentId);
|
||||||
|
}
|
||||||
json.addProperty("ip", this.kms.getIp());
|
json.addProperty("ip", this.kms.getIp());
|
||||||
json.addProperty("uri", this.kms.getUri());
|
json.addProperty("uri", this.kms.getUri());
|
||||||
return json;
|
return json;
|
||||||
|
|
|
@ -217,9 +217,9 @@ public class CallDetailRecord {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void recordMediaServerCrashed(Kms kms, long timeOfKurentoDisconnection) {
|
public void recordMediaServerCrashed(Kms kms, String environmentId, long timeOfKurentoDisconnection) {
|
||||||
CDREvent e = new CDREventMediaServerCrashed(CDREventName.mediaServerCrashed, null, timeOfKurentoDisconnection,
|
CDREvent e = new CDREventMediaServerCrashed(CDREventName.mediaServerCrashed, null, timeOfKurentoDisconnection,
|
||||||
kms);
|
kms, environmentId);
|
||||||
this.log(e);
|
this.log(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -608,7 +608,7 @@ public class SessionEventsHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onMediaServerCrashed(Kms kms, long timeOfKurentoDisconnection) {
|
public void onMediaServerCrashed(Kms kms, long timeOfKurentoDisconnection) {
|
||||||
CDR.recordMediaServerCrashed(kms, timeOfKurentoDisconnection);
|
CDR.recordMediaServerCrashed(kms, null, timeOfKurentoDisconnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Set<Participant> filterParticipantsByRole(OpenViduRole[] roles, Set<Participant> participants) {
|
protected Set<Participant> filterParticipantsByRole(OpenViduRole[] roles, Set<Participant> participants) {
|
||||||
|
|
Loading…
Reference in New Issue