MjSip Stack
v1.6

org.zoolu.sip.header
Class ParametricHeader

java.lang.Object
  |
  +--org.zoolu.sip.header.Header
        |
        +--org.zoolu.sip.header.ParametricHeader
Direct Known Subclasses:
AcceptHeader, AlertInfoHeader, ContentTypeHeader, EventHeader, NameAddressHeader, SubscriptionStateHeader, ViaHeader

public abstract class ParametricHeader
extends Header

Abstract ParametricHeader is the base class for all SIP Headers that include parameters


Fields inherited from class org.zoolu.sip.header.Header
name, value
 
Constructor Summary
protected ParametricHeader(Header hd)
          Costructs the abstract ParametricHeader.
protected ParametricHeader(java.lang.String hname, java.lang.String hvalue)
          Costructs the abstract ParametricHeader.
 
Method Summary
 java.lang.String getParameter(java.lang.String name)
          Gets the value of specified parameter.
 java.util.Vector getParameterNames()
          Gets a String Vector of parameter names.
 boolean hasParameter(java.lang.String name)
          Whether there is the specified parameter
 boolean hasParameters()
          Whether there are any parameters
protected  int indexOfFirstSemi()
          Returns the index of the first semicolon before the first parameter.
 void removeParameter(java.lang.String name)
          Removes specified parameter (if present)
 void removeParameters()
          Removes all parameters (if any)
 void setParameter(java.lang.String name, java.lang.String value)
          Sets the value of a specified parameter.
 
Methods inherited from class org.zoolu.sip.header.Header
clone, equals, getName, getValue, setValue, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParametricHeader

protected ParametricHeader(java.lang.String hname,
                           java.lang.String hvalue)
Costructs the abstract ParametricHeader.

ParametricHeader

protected ParametricHeader(Header hd)
Costructs the abstract ParametricHeader.
Method Detail

indexOfFirstSemi

protected int indexOfFirstSemi()
Returns the index of the first semicolon before the first parameter.

getParameter

public java.lang.String getParameter(java.lang.String name)
Gets the value of specified parameter.

getParameterNames

public java.util.Vector getParameterNames()
Gets a String Vector of parameter names.

hasParameter

public boolean hasParameter(java.lang.String name)
Whether there is the specified parameter

hasParameters

public boolean hasParameters()
Whether there are any parameters

removeParameters

public void removeParameters()
Removes all parameters (if any)

removeParameter

public void removeParameter(java.lang.String name)
Removes specified parameter (if present)

setParameter

public void setParameter(java.lang.String name,
                         java.lang.String value)
Sets the value of a specified parameter. Zero-length String is returned in case of flag parameter (without value).

MjSip Stack
v1.6