JAIN SIP API
v1.1 - 23rd June 2003

javax.sip
Interface ListeningPoint

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable

public interface ListeningPoint
extends java.lang.Cloneable, java.io.Serializable

This interface represents a unique IP network listening point, which consists of port and transport. A ListeningPoint is a Java representation of the port that a SipProvider messaging entity uses to send and receive messages.

For any address and port that a server listens on for UDP, it MUST listen on that same port and address for TCP. This is because a message may need to be sent using TCP, rather than UDP, if it is too large. To handle this a Listening point with the same port but with TCP transport would be created and attached to a new SipProvider, upon which the SipListener is registered. However the converse is not true, a server need not listen for UDP on a particular address and port just because it is listening on that same address and port for TCP.

ListeningPoints can be created from the SipStack.createListeningPoint(int, String). A SipStack object may have multiple ListeningPoints, while a SipProvider as a messaging entity may only have a single ListeningPoint.


Field Summary
static int PORT_5060
          Port Constant: Default port 5060.
static int PORT_5061
          Port Constant: Default port 5061.
static java.lang.String SCTP
          Transport constant: SCTP
static java.lang.String TCP
          Transport constant: TCP
static java.lang.String TLS
          Transport constant: TLS over TCP
static java.lang.String UDP
          Transport constant: UDP
 
Method Summary
 boolean equals(java.lang.Object obj)
          This method indicates whether the specified object is equal to this Listening Point.
 int getPort()
          Gets the port of the ListeningPoint.
 java.lang.String getTransport()
          Gets the transport of the ListeningPoint.
 

Field Detail

TCP

public static final java.lang.String TCP
Transport constant: TCP

See Also:
Constant Field Values

UDP

public static final java.lang.String UDP
Transport constant: UDP

See Also:
Constant Field Values

SCTP

public static final java.lang.String SCTP
Transport constant: SCTP

Since:
v1.1
See Also:
Constant Field Values

TLS

public static final java.lang.String TLS
Transport constant: TLS over TCP

Since:
v1.1
See Also:
Constant Field Values

PORT_5060

public static final int PORT_5060
Port Constant: Default port 5060. This constant should only be used when the transport of the ListeningPoint is set to UDP, TCP or SCTP.

Since:
v1.1
See Also:
Constant Field Values

PORT_5061

public static final int PORT_5061
Port Constant: Default port 5061. This constant should only be used when the transport of the Listening Point is set to TLS over TCP or TCP assuming the scheme is "sips".

Since:
v1.1
See Also:
Constant Field Values
Method Detail

getPort

public int getPort()
Gets the port of the ListeningPoint. The default port of a ListeningPoint is dependent on the scheme and transport. For example:

Returns:
the integer value of the port.

getTransport

public java.lang.String getTransport()
Gets the transport of the ListeningPoint.

Returns:
the string value of the transport.

equals

public boolean equals(java.lang.Object obj)
This method indicates whether the specified object is equal to this Listening Point. The specified object is equal to this ListeningPoint if the specified object is a ListeningPoint and the transport and port in the specified Listening Point is the same as this Listening Point.

Overrides:
equals in class java.lang.Object
Parameters:
obj - - the object with which to compare this ListeningPoint.
Returns:
true if this ListeningPoint is "equal to" the obj argument; false otherwise.

JAIN SIP API
v1.1 - 23rd June 2003

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing to the
JAIN-SIP-Interest list at http://archives.java.sun.com
Copyright - 2003 Sun Microsystems