Package org.jboss.netty.channel.local
Class LocalAddress
- java.lang.Object
-
- java.net.SocketAddress
-
- org.jboss.netty.channel.local.LocalAddress
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<LocalAddress>
public final class LocalAddress extends java.net.SocketAddress implements java.lang.Comparable<LocalAddress>
An endpoint in the local transport. Each endpoint is identified by a unique case-insensitive string, except for the pre-defined value called"ephemeral"
.Ephemeral Address
An ephemeral address is an anonymous address which is assigned temporarily and is released as soon as the connection is closed. All ephemeral addresses have the same ID,"ephemeral"
, but they are not equal to each other.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
ephemeral
static java.lang.String
EPHEMERAL
private java.lang.String
id
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description LocalAddress(int id)
Creates a new instance with the specified ID.LocalAddress(java.lang.String id)
Creates a new instance with the specified ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(LocalAddress o)
boolean
equals(java.lang.Object o)
java.lang.String
getId()
Returns the ID of this address.int
hashCode()
boolean
isEphemeral()
Returnstrue
if and only if this address is ephemeral.java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
EPHEMERAL
public static final java.lang.String EPHEMERAL
- See Also:
- Constant Field Values
-
id
private final java.lang.String id
-
ephemeral
private final boolean ephemeral
-
-
Method Detail
-
getId
public java.lang.String getId()
Returns the ID of this address.
-
isEphemeral
public boolean isEphemeral()
Returnstrue
if and only if this address is ephemeral.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
compareTo
public int compareTo(LocalAddress o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<LocalAddress>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-