Constructor and Description |
---|
DomainNameMapping(int initialCapacity,
V defaultValue)
Creates a default, order-sensitive mapping.
|
DomainNameMapping(V defaultValue)
Creates a default, order-sensitive mapping.
|
Modifier and Type | Method and Description |
---|---|
DomainNameMapping<V> |
add(String hostname,
V output)
Adds a mapping that maps the specified (optionally wildcard) host name to the specified output value.
|
V |
map(String input)
Returns mapped value of the specified input.
|
String |
toString() |
public DomainNameMapping(V defaultValue)
defaultValue
- the default value for map(String)
to return when nothing matches the inputpublic DomainNameMapping(int initialCapacity, V defaultValue)
initialCapacity
- initial capacity for the internal mapdefaultValue
- the default value for map(String)
to return when nothing matches the inputpublic DomainNameMapping<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 map(String)
when the specified host name
matches the specified input host namepublic V map(String input)
Mapping
Copyright © 2008–2015 The Netty Project. All rights reserved.