org.mobicents.servlet.sip.core
Class ExtendedListeningPoint

java.lang.Object
  extended by org.mobicents.servlet.sip.core.ExtendedListeningPoint

public class ExtendedListeningPoint
extends java.lang.Object

Author:
Jean Deruelle

Constructor Summary
ExtendedListeningPoint(javax.sip.SipProvider sipProvider, javax.sip.ListeningPoint listeningPoint)
           
 
Method Summary
 javax.sip.header.ContactHeader createContactHeader(java.lang.String displayName)
           
 javax.sip.address.SipURI createRecordRouteURI()
           
 javax.sip.header.ViaHeader createViaHeader(java.lang.String branch)
           
 java.lang.String getGlobalIpAddress()
          Retrieve the global ip address of this listening point (found through STUN), null if no global ip address is asccoiated to it
 int getGlobalPort()
          Retrieve the global port of this listening point (found through STUN), -1 if no global port is asccoiated to it
 java.lang.String getHost()
           
 java.util.List<java.lang.String> getIpAddresses()
          Return the list of real ip address represented by this listening point.
 javax.sip.ListeningPoint getListeningPoint()
          Retrieve the jain sip listening point being extended by this class
 int getPort()
          Retrieve the port associated with this listening point
 javax.sip.SipProvider getSipProvider()
          Retrieve the sip provider associated to the jain sip listening point being extended by this class
 java.lang.String getTransport()
          Retrieve the transport associated with this listening point
 boolean isAnyLocalAddress()
          return true if the ip address maps to 0.0.0.0.
 void setGlobalIpAddress(java.lang.String globalIpAddress)
          Set the global ip address (found through STUN) of this extended listening point
 void setGlobalPort(int globalPort)
          Set the global port (found through STUN) of this extended listening point
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtendedListeningPoint

public ExtendedListeningPoint(javax.sip.SipProvider sipProvider,
                              javax.sip.ListeningPoint listeningPoint)
Method Detail

createContactHeader

public javax.sip.header.ContactHeader createContactHeader(java.lang.String displayName)
Parameters:
sipNetworkInterfaceManager -
transport -
Returns:

createViaHeader

public javax.sip.header.ViaHeader createViaHeader(java.lang.String branch)
Parameters:
sipNetworkInterfaceManager -
transport -
branch -
Returns:

createRecordRouteURI

public javax.sip.address.SipURI createRecordRouteURI()
Parameters:
sipProviders -
transport -
Returns:

getListeningPoint

public javax.sip.ListeningPoint getListeningPoint()
Retrieve the jain sip listening point being extended by this class

Returns:
the jain sip listening point being extended by this class

getSipProvider

public javax.sip.SipProvider getSipProvider()
Retrieve the sip provider associated to the jain sip listening point being extended by this class

Returns:
the sip provider associated to the jain sip listening point being extended by this class

getGlobalIpAddress

public java.lang.String getGlobalIpAddress()
Retrieve the global ip address of this listening point (found through STUN), null if no global ip address is asccoiated to it

Returns:
the global ip address of this listening point, null if no global ip address is asccoiated to it

getGlobalPort

public int getGlobalPort()
Retrieve the global port of this listening point (found through STUN), -1 if no global port is asccoiated to it

Returns:
the global port of this listening point, -1 if no global port is asccoiated to it

setGlobalIpAddress

public void setGlobalIpAddress(java.lang.String globalIpAddress)
Set the global ip address (found through STUN) of this extended listening point

Parameters:
globalIpAddress - the global ip address of this listening point

setGlobalPort

public void setGlobalPort(int globalPort)
Set the global port (found through STUN) of this extended listening point

Parameters:
globalPort - the global port of this listening point

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getIpAddresses

public java.util.List<java.lang.String> getIpAddresses()
Return the list of real ip address represented by this listening point. This can be many ip address because the listening point IP address could be 0.0.0.0

Returns:
the list of real ip address represented by this listening point.

getHost

public java.lang.String getHost()

getPort

public int getPort()
Retrieve the port associated with this listening point

Returns:
port associated with this listening point

getTransport

public java.lang.String getTransport()
Retrieve the transport associated with this listening point

Returns:
the transport associated with this listening point

isAnyLocalAddress

public boolean isAnyLocalAddress()
return true if the ip address maps to 0.0.0.0. If it's true call getIpAddresses ti get the real list of ip addresses it maps too

Returns:
true if the ip adress is a any local address


Copyright © 2008. All Rights Reserved.