public abstract class ParametersImpl extends SipHeaderImpl implements Parameters
| Modifier | Constructor and Description |
|---|---|
protected |
ParametersImpl(Buffer name,
Buffer params) |
| Modifier and Type | Method and Description |
|---|---|
Buffer |
getParameter(Buffer name)
Get the value of the named parameter.
|
Buffer |
getParameter(String name)
Same as
Parameters.getParameter(Buffer). |
Buffer |
getValue()
Will only return the parameters.
|
void |
setParameter(Buffer name,
Buffer value)
Sets the value of the specified parameter.
|
void |
setParameter(Buffer name,
java.util.function.Supplier<Buffer> value) |
protected void |
transferValue(Buffer dst)
Transfer the bytes of the value into the destination.
|
clone, ensure, getBytes, getName, toString, verifypublic Buffer getParameter(Buffer name) throws SipParseException
ParametersBuffer, 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.getParameter in interface Parametersname - the name of the parameter we are looking for.SipParseException - in case anything goes wrong while extracting the parameter.public Buffer getParameter(String name) throws SipParseException
ParametersParameters.getParameter(Buffer).getParameter in interface ParametersSipParseException - in case anything goes wrong while extracting the parameter.public void setParameter(Buffer name, Buffer value) throws SipParseException, IllegalArgumentException
ParameterssetParameter in interface Parametersname - 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.public void setParameter(Buffer name, java.util.function.Supplier<Buffer> value) throws SipParseException, IllegalArgumentException
setParameter in interface ParametersSipParseExceptionIllegalArgumentExceptionpublic Buffer getValue()
getValue in interface SipHeadergetValue in class SipHeaderImplprotected void transferValue(Buffer dst)
SipHeaderImpltransferValue in class SipHeaderImplCopyright © 2017. All Rights Reserved.