< prev index next >
src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/DecodingCallback.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 33,46 ****
* <p> Methods of the callback are never called by a decoder with any of the
* arguments being {@code null}.
*
* @apiNote
*
! * <p> The callback provides methods for all possible <a
! * href="https://tools.ietf.org/html/rfc7541#section-6">binary
! * representations</a>. This could be useful for implementing an intermediary,
! * logging, debugging, etc.
*
* <p> The callback is an interface in order to interoperate with lambdas (in
* the most common use case):
* <pre>{@code
* DecodingCallback callback = (name, value) -> System.out.println(name + ", " + value);
--- 33,46 ----
* <p> Methods of the callback are never called by a decoder with any of the
* arguments being {@code null}.
*
* @apiNote
*
! * <p> The callback provides methods for all possible
! * <a href="https://tools.ietf.org/html/rfc7541#section-6">binary representations</a>.
! * This could be useful for implementing an intermediary, logging, debugging,
! * etc.
*
* <p> The callback is an interface in order to interoperate with lambdas (in
* the most common use case):
* <pre>{@code
* DecodingCallback callback = (name, value) -> System.out.println(name + ", " + value);
*** 96,106 ****
* whether or not the value is sensitive
*
* @see #onLiteralNeverIndexed(int, CharSequence, CharSequence, boolean)
* @see #onLiteralNeverIndexed(CharSequence, boolean, CharSequence, boolean)
*/
! default void onDecoded(CharSequence name, CharSequence value,
boolean sensitive) {
onDecoded(name, value);
}
/**
--- 96,107 ----
* whether or not the value is sensitive
*
* @see #onLiteralNeverIndexed(int, CharSequence, CharSequence, boolean)
* @see #onLiteralNeverIndexed(CharSequence, boolean, CharSequence, boolean)
*/
! default void onDecoded(CharSequence name,
! CharSequence value,
boolean sensitive) {
onDecoded(name, value);
}
/**
*** 140,151 ****
* @param value
* header value
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
! default void onLiteral(int index, CharSequence name,
! CharSequence value, boolean valueHuffman) {
onDecoded(name, value, false);
}
/**
* A <a href="https://tools.ietf.org/html/rfc7541#section-6.2.2">Literal
--- 141,154 ----
* @param value
* header value
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
! default void onLiteral(int index,
! CharSequence name,
! CharSequence value,
! boolean valueHuffman) {
onDecoded(name, value, false);
}
/**
* A <a href="https://tools.ietf.org/html/rfc7541#section-6.2.2">Literal
*** 164,175 ****
* @param value
* header value
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
! default void onLiteral(CharSequence name, boolean nameHuffman,
! CharSequence value, boolean valueHuffman) {
onDecoded(name, value, false);
}
/**
* A <a href="https://tools.ietf.org/html/rfc7541#section-6.2.3">Literal
--- 167,180 ----
* @param value
* header value
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
! default void onLiteral(CharSequence name,
! boolean nameHuffman,
! CharSequence value,
! boolean valueHuffman) {
onDecoded(name, value, false);
}
/**
* A <a href="https://tools.ietf.org/html/rfc7541#section-6.2.3">Literal
*** 188,198 ****
* @param value
* header value
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
! default void onLiteralNeverIndexed(int index, CharSequence name,
CharSequence value,
boolean valueHuffman) {
onDecoded(name, value, true);
}
--- 193,204 ----
* @param value
* header value
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
! default void onLiteralNeverIndexed(int index,
! CharSequence name,
CharSequence value,
boolean valueHuffman) {
onDecoded(name, value, true);
}
*** 213,224 ****
* @param value
* header value
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
! default void onLiteralNeverIndexed(CharSequence name, boolean nameHuffman,
! CharSequence value, boolean valueHuffman) {
onDecoded(name, value, true);
}
/**
* A <a href="https://tools.ietf.org/html/rfc7541#section-6.2.1">Literal
--- 219,232 ----
* @param value
* header value
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
! default void onLiteralNeverIndexed(CharSequence name,
! boolean nameHuffman,
! CharSequence value,
! boolean valueHuffman) {
onDecoded(name, value, true);
}
/**
* A <a href="https://tools.ietf.org/html/rfc7541#section-6.2.1">Literal
*** 239,249 ****
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
default void onLiteralWithIndexing(int index,
CharSequence name,
! CharSequence value, boolean valueHuffman) {
onDecoded(name, value, false);
}
/**
* A <a href="https://tools.ietf.org/html/rfc7541#section-6.2.1">Literal
--- 247,258 ----
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
default void onLiteralWithIndexing(int index,
CharSequence name,
! CharSequence value,
! boolean valueHuffman) {
onDecoded(name, value, false);
}
/**
* A <a href="https://tools.ietf.org/html/rfc7541#section-6.2.1">Literal
*** 262,273 ****
* @param value
* header value
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
! default void onLiteralWithIndexing(CharSequence name, boolean nameHuffman,
! CharSequence value, boolean valueHuffman) {
onDecoded(name, value, false);
}
/**
* A <a href="https://tools.ietf.org/html/rfc7541#section-6.3">Dynamic Table
--- 271,284 ----
* @param value
* header value
* @param valueHuffman
* if the {@code value} was Huffman encoded
*/
! default void onLiteralWithIndexing(CharSequence name,
! boolean nameHuffman,
! CharSequence value,
! boolean valueHuffman) {
onDecoded(name, value, false);
}
/**
* A <a href="https://tools.ietf.org/html/rfc7541#section-6.3">Dynamic Table
< prev index next >