Class DomainNameMappingBuilder<V>

java.lang.Object
io.netty.util.DomainNameMappingBuilder<V>
Type Parameters:
V - concrete type of value objects

@Deprecated public final class DomainNameMappingBuilder<V> extends java.lang.Object
Builder for immutable DomainNameMapping instances.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static final class 
    Deprecated.
    Immutable mapping from domain name pattern to its associated value object.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final V
    Deprecated.
     
    private final java.util.Map<java.lang.String, V>
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DomainNameMappingBuilder(int initialCapacity, V defaultValue)
    Deprecated.
    Constructor with initial capacity of the map holding the mappings
    Deprecated.
    Constructor with default initial capacity of the map holding the mappings
  • Method Summary

    Modifier and Type
    Method
    Description
    add(java.lang.String hostname, V output)
    Deprecated.
    Adds a mapping that maps the specified (optionally wildcard) host name to the specified output value.
    Deprecated.
    Creates a new instance of immutable DomainNameMapping Attempts to add new mappings to the result object will cause UnsupportedOperationException to be thrown

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • defaultValue

      private final V defaultValue
      Deprecated.
    • map

      private final java.util.Map<java.lang.String, V> map
      Deprecated.
  • Constructor Details

    • DomainNameMappingBuilder

      public DomainNameMappingBuilder(V defaultValue)
      Deprecated.
      Constructor with default initial capacity of the map holding the mappings
      Parameters:
      defaultValue - the default value for DomainNameMapping.map(String) to return when nothing matches the input
    • DomainNameMappingBuilder

      public DomainNameMappingBuilder(int initialCapacity, V defaultValue)
      Deprecated.
      Constructor with initial capacity of the map holding the mappings
      Parameters:
      initialCapacity - initial capacity for the internal map
      defaultValue - the default value for DomainNameMapping.map(String) to return when nothing matches the input
  • Method Details

    • add

      public DomainNameMappingBuilder<V> add(java.lang.String hostname, V output)
      Deprecated.
      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 - 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 name
    • build

      public 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
      Returns:
      new DomainNameMapping instance