Top Description Fields Constructors Methods
io.vertx.core.http

public Class Http2Settings

extends Object
Class Inheritance
Annotations
@DataObject
@JsonGen
publicConverter:false
Imports
io.netty.handler.codec.http2.Http2CodecUtil, io.vertx.codegen.annotations.DataObject, .GenIgnore, io.vertx.codegen.json.annotations.JsonGen, io.vertx.core.impl.Arguments, io.vertx.core.json.JsonObject, java.util.HashMap, .Map

HTTP2 settings, the settings is initialized with the default HTTP/2 values.

The settings expose the parameters defined by the HTTP/2 specification, as well as extra settings for protocol extensions.

Author
Julien Viet

Field Summary

Modifier and TypeField and Description
public static final boolean
DEFAULT_ENABLE_PUSH

Default HTTP/2 spec value for isPushEnabled : true

public static final Map<Integer, Long>
DEFAULT_EXTRA_SETTINGS

Default HTTP/2 spec value for getExtraSettings : null

public static final long
DEFAULT_HEADER_TABLE_SIZE

Default HTTP/2 spec value for getHeaderTableSize : 4096

public static final int
DEFAULT_INITIAL_WINDOW_SIZE

Default HTTP/2 spec value for getInitialWindowSize : 65535

public static final long
DEFAULT_MAX_CONCURRENT_STREAMS

Default HTTP/2 spec value for getMaxConcurrentStreams : 0xFFFFFFFFL

public static final int
DEFAULT_MAX_FRAME_SIZE

Default HTTP/2 spec value for getMaxFrameSize : 16384

public static final int
DEFAULT_MAX_HEADER_LIST_SIZE

Default HTTP/2 spec value for getMaxHeaderListSize : 8192

private Map<Integer, Long>
private long
private int
private long
private int
private long
private boolean

Constructor Summary

AccessConstructor and Description
public
Http2Settings()

Default constructor

public
Http2Settings(JsonObject
the JSON
json
)
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Create an settings from JSON

public
Http2Settings(Http2Settings
the settings to copy
other
)

Copy constructor

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public Long

Returns:

the setting value
get
(int
the setting identifier
id
)

Return a setting value according to its identifier.

public Map<Integer, Long>

Returns:

the extra settings used for extending HTTP/2
getExtraSettings
()

public long

Returns:

the SETTINGS_HEADER_TABLE_SIZE HTTP/2 setting
getHeaderTableSize
()

public int

Returns:

the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 setting
getInitialWindowSize
()

public long

Returns:

the SETTINGS_MAX_CONCURRENT_STREAMS HTTP/2 setting
getMaxConcurrentStreams
()

public int

Returns:

the SETTINGS_MAX_FRAME_SIZE HTTP/2 setting
getMaxFrameSize
()

public long

Returns:

the SETTINGS_MAX_HEADER_LIST_SIZE HTTP/2 setting
getMaxHeaderListSize
()

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean

Returns:

the SETTINGS_ENABLE_PUSH HTTP/2 setting
isPushEnabled
()

public Http2Settings

Returns:

a reference to this, so the API can be used fluently
set
(int
the setting id
id
,
long
the setting value
value
)

Set a setting value for a given setting id.

public Http2Settings

Returns:

a reference to this, so the API can be used fluently
setExtraSettings
(Map<Integer, Long>
the new extra settings
settings
)

Set the extra setting used for extending HTTP/2

public Http2Settings

Returns:

a reference to this, so the API can be used fluently
setHeaderTableSize
(long
the new value
headerTableSize
)

Set SETTINGS_HEADER_TABLE_SIZE HTTP/2 setting.

public Http2Settings

Returns:

a reference to this, so the API can be used fluently
setInitialWindowSize
(int
the new value
initialWindowSize
)

Set the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 setting

public Http2Settings

Returns:

a reference to this, so the API can be used fluently
setMaxConcurrentStreams
(long
the new value
maxConcurrentStreams
)

Set the SETTINGS_MAX_CONCURRENT_STREAMS HTTP/2 setting

public Http2Settings

Returns:

a reference to this, so the API can be used fluently
setMaxFrameSize
(int
the new value
maxFrameSize
)

Set the SETTINGS_MAX_FRAME_SIZE HTTP/2 setting

public Http2Settings

Returns:

a reference to this, so the API can be used fluently
setMaxHeaderListSize
(long
the new value
maxHeaderListSize
)

Set the SETTINGS_MAX_HEADER_LIST_SIZE HTTP/2 setting

public Http2Settings

Returns:

a reference to this, so the API can be used fluently
setPushEnabled
(boolean
the new value
pushEnabled
)

Set the SETTINGS_ENABLE_PUSH HTTP/2 setting

public JsonObject
toJson()
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

DEFAULT_ENABLE_PUSHback to summary
public static final boolean DEFAULT_ENABLE_PUSH

Default HTTP/2 spec value for isPushEnabled : true

DEFAULT_EXTRA_SETTINGSback to summary
public static final Map<Integer, Long> DEFAULT_EXTRA_SETTINGS

Default HTTP/2 spec value for getExtraSettings : null

DEFAULT_HEADER_TABLE_SIZEback to summary
public static final long DEFAULT_HEADER_TABLE_SIZE

Default HTTP/2 spec value for getHeaderTableSize : 4096

