Mappings that support
DNS wildcard matching.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| public | DomainWildcardMappingBuilder(V
the default value for defaultValue)Mapping#map(Object) )} to return
when nothing matches the inputConstructor with default initial capacity of the map holding the mappings |
| public | DomainWildcardMappingBuilder(int
initial capacity for the internal map initialCapacity, V the default value for defaultValue)Mapping#map(Object) to return
when nothing matches the inputConstructor with initial capacity of the map holding the mappings |
| Modifier and Type | Method and Description |
|---|---|
| public DomainWildcardMappingBuilder | add(String
the host name (optionally wildcard) hostname, V the output value that will be returned by output)Mapping#map(Object)
when the specified host name matches the specified input host nameAdds a mapping that maps the specified (optionally wildcard) host name to the specified output value. |
| public Mapping | |
| private String |
| defaultValue | back to summary |
|---|---|
| private final V defaultValue | |
| map | back to summary |
|---|---|
| private final Map<String, V> map | |
| DomainWildcardMappingBuilder | back to summary |
|---|---|
| public DomainWildcardMappingBuilder(V defaultValue) Constructor with default initial capacity of the map holding the mappings
| |
| DomainWildcardMappingBuilder | back to summary |
|---|---|
| public DomainWildcardMappingBuilder(int initialCapacity, V defaultValue) Constructor with initial capacity of the map holding the mappings
| |
| add | back to summary |
|---|---|
| public DomainWildcardMappingBuilder Adds a mapping that maps the specified (optionally wildcard) host name to the specified output value.
DNS wildcard is supported as hostname. The wildcard will only match one sub-domain deep and only when wildcard is used as the most-left label. For example: *.netty.io will match xyz.netty.io but NOT abc.xyz.netty.io
| |
| build | back to summary |
|---|---|
| public Mapping Creates a new instance of an immutable | |
| normalizeHostName | back to summary |
|---|---|
| private String normalizeHostName(String hostname) | |
| Modifier and Type | Field and Description |
|---|---|
| private final V | |
| private final Map | |
| private static final String | |
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public V | map(String hostname)
Implements io. |
| pack-priv static String | |
| public String |
| defaultValue | back to summary |
|---|---|
| private final V defaultValue | |
| map | back to summary |
|---|---|
| private final Map<String, V> map | |
| REPR_HEADER | back to summary |
|---|---|
| private static final String REPR_HEADER | |
| REPR_MAP_CLOSING | back to summary |
|---|---|
| private static final String REPR_MAP_CLOSING | |
| REPR_MAP_OPENING | back to summary |
|---|---|
| private static final String REPR_MAP_OPENING | |
| ImmutableDomainWildcardMapping | back to summary |
|---|---|
| pack-priv ImmutableDomainWildcardMapping(V defaultValue, Map<String, V> map) | |
| map | back to summary |
|---|---|
| public V map(String hostname) Implements io. Doc from io. Returns mapped value of the specified input.
| |
| normalize | back to summary |
|---|---|
pack-priv static String normalize(String hostname)
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |