org.echarts.servlet.sip.messages
Class Request
java.lang.Object
org.echarts.servlet.sip.messages.Request
- All Implemented Interfaces:
- java.lang.Cloneable, javax.servlet.ServletRequest, SipServletMessage, SipServletRequest
- Direct Known Subclasses:
- Ack, Bye, Cancel, Info, Invite, Message, Notify, Options, Prack, Register, Subscribe
public class Request
- extends java.lang.Object
- implements SipServletRequest
Represents SIP request.
Method Summary |
void |
addAcceptLanguage(java.util.Locale arg0)
|
void |
addAddressHeader(java.lang.String arg0,
Address arg1,
boolean arg2)
|
void |
addAuthHeader(SipServletResponse arg0,
AuthInfo arg1)
|
void |
addAuthHeader(SipServletResponse arg0,
java.lang.String arg1,
java.lang.String arg2)
|
void |
addHeader(java.lang.String arg0,
java.lang.String arg1)
|
void |
addParameterableHeader(java.lang.String arg0,
Parameterable arg1,
boolean arg2)
|
SipServletRequest |
createCancel()
|
static Request |
createMessage(SipServletRequest req)
Factory method to create a specific subclass based on request method. |
SipServletResponse |
createResponse(int arg0)
|
SipServletResponse |
createResponse(int arg0,
java.lang.String arg1)
|
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()
|
B2buaHelper |
getB2buaHelper()
|
java.lang.String |
getCallId()
|
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 headerName)
|
SipServletMessage.HeaderForm |
getHeaderForm()
|
java.util.Iterator<java.lang.String> |
getHeaderNames()
|
java.util.ListIterator<java.lang.String> |
getHeaders(java.lang.String arg0)
|
Address |
getInitialPoppedRoute()
|
java.lang.String |
getInitialRemoteAddr()
|
int |
getInitialRemotePort()
|
java.lang.String |
getInitialTransport()
|
javax.servlet.ServletInputStream |
getInputStream()
|
java.lang.String |
getLocalAddr()
|
java.util.Locale |
getLocale()
|
java.util.Enumeration |
getLocales()
|
java.lang.String |
getLocalName()
|
int |
getLocalPort()
|
int |
getMaxForwards()
|
java.lang.String |
getMethod()
|
SipServletRequest |
getOriginalMessage()
|
java.lang.String |
getParameter(java.lang.String arg0)
|
Parameterable |
getParameterableHeader(java.lang.String arg0)
|
java.util.ListIterator<? extends Parameterable> |
getParameterableHeaders(java.lang.String arg0)
|
java.util.Map |
getParameterMap()
|
java.util.Enumeration |
getParameterNames()
|
java.lang.String[] |
getParameterValues(java.lang.String arg0)
|
Address |
getPoppedRoute()
|
java.lang.String |
getProtocol()
|
Proxy |
getProxy()
|
Proxy |
getProxy(boolean arg0)
|
byte[] |
getRawContent()
|
java.io.BufferedReader |
getReader()
|
java.lang.String |
getRealPath(java.lang.String arg0)
Deprecated. |
SipApplicationRoutingRegion |
getRegion()
|
java.lang.String |
getRemoteAddr()
|
java.lang.String |
getRemoteHost()
|
int |
getRemotePort()
|
java.lang.String |
getRemoteUser()
|
javax.servlet.RequestDispatcher |
getRequestDispatcher(java.lang.String arg0)
|
URI |
getRequestURI()
|
SipApplicationRoutingDirective |
getRoutingDirective()
|
java.lang.String |
getScheme()
|
java.lang.String |
getServerName()
|
int |
getServerPort()
|
SipSession |
getSession()
|
SipSession |
getSession(boolean arg0)
|
URI |
getSubscriberURI()
|
Address |
getTo()
|
java.lang.String |
getTransport()
|
java.security.Principal |
getUserPrincipal()
|
boolean |
isCommitted()
|
boolean |
isInitial()
|
boolean |
isSecure()
|
boolean |
isUserInRole(java.lang.String arg0)
|
void |
pushPath(Address arg0)
|
void |
pushRoute(Address arg0)
|
void |
pushRoute(SipURI arg0)
|
void |
removeAttribute(java.lang.String arg0)
|
void |
removeHeader(java.lang.String arg0)
|
void |
send()
|
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 |
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 headerName,
java.lang.String headerValue)
|
void |
setHeaderForm(SipServletMessage.HeaderForm arg0)
|
void |
setMaxForwards(int arg0)
|
void |
setOriginalRequestURI(URI originalRequestURI)
|
void |
setParameterableHeader(java.lang.String arg0,
Parameterable arg1)
|
void |
setRequestURI(URI uri)
|
void |
setRoutingDirective(SipApplicationRoutingDirective arg0,
SipServletRequest arg1)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Request
public Request(SipServletRequest req)
createMessage
public static Request createMessage(SipServletRequest req)
- Factory method to create a specific subclass based on request method.
If method is unknown, then a generic Request object will be returned.
getOriginalMessage
public SipServletRequest getOriginalMessage()
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
setOriginalRequestURI
public void setOriginalRequestURI(URI originalRequestURI)
getRequestURI
public URI getRequestURI()
- Specified by:
getRequestURI
in interface SipServletRequest
getProxy
public Proxy getProxy()
throws TooManyHopsException
- Specified by:
getProxy
in interface SipServletRequest
- Throws:
TooManyHopsException
getContentLength
public int getContentLength()
- Specified by:
getContentLength
in interface javax.servlet.ServletRequest
- Specified by:
getContentLength
in interface SipServletMessage
getContent
public java.lang.Object getContent()
throws java.io.IOException,
java.io.UnsupportedEncodingException
- Specified by:
getContent
in interface SipServletMessage
- Throws:
java.io.IOException
java.io.UnsupportedEncodingException
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType
in interface javax.servlet.ServletRequest
- Specified by:
getContentType
in interface SipServletMessage
setRequestURI
public void setRequestURI(URI uri)
- Specified by:
setRequestURI
in interface SipServletRequest
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
getSession
public SipSession getSession()
- Specified by:
getSession
in interface SipServletMessage
createCancel
public SipServletRequest createCancel()
- Specified by:
createCancel
in interface SipServletRequest
getHeader
public java.lang.String getHeader(java.lang.String headerName)
- Specified by:
getHeader
in interface SipServletMessage
setHeader
public void setHeader(java.lang.String headerName,
java.lang.String headerValue)
- Specified by:
setHeader
in interface SipServletMessage
pushRoute
public void pushRoute(SipURI arg0)
- Specified by:
pushRoute
in interface SipServletRequest
getMaxForwards
public int getMaxForwards()
- Specified by:
getMaxForwards
in interface SipServletRequest
setMaxForwards
public void setMaxForwards(int arg0)
- Specified by:
setMaxForwards
in interface SipServletRequest
send
public void send()
throws java.io.IOException
- Specified by:
send
in interface SipServletMessage
- Specified by:
send
in interface SipServletRequest
- Throws:
java.io.IOException
isInitial
public boolean isInitial()
- Specified by:
isInitial
in interface SipServletRequest
getInputStream
public javax.servlet.ServletInputStream getInputStream()
throws java.io.IOException
- Specified by:
getInputStream
in interface javax.servlet.ServletRequest
- Specified by:
getInputStream
in interface SipServletRequest
- Throws:
java.io.IOException
getReader
public java.io.BufferedReader getReader()
throws java.io.IOException
- Specified by:
getReader
in interface javax.servlet.ServletRequest
- Specified by:
getReader
in interface SipServletRequest
- Throws:
java.io.IOException
getProxy
public Proxy getProxy(boolean arg0)
throws TooManyHopsException
- Specified by:
getProxy
in interface SipServletRequest
- Throws:
TooManyHopsException
createResponse
public SipServletResponse createResponse(int arg0)
- Specified by:
createResponse
in interface SipServletRequest
createResponse
public SipServletResponse createResponse(int arg0,
java.lang.String arg1)
- Specified by:
createResponse
in interface SipServletRequest
getAttribute
public java.lang.Object getAttribute(java.lang.String arg0)
- Specified by:
getAttribute
in interface javax.servlet.ServletRequest
- Specified by:
getAttribute
in interface SipServletMessage
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()
- Specified by:
getAttributeNames
in interface javax.servlet.ServletRequest
- Specified by:
getAttributeNames
in interface SipServletMessage
getCharacterEncoding
public java.lang.String getCharacterEncoding()
- Specified by:
getCharacterEncoding
in interface javax.servlet.ServletRequest
- Specified by:
getCharacterEncoding
in interface SipServletMessage
getLocale
public java.util.Locale getLocale()
- Specified by:
getLocale
in interface javax.servlet.ServletRequest
getLocales
public java.util.Enumeration getLocales()
- Specified by:
getLocales
in interface javax.servlet.ServletRequest
getParameter
public java.lang.String getParameter(java.lang.String arg0)
- Specified by:
getParameter
in interface javax.servlet.ServletRequest
getParameterNames
public java.util.Enumeration getParameterNames()
- Specified by:
getParameterNames
in interface javax.servlet.ServletRequest
getParameterValues
public java.lang.String[] getParameterValues(java.lang.String arg0)
- Specified by:
getParameterValues
in interface javax.servlet.ServletRequest
getProtocol
public java.lang.String getProtocol()
- Specified by:
getProtocol
in interface javax.servlet.ServletRequest
- Specified by:
getProtocol
in interface SipServletMessage
getRealPath
@Deprecated
public java.lang.String getRealPath(java.lang.String arg0)
- Deprecated.
- Specified by:
getRealPath
in interface javax.servlet.ServletRequest
getRemoteAddr
public java.lang.String getRemoteAddr()
- Specified by:
getRemoteAddr
in interface javax.servlet.ServletRequest
- Specified by:
getRemoteAddr
in interface SipServletMessage
getRemoteHost
public java.lang.String getRemoteHost()
- Specified by:
getRemoteHost
in interface javax.servlet.ServletRequest
getRequestDispatcher
public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String arg0)
- Specified by:
getRequestDispatcher
in interface javax.servlet.ServletRequest
getScheme
public java.lang.String getScheme()
- Specified by:
getScheme
in interface javax.servlet.ServletRequest
getServerName
public java.lang.String getServerName()
- Specified by:
getServerName
in interface javax.servlet.ServletRequest
getServerPort
public int getServerPort()
- Specified by:
getServerPort
in interface javax.servlet.ServletRequest
isSecure
public boolean isSecure()
- Specified by:
isSecure
in interface javax.servlet.ServletRequest
- Specified by:
isSecure
in interface SipServletMessage
setAttribute
public void setAttribute(java.lang.String arg0,
java.lang.Object arg1)
- Specified by:
setAttribute
in interface javax.servlet.ServletRequest
- Specified by:
setAttribute
in interface SipServletMessage
getParameterMap
public java.util.Map getParameterMap()
- Specified by:
getParameterMap
in interface javax.servlet.ServletRequest
removeAttribute
public void removeAttribute(java.lang.String arg0)
- Specified by:
removeAttribute
in interface javax.servlet.ServletRequest
- Specified by:
removeAttribute
in interface SipServletMessage
setCharacterEncoding
public void setCharacterEncoding(java.lang.String arg0)
throws java.io.UnsupportedEncodingException
- Specified by:
setCharacterEncoding
in interface javax.servlet.ServletRequest
- Specified by:
setCharacterEncoding
in interface SipServletMessage
- Throws:
java.io.UnsupportedEncodingException
getFrom
public Address getFrom()
- Specified by:
getFrom
in interface SipServletMessage
getTo
public Address getTo()
- Specified by:
getTo
in interface SipServletMessage
getMethod
public java.lang.String getMethod()
- Specified by:
getMethod
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
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
setContentLength
public void setContentLength(int arg0)
- Specified by:
setContentLength
in interface SipServletMessage
setContentType
public void setContentType(java.lang.String arg0)
- Specified by:
setContentType
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
isCommitted
public boolean isCommitted()
- Specified by:
isCommitted
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 javax.servlet.ServletRequest
- Specified by:
getLocalAddr
in interface SipServletMessage
getLocalPort
public int getLocalPort()
- Specified by:
getLocalPort
in interface javax.servlet.ServletRequest
- Specified by:
getLocalPort
in interface SipServletMessage
getRemotePort
public int getRemotePort()
- Specified by:
getRemotePort
in interface javax.servlet.ServletRequest
- Specified by:
getRemotePort
in interface SipServletMessage
getTransport
public java.lang.String getTransport()
- Specified by:
getTransport
in interface SipServletMessage
getLocalName
public java.lang.String getLocalName()
- Specified by:
getLocalName
in interface javax.servlet.ServletRequest
addAuthHeader
public void addAuthHeader(SipServletResponse arg0,
AuthInfo arg1)
- Specified by:
addAuthHeader
in interface SipServletRequest
addAuthHeader
public void addAuthHeader(SipServletResponse arg0,
java.lang.String arg1,
java.lang.String arg2)
- Specified by:
addAuthHeader
in interface SipServletRequest
addParameterableHeader
public void addParameterableHeader(java.lang.String arg0,
Parameterable arg1,
boolean arg2)
- Specified by:
addParameterableHeader
in interface SipServletMessage
getB2buaHelper
public B2buaHelper getB2buaHelper()
- Specified by:
getB2buaHelper
in interface SipServletRequest
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
getPoppedRoute
public Address getPoppedRoute()
- Specified by:
getPoppedRoute
in interface SipServletRequest
getRoutingDirective
public SipApplicationRoutingDirective getRoutingDirective()
- Specified by:
getRoutingDirective
in interface SipServletRequest
getSubscriberURI
public URI getSubscriberURI()
- Specified by:
getSubscriberURI
in interface SipServletRequest
getRegion
public SipApplicationRoutingRegion getRegion()
- Specified by:
getRegion
in interface SipServletRequest
getInitialPoppedRoute
public Address getInitialPoppedRoute()
- Specified by:
getInitialPoppedRoute
in interface SipServletRequest
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
pushPath
public void pushPath(Address arg0)
- Specified by:
pushPath
in interface SipServletRequest
pushRoute
public void pushRoute(Address arg0)
- Specified by:
pushRoute
in interface SipServletRequest
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
setRoutingDirective
public void setRoutingDirective(SipApplicationRoutingDirective arg0,
SipServletRequest arg1)
- Specified by:
setRoutingDirective
in interface SipServletRequest