JSIP API v1.2
November 2006

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 transport and IP. A ListeningPoint is a Java representation of the socket that a SipProvider messaging entity uses to send and receive messages.

The ListeningPoint also includes an optional sent-by string parameter. If set, this string will be placed in the sent-by parameter of the top most Via header of outgoing requests.

Author:
BEA Systems, NIST

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.
 java.lang.String getIPAddress()
          Gets the IP of the ListeningPoint.
 int getPort()
          Gets the port of the ListeningPoint.
 java.lang.String getSentBy()
          Gets the sentBy attribute of the ListeningPoint.
 java.lang.String getTransport()
          Gets the transport of the ListeningPoint.
 void setSentBy(java.lang.String sentBy)
          Sets the sentBy string for this ListeningPoint.
 

Field Detail

TCP

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

See Also:
Constant Field Values

UDP

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

See Also:
Constant Field Values

SCTP

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

See Also:
Constant Field Values

TLS

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

See Also:
Constant Field Values

PORT_5060

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.

See Also:
Constant Field Values

PORT_5061

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".

See Also:
Constant Field Values
Method Detail

getPort

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

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

Returns:
the string value of the transport.

getIPAddress

java.lang.String getIPAddress()
Gets the IP of the ListeningPoint.

Returns:
the string value of the IP address.
Since:
v1.2

setSentBy

void setSentBy(java.lang.String sentBy)
               throws java.text.ParseException
Sets the sentBy string for this ListeningPoint. The sentBy String is placed in the top most Via header of outgoing requests. This parameter is optional and if it is not set, the top most Via header will use the IP address and port assigned to the listening point for the sentBy field.

Parameters:
sentBy - the sentBy string to be set in requests top most Via headers.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the sentBy value.
Since:
v1.2

getSentBy

java.lang.String getSentBy()
Gets the sentBy attribute of the ListeningPoint.

Returns:
the string value of the sentBy attribute.
Since:
v1.2

equals

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.

JSIP API v1.2
November 2006

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing at http://archives.java.sun.com
Copyright - 2006 BEA Systems and Sun Microsystems