Constructor and Description |
---|
DomainNameMapping(int initialCapacity,
V defaultValue)
Deprecated.
use
DomainNameMappingBuilder to create and fill the mapping instead |
DomainNameMapping(V defaultValue)
Deprecated.
use
DomainNameMappingBuilder to create and fill the mapping instead |
Modifier and Type | Method and Description |
---|---|
DomainNameMapping<V> |
add(String hostname,
V output)
Deprecated.
use
DomainNameMappingBuilder to create and fill the mapping instead |
Map<String,V> |
asMap()
Returns a read-only
Map of the domain mapping patterns and their associated value objects. |
V |
map(String hostname)
Returns mapped value of the specified input.
|
String |
toString() |
@Deprecated public DomainNameMapping(V defaultValue)
DomainNameMappingBuilder
to create and fill the mapping insteaddefaultValue
- the default value for map(String)
to return when nothing matches the input@Deprecated public DomainNameMapping(int initialCapacity, V defaultValue)
DomainNameMappingBuilder
to create and fill the mapping insteadinitialCapacity
- initial capacity for the internal mapdefaultValue
- the default value for map(String)
to return when nothing matches the input@Deprecated public DomainNameMapping<V> add(String hostname, V output)
DomainNameMappingBuilder
to create and fill the mapping instead
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 map(String)
when the specified host name
matches the specified input host namepublic V map(String hostname)
Mapping
public Map<String,V> asMap()
Map
of the domain mapping patterns and their associated value objects.Copyright © 2008–2017 The Netty Project. All rights reserved.