use of com.webpieces.http2parser.api.Http2Memento in project webpieces by deanhiller.
the class HpackParserImpl method unmarshal.
@Override
public UnmarshalState unmarshal(UnmarshalState memento, DataWrapper newData) {
UnmarshalStateImpl state = (UnmarshalStateImpl) memento;
//reset any parsed frames
state.clearParsedFrames();
Http2Memento result = parser.parse(state.getLowLevelState(), newData);
List<Http2Frame> parsedFrames = result.getParsedFrames();
for (Http2Frame frame : parsedFrames) {
processFrame(state, frame);
}
return state;
}
use of com.webpieces.http2parser.api.Http2Memento in project webpieces by deanhiller.
the class HpackParserImpl method prepareToUnmarshal.
@Override
public UnmarshalState prepareToUnmarshal(String logId, int maxHeaderSize, int maxHeaderTableSize, long localMaxFrameSize) {
Decoder decoder = new Decoder(maxHeaderSize, maxHeaderTableSize);
Http2Memento result = parser.prepareToParse(localMaxFrameSize);
return new UnmarshalStateImpl(logId, result, decoding, decoder);
}
Aggregations