public interface Parameters extends SipHeader
Modifier and Type | Method and Description |
---|---|
Buffer |
getParameter(Buffer name)
Get the value of the named parameter.
|
Buffer |
getParameter(String name)
Same as
getParameter(Buffer) . |
Buffer |
setParameter(Buffer name,
Buffer value)
Sets the value of the specified parameter.
|
Buffer getParameter(Buffer name) throws SipParseException, IllegalArgumentException
Buffer
, which can be checked with Buffer.isEmpty()
or
Buffer.capacity()
, which will return zero. As with any empty
Buffer
, if you do Buffer.toString()
you will be getting
an empty String
back, which would be yet another way to check for
a flag parameter.name
- the name of the parameter we are looking for.SipParseException
- in case anything goes wrong while extracting the parameter.IllegalArgumentException
- in case the name is null.Buffer getParameter(String name) throws SipParseException, IllegalArgumentException
getParameter(Buffer)
.name
- SipParseException
- in case anything goes wrong while extracting the parameter.IllegalArgumentException
- in case the name is null.Buffer setParameter(Buffer name, Buffer value) throws SipParseException, IllegalArgumentException
name
- the name of the parametervalue
- the value of the parameter or null if you just want to set a
flag parameterSipParseException
- in case anything goes wrong when setting the parameter.IllegalArgumentException
- in case the name is null or empty.Copyright © 2013. All Rights Reserved.