public interface ToHeader extends AddressParametersHeader
Modifier and Type | Interface and Description |
---|---|
static class |
ToHeader.Builder |
Modifier and Type | Field and Description |
---|---|
static Buffer |
COMPACT_NAME |
static Buffer |
NAME |
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.
|
static ToHeader |
frame(Buffer buffer)
Frame the value as a
ToHeader . |
static Buffer |
generateTag()
Generate a new tag that can be used as a tag parameter for the
ToHeader . |
Buffer |
getTag()
Get the tag parameter.
|
default boolean |
isToHeader() |
default ToHeader |
toToHeader() |
static ToHeader.Builder |
withAddress(Address address) |
static ToHeader.Builder |
withHost(Buffer host) |
static ToHeader.Builder |
withHost(String host) |
isAddressParametersHeader, toAddressParametersHeader, with
getAddress
getParameter, getParameter, setParameter, setParameter
create, ensure, frame, getBufferSize, getBytes, getName, getNameStr, getValue, isCallIdHeader, isContactHeader, isContentLengthHeader, isContentTypeHeader, isCSeqHeader, isExpiresHeader, isFromHeader, isMaxForwardsHeader, isRecordRouteHeader, isRouteHeader, isSystemHeader, isViaHeader, toCallIdHeader, toContactHeader, toContentLengthHeader, toContentTypeHeader, toCSeqHeader, toExpiresHeader, toFromHeader, toMaxForwardsHeader, toRecordRouteHeader, toRouteHeader, toViaHeader, verify
Buffer getTag() throws SipParseException
SipParseException
- in case anything goes wrong while extracting tag.default ToHeader toToHeader()
toToHeader
in interface SipHeader
static ToHeader frame(Buffer buffer) throws SipParseException
ToHeader
. This method assumes that you have already parsed out
the actual header name "To: ". Also, this method assumes that a message framer (or similar)
has framed the buffer that is being passed in to us to only contain this header and nothing
else.
Note, as with all the frame-methods on all headers/messages/whatever, they do not do any
validation that the information is actually correct. This method will simply only try and
validate just enough to get the framing done.frame
in interface AddressParametersHeader
frame
in interface SipHeader
value
- SipParseException
- in case anything goes wrong while parsing.static Buffer generateTag()
ToHeader
. A
tag-parameter only has to be unique within the same Call-ID space so therefore it doesn't
have to be cryptographically strong etc.default boolean isToHeader()
isToHeader
in interface SipHeader
static ToHeader.Builder withHost(Buffer host)
static ToHeader.Builder withHost(String host)
static ToHeader.Builder withAddress(Address address) throws SipParseException
SipParseException
ToHeader.Builder copy()
SipHeader
copy
in interface AddressParametersHeader
copy
in interface SipHeader
Copyright © 2015. All Rights Reserved.