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 |
CANNOT_CAST_HEADER_OF_TYPE, UNABLE_TO_PARSE_OUT_THE_HEADER_NAME_DUE_TO_UNDERLYING_IO_EXCEPTION| 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, withgetAddressgetParameter, getParameter, setParameter, setParametercreate, ensure, 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, verifyBuffer getTag() throws SipParseException
SipParseException - in case anything goes wrong while extracting tag.default ToHeader toToHeader()
toToHeader in interface SipHeaderstatic 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 AddressParametersHeaderframe in interface SipHeadervalue - 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 SipHeaderstatic ToHeader.Builder withHost(Buffer host)
static ToHeader.Builder withHost(String host)
static ToHeader.Builder withAddress(Address address) throws SipParseException
SipParseExceptionToHeader.Builder copy()
SipHeadercopy in interface AddressParametersHeadercopy in interface SipHeaderCopyright © 2016. All Rights Reserved.