移除多余字段
This commit is contained in:
@@ -2,6 +2,8 @@ package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@Component
|
||||
@@ -34,4 +36,14 @@ public class SubscribeHolder {
|
||||
public void removeMobilePositionSubscribe(String platformId) {
|
||||
mobilePositionMap.remove(platformId);
|
||||
}
|
||||
|
||||
public List<String> getAllCatalogSubscribePlatform() {
|
||||
List<String> platforms = new ArrayList<>();
|
||||
if(catalogMap.size() > 0) {
|
||||
for (String key : catalogMap.keySet()) {
|
||||
platforms.add(catalogMap.get(key).getId());
|
||||
}
|
||||
}
|
||||
return platforms;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,17 +14,11 @@ public class SubscribeInfo {
|
||||
public SubscribeInfo(RequestEvent evt, String id) {
|
||||
this.id = id;
|
||||
Request request = evt.getRequest();
|
||||
CallIdHeader callIdHeader = (CallIdHeader)request.getHeader(CallIdHeader.NAME);
|
||||
this.callId = callIdHeader.getCallId();
|
||||
FromHeader fromHeader = (FromHeader)request.getHeader(FromHeader.NAME);
|
||||
this.fromTag = fromHeader.getTag();
|
||||
ExpiresHeader expiresHeader = (ExpiresHeader)request.getHeader(ExpiresHeader.NAME);
|
||||
this.expires = expiresHeader.getExpires();
|
||||
EventHeader eventHeader = (EventHeader)request.getHeader(EventHeader.NAME);
|
||||
this.eventId = eventHeader.getEventId();
|
||||
this.eventType = eventHeader.getEventType();
|
||||
ViaHeader viaHeader = (ViaHeader)request.getHeader(ViaHeader.NAME);
|
||||
this.branch = viaHeader.getBranch();
|
||||
this.transaction = evt.getServerTransaction();
|
||||
this.dialog = evt.getDialog();
|
||||
}
|
||||
@@ -34,9 +28,6 @@ public class SubscribeInfo {
|
||||
private String callId;
|
||||
private String eventId;
|
||||
private String eventType;
|
||||
private String fromTag;
|
||||
private String toTag;
|
||||
private String branch;
|
||||
private ServerTransaction transaction;
|
||||
private Dialog dialog;
|
||||
|
||||
@@ -52,18 +43,6 @@ public class SubscribeInfo {
|
||||
return callId;
|
||||
}
|
||||
|
||||
public String getFromTag() {
|
||||
return fromTag;
|
||||
}
|
||||
|
||||
public void setToTag(String toTag) {
|
||||
this.toTag = toTag;
|
||||
}
|
||||
|
||||
public String getToTag() {
|
||||
return toTag;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
@@ -76,10 +55,6 @@ public class SubscribeInfo {
|
||||
this.callId = callId;
|
||||
}
|
||||
|
||||
public void setFromTag(String fromTag) {
|
||||
this.fromTag = fromTag;
|
||||
}
|
||||
|
||||
public String getEventId() {
|
||||
return eventId;
|
||||
}
|
||||
@@ -96,14 +71,6 @@ public class SubscribeInfo {
|
||||
this.eventType = eventType;
|
||||
}
|
||||
|
||||
public String getBranch() {
|
||||
return branch;
|
||||
}
|
||||
|
||||
public void setBranch(String branch) {
|
||||
this.branch = branch;
|
||||
}
|
||||
|
||||
public ServerTransaction getTransaction() {
|
||||
return transaction;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user