Package com.opencloud.javax.sip
Interface Endpoint
-
- All Superinterfaces:
Cloneable
,javax.sip.address.Hop
,javax.sip.ListeningPoint
,Serializable
public interface Endpoint extends javax.sip.address.Hop, javax.sip.ListeningPoint
Represents a local or remote SIP endpoint, a triple of host/port/transport. This proposed interface effectively combines the JAIN SIP 1.1Hop
andListeningPoint
interfaces. Because aSipStack
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. TheSipStack
is responsible for creating Endpoints, usingSipStack#createEndpoint(java.lang.String,int,java.lang.String)
- See Also:
SipStack
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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 perInetAddress.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?
-
-
-
Method Detail
-
getSocketAddress
InetSocketAddress getSocketAddress()
-
getHost
String getHost()
Convenience method to get the String representation of the Endpoint's IP address.- Specified by:
getHost
in interfacejavax.sip.address.Hop
-
getPort
int getPort()
Get the port number of this endpoint.- Specified by:
getPort
in interfacejavax.sip.address.Hop
- Specified by:
getPort
in interfacejavax.sip.ListeningPoint
- Returns:
- the port number the endpoint is bound to.
-
getTransport
String getTransport()
Get the name for the transport used by this endpoint, for example "TCP", "UDP" or "SCTP".- Specified by:
getTransport
in interfacejavax.sip.address.Hop
- Specified by:
getTransport
in interfacejavax.sip.ListeningPoint
- Returns:
- this endpoint's transport name
-
isReliable
boolean isReliable()
Is the transport for this endpoint reliable? (eg. TCP, SCTP)- Returns:
true
if the transport for this endpoint is a reliable protocol (no SIP retransmits required),false
otherwise.
-
isSecure
boolean isSecure()
Is the transport for this endpoint secure? (eg. TLS)- Returns:
true
if the transport for this endpoint is secure, ie. data is encrypted in some way, orfalse
otherwise.
-
isIPv6Address
boolean isIPv6Address()
Convenience method to determine if the endpoint is using an IPv6 address.- Returns:
true
if this endpoint's IP address is an IPv6 address,false
if IPv4.
-
isAnyLocalAddress
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 perInetAddress.isAnyLocalAddress()
.- Returns:
true
if this endpoint's IP address is a wildcard address, otherwisefalse
.
-
equals
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. Hosts are equal if they resolve to the same IP address, and transports must be compared case-insensitive.
-
-