public final class SipRequestImpl extends SipMessageImpl implements SipRequest
SipRequest.Builder
Call_ID_HEADER, CSEQ_HEADER, FROM_HEADER, TO_HEADER
Constructor and Description |
---|
SipRequestImpl(Buffer requestLine,
Buffer headers,
Buffer payload) |
SipRequestImpl(SipRequestLine requestLine,
Buffer headers,
Buffer payload) |
Modifier and Type | Method and Description |
---|---|
SipRequest |
clone()
Perform a deep clone of this SipMessage.
|
SipResponse |
createResponse(int statusCode)
Create a new response based on this
SipRequest . |
Buffer |
getMethod()
Get the method of this sip message
|
URI |
getRequestUri()
Get the request uri of the sip request
|
RouteHeader |
popRouteHeader()
Pop the top-most route header.
|
SipRequest |
toRequest()
Got tired of casting the
SipMessage into a SipRequest so
you can use this method instead. |
addHeader, addHeaderFirst, cloneHeaders, clonePayload, getCallIDHeader, getContactHeader, getContent, getContentTypeHeader, getCSeqHeader, getExpiresHeader, getFromHeader, getHeader, getHeader, getInitialLine, getMaxForwards, getRawContent, getRecordRouteHeader, getRecordRouteHeaders, getRequestLine, getResponseLine, getRouteHeader, getRouteHeaders, getSipHeader, getToHeader, getViaHeader, getViaHeaders, hasContent, isAck, isBye, isCancel, isInfo, isInitial, isInvite, isMessage, isOptions, isRegister, isRequest, isResponse, popHeader, setHeader, toBuffer, toResponse, toString, transferHeaders, verify
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
ack, ack, invite, request
addHeader, addHeaderFirst, frame, frame, getCallIDHeader, getContactHeader, getContent, getContentTypeHeader, getCSeqHeader, getExpiresHeader, getFromHeader, getHeader, getHeader, getInitialLine, getMaxForwards, getRawContent, getRecordRouteHeader, getRecordRouteHeaders, getRouteHeader, getRouteHeaders, getToHeader, getViaHeader, getViaHeaders, hasContent, isAck, isBye, isCancel, isInfo, isInitial, isInvite, isMessage, isOptions, isRegister, isRequest, isResponse, popHeader, setHeader, toBuffer, toResponse, verify
public SipRequestImpl(SipRequestLine requestLine, Buffer headers, Buffer payload)
public Buffer getMethod()
getMethod
in interface SipMessage
getMethod
in class SipMessageImpl
public URI getRequestUri() throws SipParseException
getRequestUri
in interface SipRequest
SipParseException
public RouteHeader popRouteHeader()
SipMessage.popHeader(Buffer)
.popRouteHeader
in interface SipRequest
RouteHeader
or null if this SipRequest
contained no
RouteHeader
s.public SipRequest toRequest() throws java.lang.ClassCastException
SipMessage
SipMessage
into a SipRequest
so
you can use this method instead. Just a short cut for:
(SipRequest)sipMessage;
toRequest
in interface SipMessage
toRequest
in class SipMessageImpl
SipRequest
java.lang.ClassCastException
- in case this SipMessage
is actually a
SipResponse
.public SipRequest clone()
SipMessage
clone
in interface SipMessage
clone
in interface SipRequest
clone
in class SipMessageImpl
public SipResponse createResponse(int statusCode) throws SipParseException, java.lang.ClassCastException
SipRequest
. If this
SipMessage
is not a SipRequest
then a
ClassCastException
will be thrown. Only the mandatory headers
from the SipRequest
are copied. Those mandatory headers are:
createResponse
in interface SipMessage
createResponse
in class SipMessageImpl
SipParseException
- in case anything goes wrong when parsing out headers from the
SipRequest
java.lang.ClassCastException
Copyright © 2014. All Rights Reserved.