public final class SipRequestImpl extends SipMessageImpl implements SipRequest
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
|
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, getFromHeader, getHeader, getHeader, getInitialLine, getMaxForwards, getRawContent, getRecordRouteHeader, getRecordRouteHeaders, getRequestLine, getResponseLine, getRouteHeader, getRouteHeaders, getToHeader, getViaHeader, getViaHeaders, hasContent, isAck, isBye, isCancel, isInfo, isInitial, isInvite, isMessage, isOptions, isRequest, isResponse, setHeader, toBuffer, toResponse, toString, transferHeaders, verify
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addHeader, addHeaderFirst, getCallIDHeader, getContactHeader, getContent, getContentTypeHeader, getCSeqHeader, getFromHeader, getHeader, getHeader, getInitialLine, getMaxForwards, getRawContent, getRecordRouteHeader, getRecordRouteHeaders, getRouteHeader, getRouteHeaders, getToHeader, getViaHeader, getViaHeaders, hasContent, isAck, isBye, isCancel, isInfo, isInitial, isInvite, isMessage, isOptions, isRequest, isResponse, 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 SipRequest toRequest() throws 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
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, 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
ClassCastException
Copyright © 2013. All Rights Reserved.