public interface Endpoint extends Hop, ListeningPoint
Hop
and ListeningPoint interfaces. Because a SipStack may
listen on any number of IP addresses, it is simple to just use Endpoints to
represent both local listening points and next-hop addresses. The SipStack
is responsible for creating Endpoints, using SipStack#createEndpoint(java.lang.String,int,java.lang.String)SipStack| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Implementations should implement equals() such that two Endpoints
are equal if and only if their host, port and transport fields are equal.
|
String |
getHost()
Convenience method to get the String representation of the Endpoint's
IP address.
|
int |
getPort()
Get the port number of this endpoint.
|
InetSocketAddress |
getSocketAddress() |
String |
getTransport()
Get the name for the transport used by this endpoint, for example
"TCP", "UDP" or "SCTP".
|
int |
hashCode() |
boolean |
isAnyLocalAddress()
Convenience method to determine if the endpoint's address is a wildcard address
(0.0.0.0 or 0:0:0:0:0:0:0:0), as per
InetAddress.isAnyLocalAddress(). |
boolean |
isIPv6Address()
Convenience method to determine if the endpoint is using an IPv6 address.
|
boolean |
isReliable()
Is the transport for this endpoint reliable?
|
boolean |
isSecure()
Is the transport for this endpoint secure?
|
getIPAddress, getSentBy, setSentByInetSocketAddress getSocketAddress()
String getHost()
int getPort()
getPort in interface HopgetPort in interface ListeningPointString getTransport()
getTransport in interface HopgetTransport in interface ListeningPointboolean isReliable()
true if the transport for this endpoint is a reliable
protocol (no SIP retransmits required), false otherwise.boolean isSecure()
true if the transport for this endpoint is secure,
ie. data is encrypted in some way, or false otherwise.boolean isIPv6Address()
true if this endpoint's IP address is an IPv6 address,
false if IPv4.boolean isAnyLocalAddress()
InetAddress.isAnyLocalAddress().true if this endpoint's IP address is a wildcard address,
otherwise false.boolean equals(Object other)
equals in interface ListeningPointequals in class Objectother - the object with which to compare