public final class Address
extends java.lang.Object
implements scala.Product, scala.Serializable
This class is final to allow use as a case class (copy method etc.); if for example a remote transport would want to associate additional information with an address, then this must be done externally.
Constructor and Description |
---|
Address(java.lang.String protocol,
java.lang.String system) |
Address(java.lang.String protocol,
java.lang.String system,
java.lang.String host,
int port) |
Modifier and Type | Method and Description |
---|---|
static scala.math.Ordering<Address> |
addressOrdering()
Address ordering type class, sorts addresses by protocol, name, host and port. |
static Address |
apply(java.lang.String protocol,
java.lang.String system)
Constructs a new Address with the specified protocol and system name
|
static Address |
apply(java.lang.String protocol,
java.lang.String system,
java.lang.String host,
int port)
Constructs a new Address with the specified protocol, system name, host and port
|
abstract static boolean |
canEqual(java.lang.Object that) |
abstract static boolean |
equals(java.lang.Object that) |
boolean |
hasGlobalScope()
Returns true if this Address is usable globally.
|
int |
hashCode() |
boolean |
hasLocalScope()
Returns true if this Address is only defined locally.
|
scala.Option<java.lang.String> |
host() |
java.lang.String |
hostPort()
Returns a String representation formatted as:
|
scala.Option<java.lang.Object> |
port() |
abstract static int |
productArity() |
abstract static java.lang.Object |
productElement(int n) |
static scala.collection.Iterator<java.lang.Object> |
productIterator() |
static java.lang.String |
productPrefix() |
java.lang.String |
protocol() |
java.lang.String |
system() |
java.lang.String |
toString() |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
public Address(java.lang.String protocol, java.lang.String system)
public Address(java.lang.String protocol, java.lang.String system, java.lang.String host, int port)
public static Address apply(java.lang.String protocol, java.lang.String system)
protocol
- (undocumented)system
- (undocumented)public static Address apply(java.lang.String protocol, java.lang.String system, java.lang.String host, int port)
protocol
- (undocumented)system
- (undocumented)host
- (undocumented)port
- (undocumented)public static scala.math.Ordering<Address> addressOrdering()
Address
ordering type class, sorts addresses by protocol, name, host and port.public abstract static boolean canEqual(java.lang.Object that)
public abstract static boolean equals(java.lang.Object that)
public abstract static java.lang.Object productElement(int n)
public abstract static int productArity()
public static scala.collection.Iterator<java.lang.Object> productIterator()
public static java.lang.String productPrefix()
public java.lang.String protocol()
public java.lang.String system()
public scala.Option<java.lang.String> host()
public scala.Option<java.lang.Object> port()
public boolean hasLocalScope()
hasGlobalScope()
.public boolean hasGlobalScope()
hasLocalScope()
)
addresses of global scope are safe to sent to other hosts, as they globally and uniquely identify an addressable
entity.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String hostPort()
system@host:port