public final class ToHeaderImpl extends AddressParametersHeaderImpl implements ToHeader
ToHeader.Builder
TAG
COMPACT_NAME, NAME
CANNOT_CAST_HEADER_OF_TYPE, UNABLE_TO_PARSE_OUT_THE_HEADER_NAME_DUE_TO_UNDERLYING_IO_EXCEPTION
Constructor and Description |
---|
ToHeaderImpl(Buffer value,
Address address,
Buffer parametersBuffer) |
Modifier and Type | Method and Description |
---|---|
ToHeader |
clone() |
ToHeader.Builder |
copy()
Everything within the pkts.io SIP module are immutable so if you actually want
to change anything you have to create a copy, which will return a specific Builder
for that header.
|
ToHeader |
ensure()
If this method actually gets called it means that we are the
SipHeaderImpl itself
and that we need to frame it further. |
Buffer |
getTag()
Get the tag parameter.
|
equals, getAddress
getParameter, getParameter, getRawParams, setParameter, setParameter
getBytes, getName, getValue, toString, transferValue, verify
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
frame, generateTag, isToHeader, toToHeader, withAddress, withHost, withHost
isAddressParametersHeader, toAddressParametersHeader, with
getAddress
getParameter, getParameter, setParameter, setParameter
create, frame, getBufferSize, getBytes, getName, getNameStr, getValue, is, is, isCallIdHeader, isContactHeader, isContentLengthHeader, isContentTypeHeader, isCSeqHeader, isExpiresHeader, isFromHeader, isMaxForwardsHeader, isRecordRouteHeader, isRouteHeader, isSubjectHeader, isSystemHeader, isViaHeader, toCallIdHeader, toContactHeader, toContentLengthHeader, toContentTypeHeader, toCSeqHeader, toExpiresHeader, toFromHeader, toMaxForwardsHeader, toRecordRouteHeader, toRouteHeader, toViaHeader, verify
public ToHeaderImpl(Buffer value, Address address, Buffer parametersBuffer)
value
- since all headers are immutable, we will always supply the raw buffer
making up the actual header, which then makes life easier when we
"convert" headers to buffers etc.address
- the parsed addressparametersBuffer
- the parsed parameterspublic Buffer getTag() throws SipParseException
getTag
in interface ToHeader
SipParseException
- in case anything goes wrong while extracting tag.public ToHeader clone()
public ToHeader ensure()
SipHeaderImpl
SipHeaderImpl
itself
and that we need to frame it further. Subclasses MUST override this method and simply return
'this'.ensure
in interface SipHeader
ensure
in class AddressParametersHeaderImpl
public ToHeader.Builder copy()
SipHeader
copy
in interface AddressParametersHeader
copy
in interface SipHeader
copy
in interface ToHeader
copy
in class AddressParametersHeaderImpl
Copyright © 2019. All Rights Reserved.