(Packet packet)
| 139 | private Map<Long, Long> groupMap = new HashMap<>(); |
| 140 | |
| 141 | public void setGroupId(Packet packet) throws Exception { |
| 142 | byte[] data = (packet.getDecodedData().length > 0) ? packet.getDecodedData() : packet.getModifiedData(); |
| 143 | Http http = Http.create(data); |
| 144 | String streamIdStr = http.getFirstHeader("X-PacketProxy-HTTP2-Stream-Id"); |
| 145 | if (streamIdStr != null && streamIdStr.length() > 0) { |
| 146 | |
| 147 | long streamId = Long.parseLong(streamIdStr); |
| 148 | if (groupMap.containsKey(streamId)) { |
| 149 | |
| 150 | packet.setGroup(groupMap.get(streamId)); |
| 151 | } else { |
| 152 | |
| 153 | long groupId = UniqueID.getInstance().createId(); |
| 154 | groupMap.put(streamId, groupId); |
| 155 | packet.setGroup(groupId); |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | } |
nothing calls this directly
no test coverage detected