All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fireflysource.net.http.common.v2.frame.WindowUpdateFrame Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package com.fireflysource.net.http.common.v2.frame;

public class WindowUpdateFrame extends Frame {
    public static final int WINDOW_UPDATE_LENGTH = 4;

    private final int streamId;
    private final int windowDelta;

    public WindowUpdateFrame(int streamId, int windowDelta) {
        super(FrameType.WINDOW_UPDATE);
        this.streamId = streamId;
        this.windowDelta = windowDelta;
    }

    public int getStreamId() {
        return streamId;
    }

    public int getWindowDelta() {
        return windowDelta;
    }

    public boolean isStreamWindowUpdate() {
        return streamId != 0;
    }

    public boolean isSessionWindowUpdate() {
        return streamId == 0;
    }

    @Override
    public String toString() {
        return String.format("%s#%d,delta=%d", super.toString(), streamId, windowDelta);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy