Package io.netty.channel.local
Class LocalAddress
java.lang.Object
java.net.SocketAddress
io.netty.channel.local.LocalAddress
- All Implemented Interfaces:
Serializable
,Comparable<LocalAddress>
An endpoint in the local transport. Each endpoint is identified by a unique
case-insensitive string.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LocalAddress
private final String
private static final long
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionLocalAddress
(Channel channel) Creates a new ephemeral port based on the ID of the specified channel.LocalAddress
(Class<?> cls) Creates a new instance with a random ID based on the given class.LocalAddress
(String id) Creates a new instance with the specified ID. -
Method Summary
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
ANY
-
id
-
strVal
-
-
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
Creates a new instance with the specified ID. -
LocalAddress
Creates a new instance with a random ID based on the given class.
-
-
Method Details
-
id
Returns the ID of this address. -
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<LocalAddress>
-
toString
-