Top Description Fields Constructors Methods
io.netty5.util

public final Class DomainMappingBuilder<V>

extends Object
Class Inheritance
Annotations
@Deprecated
Type Parameters
<V>
concrete type of value objects

Deprecated

Use DomainWildcardMappingBuilder instead.

Builder for immutable DomainNameMapping instances.

Field Summary

Modifier and TypeField and Description
private final DomainNameMappingBuilder<V>
builder

Deprecated as a consequence of DomainNameMappingBuilder being deprecated.

Constructor Summary

AccessConstructor and Description
public
DomainMappingBuilder(V
the default value for DomainNameMapping#map(String) to return when nothing matches the input
defaultValue
)

Constructor with default initial capacity of the map holding the mappings

public
DomainMappingBuilder(int
initial capacity for the internal map
initialCapacity
,
V
the default value for DomainNameMapping#map(String) to return when nothing matches the input
defaultValue
)

Constructor with initial capacity of the map holding the mappings

Method Summary

Modifier and TypeMethod and Description
public DomainMappingBuilder<V>
add(String
the host name (optionally wildcard)
hostname
,
V
the output value that will be returned by DomainNameMapping#map(String) when the specified host name matches the specified input host name
output
)

Deprecated as a consequence of DomainMappingBuilder being deprecated.
Adds a mapping that maps the specified (optionally wildcard) host name to the specified output value.
public DomainNameMapping<V>

Returns:

new DomainNameMapping instance
build
()

Deprecated as a consequence of DomainNameMapping being deprecated.
Creates a new instance of immutable DomainNameMapping Attempts to add new mappings to the result object will cause UnsupportedOperationException to be thrown
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

builderback to summary
private final DomainNameMappingBuilder<V> builder

Deprecated

as a consequence of DomainNameMappingBuilder being deprecated. See corresponding docs for further information.

Constructor Detail

DomainMappingBuilderback to summary
public DomainMappingBuilder(V defaultValue)

Constructor with default initial capacity of the map holding the mappings

Parameters
defaultValue:V

the default value for DomainNameMapping#map(String) to return when nothing matches the input

DomainMappingBuilderback to summary
public DomainMappingBuilder(int initialCapacity, V defaultValue)

Constructor with initial capacity of the map holding the mappings

Parameters
initialCapacity:int

initial capacity for the internal map

defaultValue:V

the default value for DomainNameMapping#map(String) to return when nothing matches the input

Method Detail

addback to summary
public DomainMappingBuilder<V> add(String hostname, V output)

Deprecated

as a consequence of DomainMappingBuilder being deprecated. See corresponding docs for further information.

Adds a mapping that maps the specified (optionally wildcard) host name to the specified output value. Null values are forbidden for both hostnames and values.

DNS wildcard is supported as hostname. For example, you can use *.netty.io to match netty.io and downloads.netty.io.

Parameters
hostname:String

the host name (optionally wildcard)

output:V

the output value that will be returned by DomainNameMapping#map(String) when the specified host name matches the specified input host name

buildback to summary
public DomainNameMapping<V> build()

Deprecated

as a consequence of DomainNameMapping being deprecated. See corresponding docs for further information.

Creates a new instance of immutable DomainNameMapping Attempts to add new mappings to the result object will cause UnsupportedOperationException to be thrown

Returns:DomainNameMapping<V>

new DomainNameMapping instance