JAIN-SIP 2.0 API

javax.sip.header
Interface Parameters

All Known Subinterfaces:
AcceptEncodingHeader, AcceptHeader, AcceptLanguageHeader, AlertInfoHeader, AuthenticationInfoHeader, AuthorizationHeader, AuthorizationHeaderIms, CallInfoHeader, ContactHeader, ContentDispositionHeader, ContentTypeHeader, ErrorInfoHeader, EventHeader, FromHeader, JoinHeader, MinSEHeader, PAccessNetworkInfoHeader, PAssociatedURIHeader, PathHeader, PCalledPartyIDHeader, PChargingFunctionAddressesHeader, PChargingVectorHeader, ProxyAuthenticateHeader, ProxyAuthorizationHeader, PUserDatabaseHeader, PVisitedNetworkIDHeader, ReasonHeader, RecordRouteHeader, ReferredByHeader, ReferToHeader, ReplacesHeader, ReplyToHeader, RetryAfterHeader, RouteHeader, SecurityAgreeHeader, SecurityClientHeader, SecurityServerHeader, SecurityVerifyHeader, ServiceRouteHeader, SessionExpiresHeader, SipURI, SubscriptionStateHeader, TelURL, ToHeader, ViaHeader, WWWAuthenticateHeader, WWWAuthenticateHeaderIms

public interface Parameters

This interface defines methods for accessing generic parameters for Headers that contain generic parameter values.

Since:
1.1
Version:
2.0
Author:
Oracle Inc., NIST

Method Summary
 String getParameter(String name)
          Returns the value of the named parameter, or null if it is not set.
 String getParameter(String name, boolean stripQuotes)
          Returns the value of the named parameter, or null if it is not set.
 Iterator getParameterNames()
          Returns an Iterator over the names (Strings) of all parameters present in this ParametersHeader.
 void removeParameter(String name)
          Removes the specified parameter from Parameters of this ParametersHeader.
 void setParameter(String name, String value)
          Sets the value of the specified parameter.
 

Method Detail

getParameter

String getParameter(String name)
Returns the value of the named parameter, or null if it is not set. A zero-length String indicates flag parameter.

Parameters:
name - name of parameter to retrieve
Returns:
the value of specified parameter

setParameter

void setParameter(String name,
                  String value)
                  throws ParseException
Sets the value of the specified parameter. If the parameter already had a value it will be overwritten. A zero-length String indicates flag parameter.

Parameters:
name - - a String specifying the parameter name
value - - a String specifying the parameter value
Throws:
ParseException - which signals that an error has been reached unexpectedly while parsing the parameter name or value.

getParameterNames

Iterator getParameterNames()
Returns an Iterator over the names (Strings) of all parameters present in this ParametersHeader.

Returns:
an Iterator over all the parameter names

removeParameter

void removeParameter(String name)
Removes the specified parameter from Parameters of this ParametersHeader. This method returns silently if the parameter is not part of the ParametersHeader.

Parameters:
name - - a String specifying the parameter name

getParameter

String getParameter(String name,
                    boolean stripQuotes)
Returns the value of the named parameter, or null if it is not set. A zero-length String indicates flag parameter. Remove the undeeded quotes that are imposed by SIP encoding rules to ensure unambiguous parsing.
The stripQuotes parameter can be used to get the original value as it has been received by the stack ie with the quotes

Parameters:
name - name of parameter to retrieve
stripQuotes - will return the value of the parameter as it has been received when the message came into the stack
Returns:
the value of specified parameter
Since:
2.0

JAIN-SIP 2.0 API


See conditions of use.
Submit a bug report or feature request.