Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.sip
Class TransportManagerSipImpl

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.media.TransportManager<CallPeerSipImpl>
      extended by net.java.sip.communicator.impl.protocol.sip.TransportManagerSipImpl

public class TransportManagerSipImpl
extends TransportManager<CallPeerSipImpl>

Author:
Emil Ivov

Constructor Summary
protected TransportManagerSipImpl(CallPeerSipImpl callPeer)
          Creates a new SIP TransportManager.
 
Method Summary
protected  InetAddress getIntendedDestination(CallPeerSipImpl peer)
          Returns the InetAddress that is most likely to be to be used as a next hop when contacting the specified destination.
 
Methods inherited from class net.java.sip.communicator.service.protocol.media.TransportManager
closeStreamConnector, createStreamConnector, getCallPeer, getLastUsedLocalHost, getNextMediaPortToTry, getStreamConnector, initializePortNumbers, sendHolePunchPacket, setNextMediaPortToTry, setTrafficClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportManagerSipImpl

protected TransportManagerSipImpl(CallPeerSipImpl callPeer)
Creates a new SIP TransportManager.

Parameters:
callPeer - the peer that we will be servicing.
Method Detail

getIntendedDestination

protected InetAddress getIntendedDestination(CallPeerSipImpl peer)
Returns the InetAddress that is most likely to be to be used as a next hop when contacting the specified destination. This is an utility method that is used whenever we have to choose one of our local addresses to put in the Via, Contact or (in the case of no registrar accounts) From headers. The method also takes into account the existence of an outbound proxy and in that case returns its address as the next hop.

Specified by:
getIntendedDestination in class TransportManager<CallPeerSipImpl>
Parameters:
peer - the CallPeer that we would contact.
Returns:
the InetAddress that is most likely to be to be used as a next hop when contacting the specified destination.
Throws:
IllegalArgumentException - if destination is not a valid host/ip/fqdn

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.