NIST SIP Parser and Stack (v1.2) API

gov.nist.javax.sip.stack
Class HopImpl

java.lang.Object
  |
  +--gov.nist.javax.sip.stack.HopImpl
All Implemented Interfaces:
Hop

public class HopImpl
extends Object
implements Hop

Routing algorithms return a list of hops to which the request is routed.

Version:
JAIN-SIP-1.1
Author:
M. Ranganathan
This code is in the public domain. IPv6 Support added by Emil Ivov (emil_ivov@yahoo.com)
Network Research Team (http://www-r2.u-strasbg.fr))
Louis Pasteur University - Strasbourg - France

Constructor Summary
HopImpl(String hop)
          Creates new Hop
HopImpl(String hostName, int portNumber, String trans)
          Create new hop given host, port and transport.
 
Method Summary
 String getHost()
          Retruns the host string.
 int getPort()
          Returns the port.
 String getTransport()
          returns the transport string.
 boolean isDefaultRoute()
          Return true if this is a default route (ie. next hop proxy address)
 boolean isExplicitRoute()
          Return true if this is an explicit route (ie. extrcted from a ROUTE Header)
 boolean isURIRoute()
          Return true if this is uriRoute
 void setDefaultRouteFlag()
          Set the defaultRouteFlag.
 void setExplicitRouteFlag()
          Set the explicitRoute flag.
 void setURIRouteFlag()
          Set the URIRoute flag.
 String toString()
          Debugging println.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HopImpl

public HopImpl(String hostName,
               int portNumber,
               String trans)
Create new hop given host, port and transport.

Parameters:
hostName - hostname
portNumber - port
trans - transport

HopImpl

public HopImpl(String hop)
        throws IllegalArgumentException
Creates new Hop

Parameters:
hop - is a hop string in the form of host:port/Transport
Throws:
IllegalArgument - exception if string is not properly formatted or null.
IllegalArgumentException
Method Detail

toString

public String toString()
Debugging println.

Specified by:
toString in interface Hop
Overrides:
toString in class Object
Returns:
the stringified version of the Hop

getHost

public String getHost()
Retruns the host string.

Specified by:
getHost in interface Hop
Returns:
host String

getPort

public int getPort()
Returns the port.

Specified by:
getPort in interface Hop
Returns:
port integer.

getTransport

public String getTransport()
returns the transport string.

Specified by:
getTransport in interface Hop
Returns:
the string value of the transport.

isExplicitRoute

public boolean isExplicitRoute()
Return true if this is an explicit route (ie. extrcted from a ROUTE Header)


isDefaultRoute

public boolean isDefaultRoute()
Return true if this is a default route (ie. next hop proxy address)


isURIRoute

public boolean isURIRoute()
Return true if this is uriRoute


setURIRouteFlag

public void setURIRouteFlag()
Set the URIRoute flag.


setDefaultRouteFlag

public void setDefaultRouteFlag()
Set the defaultRouteFlag.


setExplicitRouteFlag

public void setExplicitRouteFlag()
Set the explicitRoute flag.


NIST SIP Parser and Stack (v1.2) API

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Get the latest distribution.
Submit a bug report or feature request.