gov.nist.javax.sip.stack
クラス DefaultRouter

java.lang.Object
  上位を拡張 gov.nist.javax.sip.stack.DefaultRouter
すべての実装されたインタフェース:
javax.sip.address.Router

public class DefaultRouter
extends java.lang.Object
implements javax.sip.address.Router

This is the default router. When the implementation wants to forward a request and had run out of othe options, then it calls this method to figure out where to send the request. The default router implements a simple "default routing algorithm" which just forwards to the configured proxy address. Use this for UAC/UAS implementations and use the ProxyRouter for proxies.

バージョン:
JAIN-SIP-1.1 $Revision: 1.5 $ $Date: 2004/06/21 04:59:49 $
作成者:
M. Ranganathan
This code is in the public domain.

コンストラクタの概要
DefaultRouter(SIPMessageStack sipStack, java.lang.String defaultRoute)
          Constructor given SIPStack as an argument (this is only for the protocol tester.
DefaultRouter(javax.sip.SipStack sipStack, java.lang.String defaultRoute)
          Constructor.
 
メソッドの概要
 javax.sip.address.Hop getDefaultRoute()
          Get the default route (does the same thing as getOutboundProxy).
 java.util.ListIterator getNextHops(javax.sip.message.Request request)
          Return addresses for default proxy to forward the request to.
 javax.sip.address.Hop getOutboundProxy()
          Get the default hop.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

DefaultRouter

public DefaultRouter(javax.sip.SipStack sipStack,
                     java.lang.String defaultRoute)
Constructor.


DefaultRouter

public DefaultRouter(SIPMessageStack sipStack,
                     java.lang.String defaultRoute)
Constructor given SIPStack as an argument (this is only for the protocol tester. Normal implementation should not need this.

メソッドの詳細

getNextHops

public java.util.ListIterator getNextHops(javax.sip.message.Request request)
Return addresses for default proxy to forward the request to. The list is organized in the following priority. If the requestURI refers directly to a host, the host and port information are extracted from it and made the next hop on the list. If the default route has been specified, then it is used to construct the next element of the list. Bug reported by Will Scullin -- maddr was being ignored when routing requests. Bug reported by Antonis Karydas - the RequestURI can be a non-sip URI.

定義:
インタフェース javax.sip.address.Router 内の getNextHops
パラメータ:
request - is the sip request to route.

getOutboundProxy

public javax.sip.address.Hop getOutboundProxy()
Get the default hop.

定義:
インタフェース javax.sip.address.Router 内の getOutboundProxy
戻り値:
defaultRoute is the default route. public java.util.Iterator getDefaultRoute(Request request) { return this.getNextHops((SIPRequest)request); }

getDefaultRoute

public javax.sip.address.Hop getDefaultRoute()
Get the default route (does the same thing as getOutboundProxy).

戻り値:
the default route.