public class ExtendedListeningPoint extends Object implements MobicentsExtendedListeningPoint
| Constructor and Description |
|---|
ExtendedListeningPoint(javax.sip.SipProvider sipProvider,
gov.nist.javax.sip.ListeningPointExt listeningPoint,
SipConnector sipConnector) |
| Modifier and Type | Method and Description |
|---|---|
javax.sip.header.ContactHeader |
createContactHeader(String displayName,
String userName,
boolean usePublicAddress)
Create a Contact Header based on the host, port and transport of this listening point
|
javax.sip.header.ContactHeader |
createContactHeader(String displayName,
String userName,
boolean usePublicAddress,
String outboundInterface)
Create a Contact Header based on the host, port and transport of this listening point
|
javax.sip.address.SipURI |
createRecordRouteURI(boolean usePublicAddress)
Create a Record Route URI based on the host, port and transport of this listening point
|
javax.sip.header.ViaHeader |
createViaHeader(String branch,
boolean usePublicAddress)
Create a Via Header based on the host, port and transport of this listening point
|
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
|
String |
getHost(boolean usePublicAddress)
Retrieve either the global ip address found by STUN or the local network interface one
depending on the boolean value in parameter
|
String |
getIpAddress(boolean usePublicAddress) |
List<String> |
getIpAddresses()
Return the list of real ip address represented by this listening point.
|
gov.nist.javax.sip.ListeningPointExt |
getListeningPoint()
Retrieve the jain sip listening point being extended by this class
|
int |
getPort()
Retrieve the port associated with this listening point
|
SipConnector |
getSipConnector() |
javax.sip.SipProvider |
getSipProvider()
Retrieve the sip provider associated to the jain sip listening point being extended by this class
|
String |
getTransport()
Retrieve the transport associated with this listening point
|
boolean |
isAnyLocalAddress()
return true if the ip address maps to 0.0.0.0.
|
boolean |
isUseStaticAddress()
If we are using a statically assigned IP address instead of our local address (for example when IP LB is used)
|
void |
setGlobalIpAddress(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
|
void |
setPort(int port) |
void |
setSipConnector(SipConnector sipConnector) |
void |
setUseStaticAddress(boolean useStaticAddress)
If we are using a statically assigned IP address instead of our local address (for example when IP LB is used)
|
String |
toString() |
public ExtendedListeningPoint(javax.sip.SipProvider sipProvider,
gov.nist.javax.sip.ListeningPointExt listeningPoint,
SipConnector sipConnector)
public String getIpAddress(boolean usePublicAddress)
getIpAddress in interface MobicentsExtendedListeningPointpublic javax.sip.header.ContactHeader createContactHeader(String displayName, String userName, boolean usePublicAddress)
createContactHeader in interface MobicentsExtendedListeningPointusePublicAddress - if true, the host will be the global ip address found by STUN otherwise
it will be the local network interface ipaddressdisplayName - the display name to usepublic javax.sip.header.ContactHeader createContactHeader(String displayName, String userName, boolean usePublicAddress, String outboundInterface)
createContactHeader in interface MobicentsExtendedListeningPointusePublicAddress - if true, the host will be the global ip address found by STUN otherwise
it will be the local network interface ipaddressdisplayName - the display name to useoutboundInterface - the outbound interface ip address to be used for the host part of the Contact headerpublic javax.sip.header.ViaHeader createViaHeader(String branch, boolean usePublicAddress)
createViaHeader in interface MobicentsExtendedListeningPointusePublicAddress - if true, the host will be the global ip address found by STUN otherwise
it will be the local network interface ipaddressbranch - the branch id to usepublic javax.sip.address.SipURI createRecordRouteURI(boolean usePublicAddress)
createRecordRouteURI in interface MobicentsExtendedListeningPointusePublicAddress - if true, the host will be the global ip address found by STUN otherwise
it will be the local network interface ipaddresspublic gov.nist.javax.sip.ListeningPointExt getListeningPoint()
getListeningPoint in interface MobicentsExtendedListeningPointpublic javax.sip.SipProvider getSipProvider()
getSipProvider in interface MobicentsExtendedListeningPointpublic String getGlobalIpAddress()
getGlobalIpAddress in interface MobicentsExtendedListeningPointpublic int getGlobalPort()
getGlobalPort in interface MobicentsExtendedListeningPointpublic void setGlobalIpAddress(String globalIpAddress)
globalIpAddress - the global ip address of this listening pointpublic void setGlobalPort(int globalPort)
globalPort - the global port of this listening pointpublic boolean isUseStaticAddress()
isUseStaticAddress in interface MobicentsExtendedListeningPointpublic void setUseStaticAddress(boolean useStaticAddress)
useStaticAddress - public List<String> getIpAddresses()
getIpAddresses in interface MobicentsExtendedListeningPointpublic String getHost(boolean usePublicAddress)
getHost in interface MobicentsExtendedListeningPointtrue - means we want to retrieve the global ip address found by STUNpublic int getPort()
getPort in interface MobicentsExtendedListeningPointpublic void setPort(int port)
public String getTransport()
getTransport in interface MobicentsExtendedListeningPointpublic boolean isAnyLocalAddress()
isAnyLocalAddress in interface MobicentsExtendedListeningPointpublic void setSipConnector(SipConnector sipConnector)
sipConnector - the sipConnector to setpublic SipConnector getSipConnector()
getSipConnector in interface MobicentsExtendedListeningPointCopyright © 2015. All Rights Reserved.