Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.sip.ProxyRouter
All Implemented Interfaces:
javax.sip.address.Router

public class ProxyRouter
extends Object
implements javax.sip.address.Router

An implementation of the Router interface wrapping around JAIN-SIP RI DefaultRouter in order to be able to change the outbound proxy depending on the account which sent the request.

Author:
Sebastien Mazy

Constructor Summary
ProxyRouter(javax.sip.SipStack stack, String defaultRoute)
          Simple constructor.
 
Method Summary
 javax.sip.address.Hop getNextHop(javax.sip.message.Request request)
          Returns the next hop for this Request.
 ListIterator getNextHops(javax.sip.message.Request request)
          Deprecated. 
 javax.sip.address.Hop getOutboundProxy()
          Returns the outbound proxy for this Router.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyRouter

public ProxyRouter(javax.sip.SipStack stack,
                   String defaultRoute)
Simple constructor. Ignores the defaultRoute parameter.

Parameters:
stack - the currently running stack.
defaultRoute - ignored parameter.
Method Detail

getNextHop

public javax.sip.address.Hop getNextHop(javax.sip.message.Request request)
                                 throws javax.sip.SipException
Returns the next hop for this Request.

Specified by:
getNextHop in interface javax.sip.address.Router
Parameters:
request - Request to find the next hop.
Returns:
the next hop for the request.
Throws:
javax.sip.SipException

getNextHops

@Deprecated
public ListIterator getNextHops(javax.sip.message.Request request)
Deprecated. 

Returns the next hops for this Request.

Specified by:
getNextHops in interface javax.sip.address.Router
Parameters:
request - Request to find the next hops.
Returns:
the next hops for the request.

getOutboundProxy

public javax.sip.address.Hop getOutboundProxy()
Returns the outbound proxy for this Router.

Specified by:
getOutboundProxy in interface javax.sip.address.Router
Returns:
the outbound proxy for this Router.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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