org.echarts.servlet.sip.messages
Class Response
java.lang.Object
org.echarts.servlet.sip.messages.Response
- All Implemented Interfaces:
- java.lang.Cloneable, javax.servlet.ServletResponse, SipServletMessage, SipServletResponse
- Direct Known Subclasses:
- FinalResponse, ProvisionalResponse
public class Response
- extends java.lang.Object
- implements SipServletResponse
Represents SIP response.
Fields inherited from interface javax.servlet.sip.SipServletResponse |
SC_ACCEPTED, SC_ADDRESS_INCOMPLETE, SC_ALTERNATIVE_SERVICE, SC_AMBIGUOUS, SC_BAD_EVENT, SC_BAD_EXTENSION, SC_BAD_GATEWAY, SC_BAD_IDENTITY_INFO, SC_BAD_REQUEST, SC_BUSY_EVERYWHERE, SC_BUSY_HERE, SC_CALL_BEING_FORWARDED, SC_CALL_LEG_DONE, SC_CALL_QUEUED, SC_CONDITIONAL_REQUEST_FAILED, SC_DECLINE, SC_DOES_NOT_EXIT_ANYWHERE, SC_EXTENSION_REQUIRED, SC_FORBIDDEN, SC_GONE, SC_INTERVAL_TOO_BRIEF, SC_INVALID_IDENTITY_HEADER, SC_LOOP_DETECTED, SC_MESSAGE_TOO_LARGE, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NOT_ACCEPTABLE, SC_NOT_ACCEPTABLE_ANYWHERE, SC_NOT_ACCEPTABLE_HERE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_OK, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILURE, SC_PROVIDE_REFERER_IDENTITY, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_PENDING, SC_REQUEST_TERMINATED, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_RINGING, SC_SECURITY_AGREEMENT_REQUIRED, SC_SERVER_INTERNAL_ERROR, SC_SERVER_TIMEOUT, SC_SERVICE_UNAVAILABLE, SC_SESSION_INTERVAL_TOO_SMALL, SC_SESSION_PROGRESS, SC_TEMPORARLY_UNAVAILABLE, SC_TOO_MANY_HOPS, SC_TRYING, SC_UNAUTHORIZED, SC_UNDECIPHERABLE, SC_UNSUPPORTED_CERTIFICATE, SC_UNSUPPORTED_MEDIA_TYPE, SC_UNSUPPORTED_URI_SCHEME, SC_USE_IDENTITY_HEADER, SC_USE_PROXY, SC_VERSION_NOT_SUPPORTED |
Method Summary |
void |
addAcceptLanguage(java.util.Locale arg0)
|
void |
addAddressHeader(java.lang.String arg0,
Address arg1,
boolean arg2)
|
void |
addHeader(java.lang.String arg0,
java.lang.String arg1)
|
void |
addParameterableHeader(java.lang.String arg0,
Parameterable arg1,
boolean arg2)
|
SipServletRequest |
createAck()
|
static Response |
createMessage(SipServletResponse res)
|
SipServletRequest |
createPrack()
|
void |
flushBuffer()
|
java.util.Locale |
getAcceptLanguage()
|
java.util.Iterator<java.util.Locale> |
getAcceptLanguages()
|
Address |
getAddressHeader(java.lang.String arg0)
|
java.util.ListIterator<Address> |
getAddressHeaders(java.lang.String arg0)
|
SipApplicationSession |
getApplicationSession()
|
SipApplicationSession |
getApplicationSession(boolean arg0)
|
java.lang.Object |
getAttribute(java.lang.String arg0)
|
java.util.Enumeration<java.lang.String> |
getAttributeNames()
|
int |
getBufferSize()
|
java.lang.String |
getCallId()
|
java.util.Iterator<java.lang.String> |
getChallengeRealms()
|
java.lang.String |
getCharacterEncoding()
|
java.lang.Object |
getContent()
|
byte[] |
getContentAsBytes()
|
java.lang.String |
getContentAsString()
|
java.util.Locale |
getContentLanguage()
|
int |
getContentLength()
|
java.lang.String |
getContentType()
|
int |
getExpires()
|
Address |
getFrom()
|
java.lang.String |
getHeader(java.lang.String arg0)
|
SipServletMessage.HeaderForm |
getHeaderForm()
|
java.util.Iterator<java.lang.String> |
getHeaderNames()
|
java.util.ListIterator<java.lang.String> |
getHeaders(java.lang.String arg0)
|
java.lang.String |
getInitialRemoteAddr()
|
int |
getInitialRemotePort()
|
java.lang.String |
getInitialTransport()
|
java.lang.String |
getLocalAddr()
|
java.util.Locale |
getLocale()
|
int |
getLocalPort()
|
java.lang.String |
getMethod()
|
SipServletResponse |
getOriginalMessage()
|
javax.servlet.ServletOutputStream |
getOutputStream()
|
Parameterable |
getParameterableHeader(java.lang.String arg0)
|
java.util.ListIterator<? extends Parameterable> |
getParameterableHeaders(java.lang.String arg0)
|
java.lang.String |
getProtocol()
|
Proxy |
getProxy()
|
ProxyBranch |
getProxyBranch()
|
byte[] |
getRawContent()
|
java.lang.String |
getReasonPhrase()
|
java.lang.String |
getRemoteAddr()
|
int |
getRemotePort()
|
java.lang.String |
getRemoteUser()
|
SipServletRequest |
getRequest()
|
SipSession |
getSession()
|
SipSession |
getSession(boolean arg0)
|
int |
getStatus()
|
Address |
getTo()
|
java.lang.String |
getTransport()
|
java.security.Principal |
getUserPrincipal()
|
java.io.PrintWriter |
getWriter()
|
boolean |
isBranchResponse()
|
boolean |
isCommitted()
|
boolean |
isOtherResponse()
Returns true if this message is a response to an 'OtherRequest'
message instance. |
boolean |
isSecure()
|
boolean |
isUserInRole(java.lang.String arg0)
|
void |
removeAttribute(java.lang.String arg0)
|
void |
removeHeader(java.lang.String arg0)
|
void |
reset()
|
void |
resetBuffer()
|
void |
send()
|
void |
sendReliably()
|
void |
setAcceptLanguage(java.util.Locale arg0)
|
void |
setAddressHeader(java.lang.String arg0,
Address arg1)
|
void |
setAttribute(java.lang.String arg0,
java.lang.Object arg1)
|
void |
setBufferSize(int arg0)
|
void |
setCharacterEncoding(java.lang.String arg0)
|
void |
setContent(java.lang.Object content,
java.lang.String contentType)
|
void |
setContentLanguage(java.util.Locale arg0)
|
void |
setContentLength(int arg0)
|
void |
setContentType(java.lang.String arg0)
|
void |
setExpires(int arg0)
|
void |
setHeader(java.lang.String arg0,
java.lang.String arg1)
|
void |
setHeaderForm(SipServletMessage.HeaderForm arg0)
|
void |
setLocale(java.util.Locale arg0)
|
void |
setParameterableHeader(java.lang.String arg0,
Parameterable arg1)
|
void |
setStatus(int arg0)
|
void |
setStatus(int arg0,
java.lang.String arg1)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
createMessage
public static Response createMessage(SipServletResponse res)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getContentAsString
public java.lang.String getContentAsString()
throws java.io.IOException
- Throws:
java.io.IOException
getContentAsBytes
public byte[] getContentAsBytes()
throws java.io.IOException
- Throws:
java.io.IOException
getStatus
public int getStatus()
- Specified by:
getStatus
in interface SipServletResponse
getMethod
public java.lang.String getMethod()
- Specified by:
getMethod
in interface SipServletMessage
getRequest
public SipServletRequest getRequest()
- Specified by:
getRequest
in interface SipServletResponse
getContentLength
public int getContentLength()
- Specified by:
getContentLength
in interface SipServletMessage
getContent
public java.lang.Object getContent()
throws java.io.IOException
- Specified by:
getContent
in interface SipServletMessage
- Throws:
java.io.IOException
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType
in interface javax.servlet.ServletResponse
- Specified by:
getContentType
in interface SipServletMessage
setContent
public void setContent(java.lang.Object content,
java.lang.String contentType)
throws java.io.UnsupportedEncodingException
- Specified by:
setContent
in interface SipServletMessage
- Throws:
java.io.UnsupportedEncodingException
createAck
public SipServletRequest createAck()
- Specified by:
createAck
in interface SipServletResponse
getOriginalMessage
public SipServletResponse getOriginalMessage()
setStatus
public void setStatus(int arg0)
- Specified by:
setStatus
in interface SipServletResponse
setStatus
public void setStatus(int arg0,
java.lang.String arg1)
- Specified by:
setStatus
in interface SipServletResponse
getReasonPhrase
public java.lang.String getReasonPhrase()
- Specified by:
getReasonPhrase
in interface SipServletResponse
getOutputStream
public javax.servlet.ServletOutputStream getOutputStream()
throws java.io.IOException
- Specified by:
getOutputStream
in interface javax.servlet.ServletResponse
- Specified by:
getOutputStream
in interface SipServletResponse
- Throws:
java.io.IOException
getWriter
public java.io.PrintWriter getWriter()
throws java.io.IOException
- Specified by:
getWriter
in interface javax.servlet.ServletResponse
- Specified by:
getWriter
in interface SipServletResponse
- Throws:
java.io.IOException
getProxy
public Proxy getProxy()
- Specified by:
getProxy
in interface SipServletResponse
sendReliably
public void sendReliably()
throws Rel100Exception
- Specified by:
sendReliably
in interface SipServletResponse
- Throws:
Rel100Exception
send
public void send()
throws java.io.IOException
- Specified by:
send
in interface SipServletMessage
- Specified by:
send
in interface SipServletResponse
- Throws:
java.io.IOException
flushBuffer
public void flushBuffer()
throws java.io.IOException
- Specified by:
flushBuffer
in interface javax.servlet.ServletResponse
- Throws:
java.io.IOException
getBufferSize
public int getBufferSize()
- Specified by:
getBufferSize
in interface javax.servlet.ServletResponse
getCharacterEncoding
public java.lang.String getCharacterEncoding()
- Specified by:
getCharacterEncoding
in interface javax.servlet.ServletResponse
- Specified by:
getCharacterEncoding
in interface SipServletMessage
getLocale
public java.util.Locale getLocale()
- Specified by:
getLocale
in interface javax.servlet.ServletResponse
isCommitted
public boolean isCommitted()
- Specified by:
isCommitted
in interface javax.servlet.ServletResponse
- Specified by:
isCommitted
in interface SipServletMessage
reset
public void reset()
- Specified by:
reset
in interface javax.servlet.ServletResponse
resetBuffer
public void resetBuffer()
- Specified by:
resetBuffer
in interface javax.servlet.ServletResponse
setBufferSize
public void setBufferSize(int arg0)
- Specified by:
setBufferSize
in interface javax.servlet.ServletResponse
setContentLength
public void setContentLength(int arg0)
- Specified by:
setContentLength
in interface javax.servlet.ServletResponse
- Specified by:
setContentLength
in interface SipServletMessage
setContentType
public void setContentType(java.lang.String arg0)
- Specified by:
setContentType
in interface javax.servlet.ServletResponse
- Specified by:
setContentType
in interface SipServletMessage
setLocale
public void setLocale(java.util.Locale arg0)
- Specified by:
setLocale
in interface javax.servlet.ServletResponse
getFrom
public Address getFrom()
- Specified by:
getFrom
in interface SipServletMessage
getTo
public Address getTo()
- Specified by:
getTo
in interface SipServletMessage
getProtocol
public java.lang.String getProtocol()
- Specified by:
getProtocol
in interface SipServletMessage
getHeader
public java.lang.String getHeader(java.lang.String arg0)
- Specified by:
getHeader
in interface SipServletMessage
getHeaders
public java.util.ListIterator<java.lang.String> getHeaders(java.lang.String arg0)
- Specified by:
getHeaders
in interface SipServletMessage
getHeaderNames
public java.util.Iterator<java.lang.String> getHeaderNames()
- Specified by:
getHeaderNames
in interface SipServletMessage
setHeader
public void setHeader(java.lang.String arg0,
java.lang.String arg1)
- Specified by:
setHeader
in interface SipServletMessage
addHeader
public void addHeader(java.lang.String arg0,
java.lang.String arg1)
- Specified by:
addHeader
in interface SipServletMessage
removeHeader
public void removeHeader(java.lang.String arg0)
- Specified by:
removeHeader
in interface SipServletMessage
getAddressHeader
public Address getAddressHeader(java.lang.String arg0)
throws ServletParseException
- Specified by:
getAddressHeader
in interface SipServletMessage
- Throws:
ServletParseException
getAddressHeaders
public java.util.ListIterator<Address> getAddressHeaders(java.lang.String arg0)
throws ServletParseException
- Specified by:
getAddressHeaders
in interface SipServletMessage
- Throws:
ServletParseException
setAddressHeader
public void setAddressHeader(java.lang.String arg0,
Address arg1)
- Specified by:
setAddressHeader
in interface SipServletMessage
addAddressHeader
public void addAddressHeader(java.lang.String arg0,
Address arg1,
boolean arg2)
- Specified by:
addAddressHeader
in interface SipServletMessage
getCallId
public java.lang.String getCallId()
- Specified by:
getCallId
in interface SipServletMessage
getExpires
public int getExpires()
- Specified by:
getExpires
in interface SipServletMessage
setExpires
public void setExpires(int arg0)
- Specified by:
setExpires
in interface SipServletMessage
getRawContent
public byte[] getRawContent()
throws java.io.IOException
- Specified by:
getRawContent
in interface SipServletMessage
- Throws:
java.io.IOException
getAttribute
public java.lang.Object getAttribute(java.lang.String arg0)
- Specified by:
getAttribute
in interface SipServletMessage
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()
- Specified by:
getAttributeNames
in interface SipServletMessage
setAttribute
public void setAttribute(java.lang.String arg0,
java.lang.Object arg1)
- Specified by:
setAttribute
in interface SipServletMessage
getSession
public SipSession getSession()
- Specified by:
getSession
in interface SipServletMessage
getSession
public SipSession getSession(boolean arg0)
- Specified by:
getSession
in interface SipServletMessage
getApplicationSession
public SipApplicationSession getApplicationSession()
- Specified by:
getApplicationSession
in interface SipServletMessage
getApplicationSession
public SipApplicationSession getApplicationSession(boolean arg0)
- Specified by:
getApplicationSession
in interface SipServletMessage
getAcceptLanguage
public java.util.Locale getAcceptLanguage()
- Specified by:
getAcceptLanguage
in interface SipServletMessage
getAcceptLanguages
public java.util.Iterator<java.util.Locale> getAcceptLanguages()
- Specified by:
getAcceptLanguages
in interface SipServletMessage
setAcceptLanguage
public void setAcceptLanguage(java.util.Locale arg0)
- Specified by:
setAcceptLanguage
in interface SipServletMessage
addAcceptLanguage
public void addAcceptLanguage(java.util.Locale arg0)
- Specified by:
addAcceptLanguage
in interface SipServletMessage
setContentLanguage
public void setContentLanguage(java.util.Locale arg0)
- Specified by:
setContentLanguage
in interface SipServletMessage
getContentLanguage
public java.util.Locale getContentLanguage()
- Specified by:
getContentLanguage
in interface SipServletMessage
isSecure
public boolean isSecure()
- Specified by:
isSecure
in interface SipServletMessage
getRemoteUser
public java.lang.String getRemoteUser()
- Specified by:
getRemoteUser
in interface SipServletMessage
isUserInRole
public boolean isUserInRole(java.lang.String arg0)
- Specified by:
isUserInRole
in interface SipServletMessage
getUserPrincipal
public java.security.Principal getUserPrincipal()
- Specified by:
getUserPrincipal
in interface SipServletMessage
getLocalAddr
public java.lang.String getLocalAddr()
- Specified by:
getLocalAddr
in interface SipServletMessage
getLocalPort
public int getLocalPort()
- Specified by:
getLocalPort
in interface SipServletMessage
getRemoteAddr
public java.lang.String getRemoteAddr()
- Specified by:
getRemoteAddr
in interface SipServletMessage
getRemotePort
public int getRemotePort()
- Specified by:
getRemotePort
in interface SipServletMessage
getTransport
public java.lang.String getTransport()
- Specified by:
getTransport
in interface SipServletMessage
isBranchResponse
public boolean isBranchResponse()
- Specified by:
isBranchResponse
in interface SipServletResponse
getProxyBranch
public ProxyBranch getProxyBranch()
- Specified by:
getProxyBranch
in interface SipServletResponse
isOtherResponse
public boolean isOtherResponse()
- Returns true if this message is a response to an 'OtherRequest'
message instance.
addParameterableHeader
public void addParameterableHeader(java.lang.String arg0,
Parameterable arg1,
boolean arg2)
- Specified by:
addParameterableHeader
in interface SipServletMessage
createPrack
public SipServletRequest createPrack()
throws Rel100Exception
- Specified by:
createPrack
in interface SipServletResponse
- Throws:
Rel100Exception
getChallengeRealms
public java.util.Iterator<java.lang.String> getChallengeRealms()
- Specified by:
getChallengeRealms
in interface SipServletResponse
getHeaderForm
public SipServletMessage.HeaderForm getHeaderForm()
- Specified by:
getHeaderForm
in interface SipServletMessage
getParameterableHeader
public Parameterable getParameterableHeader(java.lang.String arg0)
throws ServletParseException
- Specified by:
getParameterableHeader
in interface SipServletMessage
- Throws:
ServletParseException
getParameterableHeaders
public java.util.ListIterator<? extends Parameterable> getParameterableHeaders(java.lang.String arg0)
throws ServletParseException
- Specified by:
getParameterableHeaders
in interface SipServletMessage
- Throws:
ServletParseException
getInitialRemoteAddr
public java.lang.String getInitialRemoteAddr()
- Specified by:
getInitialRemoteAddr
in interface SipServletMessage
getInitialRemotePort
public int getInitialRemotePort()
- Specified by:
getInitialRemotePort
in interface SipServletMessage
getInitialTransport
public java.lang.String getInitialTransport()
- Specified by:
getInitialTransport
in interface SipServletMessage
setHeaderForm
public void setHeaderForm(SipServletMessage.HeaderForm arg0)
- Specified by:
setHeaderForm
in interface SipServletMessage
setParameterableHeader
public void setParameterableHeader(java.lang.String arg0,
Parameterable arg1)
- Specified by:
setParameterableHeader
in interface SipServletMessage
setCharacterEncoding
public void setCharacterEncoding(java.lang.String arg0)
- Specified by:
setCharacterEncoding
in interface javax.servlet.ServletResponse
- Specified by:
setCharacterEncoding
in interface SipServletMessage
removeAttribute
public void removeAttribute(java.lang.String arg0)
- Specified by:
removeAttribute
in interface SipServletMessage