@Override public String toString() { return "RequestResponseFrame{" + "follows=" + isFollowsFlagSet() + ", metadata=" + mapMetadata(ByteBufUtil::hexDump) + ", data=" + mapData(ByteBufUtil::hexDump) + '}'; } }
@Override public String toString() { return "KeepaliveFrame{" + "respond=" + isRespondFlagSet() + ", lastReceivedPosition=" + getLastReceivedPosition() + ", data=" + mapData(ByteBufUtil::hexDump) + '}'; } }
@Override public String toString() { return "StreamIdFrame{" + "streamId=" + getStreamId() + ", frameWithoutStreamId=" + mapFrameWithoutStreamId(ByteBufUtil::hexDump) + '}'; } }
public static FrameLengthFrame createTestFrameLengthFrame() { return createFrameLengthFrame(DEFAULT, createTestStreamIdFrame()); }
/** * Returns a test instance of {@link RequestFireAndForgetFrame}. * * @return a test instance of {@link RequestFireAndForgetFrame} */ public static RequestFireAndForgetFrame createTestRequestFireAndForgetFrame() { return createRequestFireAndForgetFrame(DEFAULT, false, (ByteBuf) null, null); }
/** * Returns a test instance of {@link RequestStreamFrame}. * * @return a test instance of {@link RequestStreamFrame} */ public static RequestStreamFrame createTestRequestStreamFrame() { return createRequestStreamFrame(DEFAULT, false, 1, (ByteBuf) null, null); }
/** * Returns a test instance of {@link ResumeOkFrame}. * * @return a test instance of {@link ResumeOkFrame} */ public static ResumeOkFrame createTestResumeOkFrame() { return createResumeOkFrame(DEFAULT, 1); }
/** * Returns a test instance of {@link CancelFrame}. * * @return a test instance of {@link CancelFrame} */ public static CancelFrame createTestCancelFrame() { return createCancelFrame(DEFAULT); }
/** * Returns a test instance of {@link RequestResponseFrame}. * * @return a test instance of {@link RequestResponseFrame} */ public static RequestResponseFrame createTestRequestResponseFrame() { return createRequestResponseFrame(DEFAULT, false, (ByteBuf) null, null); }
/** * Returns a test instance of {@link ResumeFrame}. * * @return a test instance of {@link ResumeFrame} */ public static ResumeFrame createTestResumeFrame() { return createResumeFrame(DEFAULT, 1, 0, EMPTY_BUFFER, 1, 1); }
@Override public String toString() { return "ErrorFrame{" + "errorCode=" + getErrorCode() + ", data=" + mapData(ByteBufUtil::hexDump) + '}'; } }
/** * Returns whether the Complete flag is set. * * @return whether the Complete flag is set */ public boolean isCompleteFlagSet() { return isFlagSet(FLAG_COMPLETE); }
/** * Returns whether the lease flag is set. * * @return whether the lease flag is set */ public boolean isLeaseFlagSet() { return isFlagSet(FLAG_LEASE); }
@Override public String toString() { return "ResumeOkFrame{" + "lastReceivedClientPosition=" + getLastReceivedClientPosition() + '}'; } }
@Override public String toString() { return "MetadataPushFrame{" + "metadata=" + mapMetadata(ByteBufUtil::hexDump) + '}'; } }
/** * Returns whether the Complete flag is set. * * @return whether the Complete flag is set */ public boolean isCompleteFlagSet() { return isFlagSet(FLAG_COMPLETE); }
/** * Returns the metadata MIME-type, decoded at {@link StandardCharsets#UTF_8}. * * @return the metadata MIME-type, decoded as {@link StandardCharsets#UTF_8} */ public String getMetadataMimeType() { return getMetadataMimeType(UTF_8); }
/** * Returns whether the Ignore flag is set. * * @return whether the Ignore flag is set */ public boolean isIgnoreFlagSet() { return isFlagSet(FLAG_IGNORE); }
/** * Returns whether the Next flag is set. * * @return whether the Next flag is set */ public boolean isNextFlagSet() { return isFlagSet(FLAG_NEXT); }
private int getResumeIdentificationTokenOffset() { if (isFlagSet(FLAG_RESUME_ENABLED)) { return OFFSET_RESUME_IDENTIFICATION_TOKEN_LENGTH + Short.BYTES; } else { return OFFSET_RESUME_IDENTIFICATION_TOKEN_LENGTH; } } }