public abstract class SipInitialLine extends SipParser
SipParser.HeaderValueStateACK, AT, BACK_SLASH, BACKTICK, BYE, CANCEL, COLON, COMMA, CR, DASH, DOUBLE_QOUTE, DQUOT, EQ, EXCLAMATIONPOINT, framers, HTAB, INFO, INVITE, LAQUOT, LF, LPAREN, MADDR, MAX_LOOK_AHEAD, MESSAGE, METHOD, NOTIFY, OPTIONS, PERCENT, PERIOD, PLUS, PRACK, PUBLISH, QUESTIONMARK, RAQUOT, REFER, REGISTER, RPAREN, SCHEME_SIP, SCHEME_SIP_COLON, SCHEME_SIPS, SCHEME_SIPS_COLON, SCHEME_TEL, SCHEME_TEL_COLON, SCTP, SEMI, SIP2_0, SIP2_0_SLASH, SLASH, SP, STAR, SUBSCRIBE, TAG, TCP, TICK, TILDE, TLS, TRANSPORT, TRANSPORT_EQ, TTL, UDP, UNDERSCORE, UPDATE, USER, WS, WSS| Modifier | Constructor and Description |
|---|---|
protected |
SipInitialLine() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract SipInitialLine |
clone() |
abstract boolean |
equals(Object other)
Two initial lines are considered equal if:
They are both a request or response line
If response, their status codes are the same (the human readable
reason is ignored)
If request, the request-uri must be equal according to the rules
of URI equality
|
abstract Buffer |
getBuffer()
The request initial line as a raw buffer.
|
abstract void |
getBytes(Buffer dst)
Write the bytes representing this
SipInitialLine into the
destination Buffer. |
boolean |
isRequestLine() |
boolean |
isResponseLine() |
static boolean |
isResponseLine(Buffer buffer)
Simple method to check whether the supplied buffer could be a SIP
response line.
|
static SipInitialLine |
parse(Buffer buffer)
Parse the buffer into a SIP initial line, which either can be a
SipRequestLine or a SipResponseLine. |
static SipInitialLine |
parse(Buffer part1,
Buffer part2,
Buffer part3) |
SipRequestLine |
toRequestLine() |
SipResponseLine |
toResponseLine() |
consumeAddressSpec, consumeAddressSpec, consumeAlphaNum, consumeCOLON, consumeCOMMA, consumeCRLF, consumeDisplayName, consumeEQUAL, consumeGenericParam, consumeGenericParams, consumeHostname, consumeLAQUOT, consumeLDQUOT, consumeLPAREN, consumeLWS, consumeMSubtype, consumeMType, consumePort, consumeQuotedString, consumeRAQUOT, consumeRDQUOT, consumeRPAREN, consumeSEMI, consumeSentBye, consumeSentProtocol, consumeSLASH, consumeSTAR, consumeSWS, consumeSWSAfterHColon, consumeToken, consumeUserInfoHostPort, consumeVia, consumeWS, couldBeSipMessage, couldBeSipMessage, expect, expect, expectDigit, expectHCOLON, expectHCOLONStreamFriendly, expectMethod, expectSIP2_0, expectSLASH, expectTel, expectToken, expectWS, frame, frame2, getAlphaNumCount, getFramer, getTokenCount, isAlpha, isAlpha, isAlphaNum, isAlphaNum, isDigit, isDigit, isHostPortCharacter, isHostPortCharacter, isNext, isNextAlphaNum, isNextDigit, isSCTP, isSCTPLower, isSips, isTCP, isTCPLower, isTLS, isTLSLower, isUDP, isUDPLower, isWS, isWSLower, isWSS, isWSSLower, nextHeader, nextHeaderName, nextHeaderNameDontCheckHColon, nextHeaders, readHeaderValues, readHeaderValuespublic abstract boolean equals(Object other)
public abstract Buffer getBuffer()
public static boolean isResponseLine(Buffer buffer) throws IOException
SipFramer#couldBeSipMessage(Buffer)) then it is very likely that
it is a request line.IOExceptionIndexOutOfBoundsExceptionpublic static final SipInitialLine parse(Buffer buffer) throws SipParseException
SipRequestLine or a SipResponseLine.
The parsing will only check so that a few things are correct but in
general it doesn't do any deeper analysis of the initial line. To make
sure that the resulting sip message actually is correct, call the
SipMessage.verify() method, which will do a deeper analysis of
the sip messagebuffer - SipParseExceptionpublic static final SipInitialLine parse(Buffer part1, Buffer part2, Buffer part3) throws SipParseException
SipParseExceptionpublic SipRequestLine toRequestLine()
public SipResponseLine toResponseLine()
public boolean isResponseLine()
public boolean isRequestLine()
public abstract void getBytes(Buffer dst)
SipInitialLine into the
destination Buffer.dst - protected abstract SipInitialLine clone()
Copyright © 2020. All Rights Reserved.