public final class SipResponseImpl extends SipMessageImpl implements SipResponse
Call_ID_HEADER, CSEQ_HEADER, FROM_HEADER, TO_HEADER
Constructor and Description |
---|
SipResponseImpl(Buffer initialLine,
Buffer headers,
Buffer payload) |
SipResponseImpl(SipResponseLine initialLine,
Buffer headers,
Buffer payload) |
Modifier and Type | Method and Description |
---|---|
SipResponse |
clone()
Perform a deep clone of this SipMessage.
|
Buffer |
getMethod()
Get the method of this sip message
|
int |
getStatus()
Get the status code of this SIP response
|
boolean |
is100Trying()
Convenience method for checking whether this is a 100 Trying response or
not.
|
boolean |
isClientError()
Convenience method for checking whether this is a 4xx response or not.
|
boolean |
isFinal()
Convenience method for checking whether this response is a final response, i.e.
|
boolean |
isGlobalError()
Convenience method for checking whether this is a 6xx response or not.
|
boolean |
isProvisional()
Convenience method for checking whether this is a 1xx response or not.
|
boolean |
isRedirect()
Convenience method for checking whether this is a 3xx response or not.
|
boolean |
isRinging()
Convenience method for checking whether this is a 180 Ringing response or
or a 183 Early Media response.
|
boolean |
isServerError()
Convenience method for checking whether this is a 5xx response or not.
|
boolean |
isSuccess()
Convenience method for checking whether this is a 2xx response or not.
|
boolean |
isTimeout()
Convenience method for checking whether this is a 480 Timeout response or
not.
|
ViaHeader |
popViaHeader()
Pop the top-most
ViaHeader . |
SipResponse |
toResponse()
Got tired of casting the
SipMessage into a SipResponse so
you can use this method instead. |
addHeader, addHeaderFirst, cloneHeaders, clonePayload, createResponse, getCallIDHeader, getContactHeader, getContent, getContentTypeHeader, getCSeqHeader, 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, toRequest, toString, transferHeaders, verify
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addHeader, addHeaderFirst, createResponse, frame, frame, 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, isRegister, isRequest, isResponse, popHeader, setHeader, toBuffer, toRequest, verify
public SipResponseImpl(Buffer initialLine, Buffer headers, Buffer payload)
initialLine
- headers
- payload
- public SipResponseImpl(SipResponseLine initialLine, Buffer headers, Buffer payload)
public Buffer getMethod() throws SipParseException
getMethod
in interface SipMessage
getMethod
in class SipMessageImpl
SipParseException
public int getStatus()
getStatus
in interface SipResponse
public boolean isProvisional()
isProvisional
in interface SipResponse
public boolean isFinal()
isFinal
in interface SipResponse
public boolean isSuccess()
isSuccess
in interface SipResponse
public boolean isRedirect()
isRedirect
in interface SipResponse
public boolean isClientError()
isClientError
in interface SipResponse
public boolean isServerError()
isServerError
in interface SipResponse
public boolean isGlobalError()
isGlobalError
in interface SipResponse
public boolean is100Trying()
is100Trying
in interface SipResponse
public boolean isRinging()
isRinging
in interface SipResponse
public boolean isTimeout()
isTimeout
in interface SipResponse
public SipResponse toResponse() throws java.lang.ClassCastException
SipMessage
SipMessage
into a SipResponse
so
you can use this method instead. Just a short cut for:
(SipResponse)sipMessage;
toResponse
in interface SipMessage
toResponse
in class SipMessageImpl
SipResponse
java.lang.ClassCastException
- in case this SipMessage
is actually a
SipResponse
.public SipResponse clone()
SipMessage
clone
in interface SipMessage
clone
in interface SipResponse
clone
in class SipMessageImpl
public ViaHeader popViaHeader() throws SipParseException
SipResponse
ViaHeader
.
This is a convenience method for calling SipMessage.popHeader(Buffer)
.popViaHeader
in interface SipResponse
ViaHeader
or null if this SipResponse
contained no
ViaHeader
s.SipParseException
Copyright © 2014. All Rights Reserved.