    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class com.ibm.devtools.SIPNoTE.ViaEntity

    java.lang.Object
       |
       +----com.ibm.devtools.SIPNoTE.ViaEntity

public class ViaEntity
extends Object

This class represents the data contained in the Via: header field of a SIP message. For example:

         Via: SIP/2.0/TCP 9.2.20.17:1107

##

ViaEntity()

##

fromString(String)
  Parses the Via: data from a string, and fills in the object.
getHost()
  Returns the host portion of the Via:.
getPort()
  Returns the port number of the Via:.
getTransport()
  Returns the transport portion of the Via:.
getVersion()
  Returns the version portion of the Via:.
main(String[])
setHost(String)
  Sets the version portion of the Via:.
setPort(int)
  Sets the port number of the Via:.
setTransport(String)
  Sets the transport portion of the Via:.
setVersion(String)
  Sets the version portion of the Via:.
toViaString()
  Constructs a Via: string from the data present within the object.

##

ViaEntity

     public ViaEntity()

##

fromString

     public void fromString(String viastr) throws MalformedHeaderException

  Parses the Via: data from a string, and fills in the object.

  Parameters:
    viastr - The string to be parsed.
  Throws: MalformedHeaderException
    Thrown if the Via: statement in the string is malformed.

toViaString

     public String toViaString() throws MalformedHeaderException

  Constructs a Via: string from the data present within the object.

  Returns:
    The string representation of this Via:.
  Throws: MalformedHeaderException
    Thrown if enough data is not present within the object to build the string.

getVersion

     public String getVersion()

  Returns the version portion of the Via:.

  Returns:
    The version

setVersion

     public void setVersion(String ver)

  Sets the version portion of the Via:.

  Parameters:
    ver - The new version.

getTransport

     public String getTransport()

  Returns the transport portion of the Via:.

  Returns:
    The transport protocol.

setTransport

     public void setTransport(String prot)

  Sets the transport portion of the Via:.

  Parameters:
    prot - The new protocol.

getHost

     public String getHost()

  Returns the host portion of the Via:.

  Returns:
    The host.

setHost

     public void setHost(String id)

  Sets the version portion of the Via:.

  Parameters:
    id - The new host.

getPort

     public int getPort()

  Returns the port number of the Via:.

  Returns:
    The port portion of the Via.

setPort

     public void setPort(int num)

  Sets the port number of the Via:.

  Parameters:
    num - The new port number.

main

     public static void main(String argv[]) throws Exception

    All Packages  Class Hierarchy  This Package  Previous  Next  Index