Пример #1
0
 @Override
 public void put(Invocation invocation, FullHttpRequest request) {
   int streamId = nextStreamID();
   request.headers().add(ExtensionHeaderNames.STREAM_ID.text(), streamIdToString(streamId));
   resultExpectMap.put(streamId, invocation);
 }
Пример #2
0
 @Override
 public Invocation poll(FullHttpResponse response) {
   int streamID = response.headers().getInt(ExtensionHeaderNames.STREAM_ID.text(), 0);
   return resultExpectMap.remove(streamID);
 }