V
- concrete type of value objectsDomainNameMappingBuilder
instead.@Deprecated public final class DomainMappingBuilder<V> extends Object
DomainNameMapping
instances.Constructor and Description |
---|
DomainMappingBuilder(int initialCapacity,
V defaultValue)
Deprecated.
Constructor with initial capacity of the map holding the mappings
|
DomainMappingBuilder(V defaultValue)
Deprecated.
Constructor with default initial capacity of the map holding the mappings
|
Modifier and Type | Method and Description |
---|---|
DomainMappingBuilder<V> |
add(String hostname,
V output)
Deprecated.
Adds a mapping that maps the specified (optionally wildcard) host name to the specified output value.
|
DomainNameMapping<V> |
build()
Deprecated.
Creates a new instance of immutable
DomainNameMapping
Attempts to add new mappings to the result object will cause UnsupportedOperationException to be thrown |
public DomainMappingBuilder(V defaultValue)
defaultValue
- the default value for DomainNameMapping.map(String)
to return
when nothing matches the inputpublic DomainMappingBuilder(int initialCapacity, V defaultValue)
initialCapacity
- initial capacity for the internal mapdefaultValue
- the default value for DomainNameMapping.map(String)
to return
when nothing matches the inputpublic DomainMappingBuilder<V> add(String hostname, V output)
DNS wildcard is supported as hostname.
For example, you can use *.netty.io
to match netty.io
and downloads.netty.io
.
hostname
- the host name (optionally wildcard)output
- the output value that will be returned by DomainNameMapping.map(String)
when the specified host name matches the specified input host namepublic DomainNameMapping<V> build()
DomainNameMapping
Attempts to add new mappings to the result object will cause UnsupportedOperationException
to be thrownDomainNameMapping
instanceCopyright © 2008–2019 The Netty Project. All rights reserved.