org.jboss.netty.channel.local
Class LocalAddress

java.lang.Object
  extended by java.net.SocketAddress
      extended by org.jboss.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, 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.

Version:
$Rev: 2241 $, $Date: 2010-04-16 13:12:43 +0900 (Fri, 16 Apr 2010) $
Author:
The Netty Project, Andy Taylor (andy.taylor@jboss.org), Trustin Lee
See Also:
Serialized Form

Field Summary
static String EPHEMERAL
           
 
Constructor Summary
LocalAddress(int id)
          Creates a new instance with the specified ID.
LocalAddress(String id)
          Creates a new instance with the specified ID.
 
Method Summary
 int compareTo(LocalAddress o)
           
 boolean equals(Object o)
           
 String getId()
          Returns the ID of this address.
 int hashCode()
           
 boolean isEphemeral()
          Returns true if and only if this address is ephemeral.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EPHEMERAL

public static final String EPHEMERAL
See Also:
Constant Field Values
Constructor Detail

LocalAddress

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


LocalAddress

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

Method Detail

getId

public String getId()
Returns the ID of this address.


isEphemeral

public boolean isEphemeral()
Returns true if and only if this address is ephemeral.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

compareTo

public int compareTo(LocalAddress o)
Specified by:
compareTo in interface Comparable<LocalAddress>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.