DEFAULT_INITIAL_WINDOW_SIZEback to summary
public static final int DEFAULT_INITIAL_WINDOW_SIZE

Default HTTP/2 spec value for getInitialWindowSize : 65535

DEFAULT_MAX_CONCURRENT_STREAMSback to summary
public static final long DEFAULT_MAX_CONCURRENT_STREAMS

Default HTTP/2 spec value for getMaxConcurrentStreams : 0xFFFFFFFFL

DEFAULT_MAX_FRAME_SIZEback to summary
public static final int DEFAULT_MAX_FRAME_SIZE

Default HTTP/2 spec value for getMaxFrameSize : 16384

DEFAULT_MAX_HEADER_LIST_SIZEback to summary
public static final int DEFAULT_MAX_HEADER_LIST_SIZE

Default HTTP/2 spec value for getMaxHeaderListSize : 8192

extraSettingsback to summary
private Map<Integer, Long> extraSettings
headerTableSizeback to summary
private long headerTableSize
initialWindowSizeback to summary
private int initialWindowSize
maxConcurrentStreamsback to summary
private long maxConcurrentStreams
maxFrameSizeback to summary
private int maxFrameSize
maxHeaderListSizeback to summary
private long maxHeaderListSize
pushEnabledback to summary
private boolean pushEnabled

Constructor Detail

Http2Settingsback to summary
public Http2Settings()

Default constructor

Http2Settingsback to summary
public Http2Settings(JsonObject json)

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Create an settings from JSON

Parameters
json:JsonObject

the JSON

Http2Settingsback to summary
public Http2Settings(Http2Settings other)

Copy constructor

Parameters
other:Http2Settings

the settings to copy

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getback to summary
public Long get(int id)

Return a setting value according to its identifier.

Parameters
id:int

the setting identifier

Returns:Long

the setting value

getExtraSettingsback to summary
public Map<Integer, Long> getExtraSettings()
Returns:Map<Integer, Long>

the extra settings used for extending HTTP/2

Annotations
@GenIgnore
getHeaderTableSizeback to summary
public long getHeaderTableSize()
Returns:long

the SETTINGS_HEADER_TABLE_SIZE HTTP/2 setting

getInitialWindowSizeback to summary
public int getInitialWindowSize()
Returns:int

the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 setting

getMaxConcurrentStreamsback to summary
public long getMaxConcurrentStreams()
Returns:long

the SETTINGS_MAX_CONCURRENT_STREAMS HTTP/2 setting

getMaxFrameSizeback to summary
public int getMaxFrameSize()
Returns:int

the SETTINGS_MAX_FRAME_SIZE HTTP/2 setting

getMaxHeaderListSizeback to summary
public long getMaxHeaderListSize()
Returns:long

the SETTINGS_MAX_HEADER_LIST_SIZE HTTP/2 setting

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
isPushEnabledback to summary
public boolean isPushEnabled()
Returns:boolean

the SETTINGS_ENABLE_PUSH HTTP/2 setting

setback to summary
public Http2Settings set(int id, long value)

Set a setting value for a given setting id.

Parameters
id:int

the setting id

value:long

the setting value

Returns:Http2Settings

a reference to this, so the API can be used fluently

setExtraSettingsback to summary
public Http2Settings setExtraSettings(Map<Integer, Long> settings)

Set the extra setting used for extending HTTP/2

Parameters
settings:Map<Integer, Long>

the new extra settings

Returns:Http2Settings

a reference to this, so the API can be used fluently

Annotations
@GenIgnore
setHeaderTableSizeback to summary
public Http2Settings setHeaderTableSize(long headerTableSize)

Set SETTINGS_HEADER_TABLE_SIZE HTTP/2 setting.

Parameters
headerTableSize:long

the new value

Returns:Http2Settings

a reference to this, so the API can be used fluently

setInitialWindowSizeback to summary
public Http2Settings setInitialWindowSize(int initialWindowSize)

Set the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 setting

Parameters
initialWindowSize:int

the new value

Returns:Http2Settings

a reference to this, so the API can be used fluently

setMaxConcurrentStreamsback to summary
public Http2Settings setMaxConcurrentStreams(long maxConcurrentStreams)

Set the SETTINGS_MAX_CONCURRENT_STREAMS HTTP/2 setting

Parameters
maxConcurrentStreams:long

the new value

Returns:Http2Settings

a reference to this, so the API can be used fluently

setMaxFrameSizeback to summary
public Http2Settings setMaxFrameSize(int maxFrameSize)

Set the SETTINGS_MAX_FRAME_SIZE HTTP/2 setting

Parameters
maxFrameSize:int

the new value

Returns:Http2Settings

a reference to this, so the API can be used fluently

setMaxHeaderListSizeback to summary
public Http2Settings setMaxHeaderListSize(long maxHeaderListSize)

Set the SETTINGS_MAX_HEADER_LIST_SIZE HTTP/2 setting

Parameters
maxHeaderListSize:long

the new value

Returns:Http2Settings

a reference to this, so the API can be used fluently

setPushEnabledback to summary
public Http2Settings setPushEnabled(boolean pushEnabled)

Set the SETTINGS_ENABLE_PUSH HTTP/2 setting

Parameters
pushEnabled:boolean

the new value

Returns:Http2Settings

a reference to this, so the API can be used fluently

toJsonback to summary
public JsonObject toJson()

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override