Class LocalAddress

java.lang.Object
java.net.SocketAddress
io.netty.channel.local.LocalAddress
All Implemented Interfaces:
Serializable, Comparable<LocalAddress>

public final class LocalAddress extends SocketAddress implements Comparable<LocalAddress>
An endpoint in the local transport. Each endpoint is identified by a unique case-insensitive string.
See Also:
  • Field Details

  • Constructor Details

    • LocalAddress

      LocalAddress(Channel channel)
      Creates a new ephemeral port based on the ID of the specified channel. Note that we prepend an upper-case character so that it never conflicts with the addresses created by a user, which are always lower-cased on construction time.
    • LocalAddress

      public LocalAddress(String id)
      Creates a new instance with the specified ID.
    • LocalAddress

      public LocalAddress(Class<?> cls)
      Creates a new instance with a random ID based on the given class.
  • Method Details