Class HpackParserImpl

  • All Implemented Interfaces:
    HpackParser

    public class HpackParserImpl
    extends java.lang.Object
    implements HpackParser
    • Constructor Summary

      Constructors 
      Constructor Description
      HpackParserImpl​(com.webpieces.http2parser.api.Http2Parser parser, boolean ignoreUnkownFrames)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.webpieces.data.api.DataWrapper marshal​(MarshalState memento, com.webpieces.http2.api.dto.lowlevel.lib.Http2Msg msg)  
      java.lang.String marshalSettingsPayload​(java.util.List<com.webpieces.http2.api.dto.lowlevel.lib.Http2Setting> settingsPayload)
      Base 64 of the 'payload' of the SettingsFrame only, excluding the frame piece
      MarshalState prepareToMarshal​(int maxHeaderTableSize, long remoteMaxFrameSize)  
      UnmarshalState prepareToUnmarshal​(java.lang.String logId, int maxHeaderSize, int maxHeaderTableSize, long localMaxFrameSize)  
      UnmarshalState unmarshal​(UnmarshalState memento, org.webpieces.data.api.DataWrapper newData)  
      java.util.List<com.webpieces.http2.api.dto.lowlevel.lib.Http2Setting> unmarshalSettingsPayload​(java.lang.String base64SettingsPayload)
      Unfortunately, in the http1.1 request to a server, the base64 http/2 upgrade settings header ONLY contains the 'payload' of a SettingFrame, so we must have a method to just parse the payload of a settings frame so this is a one-off function that I don't like exposing but need to.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HpackParserImpl

        public HpackParserImpl​(com.webpieces.http2parser.api.Http2Parser parser,
                               boolean ignoreUnkownFrames)
    • Method Detail

      • prepareToUnmarshal

        public UnmarshalState prepareToUnmarshal​(java.lang.String logId,
                                                 int maxHeaderSize,
                                                 int maxHeaderTableSize,
                                                 long localMaxFrameSize)
        Specified by:
        prepareToUnmarshal in interface HpackParser
      • marshal

        public org.webpieces.data.api.DataWrapper marshal​(MarshalState memento,
                                                          com.webpieces.http2.api.dto.lowlevel.lib.Http2Msg msg)
        Specified by:
        marshal in interface HpackParser
      • unmarshalSettingsPayload

        public java.util.List<com.webpieces.http2.api.dto.lowlevel.lib.Http2Setting> unmarshalSettingsPayload​(java.lang.String base64SettingsPayload)
        Description copied from interface: HpackParser
        Unfortunately, in the http1.1 request to a server, the base64 http/2 upgrade settings header ONLY contains the 'payload' of a SettingFrame, so we must have a method to just parse the payload of a settings frame so this is a one-off function that I don't like exposing but need to.
        Specified by:
        unmarshalSettingsPayload in interface HpackParser
      • marshalSettingsPayload

        public java.lang.String marshalSettingsPayload​(java.util.List<com.webpieces.http2.api.dto.lowlevel.lib.Http2Setting> settingsPayload)
        Description copied from interface: HpackParser
        Base 64 of the 'payload' of the SettingsFrame only, excluding the frame piece
        Specified by:
        marshalSettingsPayload in interface HpackParser