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 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
|
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() |
java.lang.String |
protocol() |
java.lang.String |
system() |
java.lang.String |
toString()
Returns the canonical String representation of this Address formatted as:
|
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)
public static Address apply(java.lang.String protocol, java.lang.String system, java.lang.String host, int port)
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()