public abstract class SipInitialLine extends SipParser
AT, BACK_SLASH, BACKTICK, COLON, COMMA, CR, DASH, DOUBLE_QOUTE, DQUOT, EQ, EXCLAMATIONPOINT, framers, HTAB, LAQUOT, LF, LPAREN, MADDR, MAX_LOOK_AHEAD, METHOD, PERCENT, PERIOD, PLUS, QUESTIONMARK, RAQUOT, RPAREN, SCHEME_SIP, SCHEME_SIP_COLON, SCHEME_SIPS, SCHEME_SIPS_COLON, SCTP, SEMI, SIP2_0, SIP2_0_SLASH, SLASH, SP, STAR, TCP, TICK, TILDE, TLS, TRANSPORT, TRANSPORT_EQ, TTL, UDP, UNDERSCORE, USER, WS| Modifier | Constructor and Description |
|---|---|
protected |
SipInitialLine() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract SipInitialLine |
clone() |
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. |
SipRequestLine |
toRequestLine() |
SipResponseLine |
toResponseLine() |
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, consumeToken, consumeUserInfoHostPort, consumeVia, consumeWS, couldBeSipMessage, expect, expect, expectDigit, expectHCOLON, expectMethod, expectSIP2_0, expectSLASH, expectToken, expectWS, frame, getAlphaNumCount, getTokenCount, isAlphaNum, isAlphaNum, isDigit, isDigit, isNext, isNextAlphaNum, isNextDigit, isSCTP, isSCTPLower, isSips, isTCP, isTCPLower, isTLS, isTLSLower, isUDP, isUDPLower, isWS, isWSLower, nextHeader, nextHeaderspublic 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 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 © 2017. All Rights Reserved.