|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.servlet.sip.message.SipServletMessageImpl
org.mobicents.servlet.sip.message.SipServletRequestImpl
public class SipServletRequestImpl
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.servlet.sip.SipServletMessage |
|---|
SipServletMessage.HeaderForm |
| Field Summary | |
|---|---|
static java.util.Set<java.lang.String> |
NON_INITIAL_SIP_REQUEST_METHODS
|
static java.lang.String |
STALE
|
| Fields inherited from class org.mobicents.servlet.sip.message.SipServletMessageImpl |
|---|
attributes, currentApplicationName, dialog, headerForm, isMessageSent, message, method, REL100_OPTION_TAG, remoteAddr, remotePort, sessionKey, sipFactoryImpl, sipSession, transactionApplicationData, transport, userPrincipal |
| Constructor Summary | |
|---|---|
SipServletRequestImpl()
|
|
SipServletRequestImpl(javax.sip.message.Request request,
SipFactoryImpl sipFactoryImpl,
MobicentsSipSession sipSession,
javax.sip.Transaction transaction,
javax.sip.Dialog dialog,
boolean createDialog)
|
|
| Method Summary | |
|---|---|
void |
addAcceptLanguage(java.util.Locale locale)
|
void |
addAddressHeader(java.lang.String name,
Address addr,
boolean first)
|
void |
addAuthHeader(SipServletResponse challengeResponse,
AuthInfo authInfo)
|
void |
addAuthHeader(SipServletResponse challengeResponse,
java.lang.String username,
java.lang.String password)
|
void |
addHeader(java.lang.String name,
java.lang.String value)
|
void |
addInfoForRoutingBackToContainer(SipApplicationRouterInfo routerInfo,
java.lang.String applicationSessionId,
java.lang.String applicationName)
Add a route header to route back to the container |
void |
addParameterableHeader(java.lang.String name,
Parameterable param,
boolean first)
|
protected void |
checkMessageState()
|
protected void |
checkReadOnly()
|
void |
cleanUp()
|
void |
cleanUpLastResponses()
|
SipServletRequest |
createCancel()
|
SipServletResponse |
createResponse(int statusCode)
|
SipServletResponse |
createResponse(int statusCode,
java.lang.String reasonPhrase)
|
SipServletResponse |
createResponse(int statusCode,
java.lang.String reasonPhrase,
boolean copyRecordRouteHeaders)
|
SipServletResponse |
createResponse(int statusCode,
java.lang.String reasonPhrase,
boolean copyRecordRouteHeaders,
boolean validate)
|
javax.servlet.AsyncContext |
getAsyncContext()
|
B2buaHelper |
getB2buaHelper()
|
javax.servlet.DispatcherType |
getDispatcherType()
|
Address |
getInitialPoppedRoute()
|
java.lang.String |
getInitialRemoteAddr()
|
int |
getInitialRemotePort()
|
java.lang.String |
getInitialTransport()
|
javax.servlet.ServletInputStream |
getInputStream()
|
SipServletResponse |
getLastFinalResponse()
|
SipServletResponse |
getLastInformationalResponse()
|
SipServletRequestImpl |
getLinkedRequest()
|
java.util.Locale |
getLocale()
|
java.util.Enumeration |
getLocales()
|
java.lang.String |
getLocalName()
|
int |
getMaxForwards()
|
java.lang.String |
getParameter(java.lang.String name)
|
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMap()
|
java.util.Enumeration<java.lang.String> |
getParameterNames()
|
java.lang.String[] |
getParameterValues(java.lang.String name)
|
Address |
getPoppedRoute()
|
javax.sip.header.RouteHeader |
getPoppedRouteHeader()
|
Proxy |
getProxy()
|
Proxy |
getProxy(boolean create)
|
java.io.BufferedReader |
getReader()
|
java.lang.String |
getRealPath(java.lang.String arg0)
|
SipApplicationRoutingRegion |
getRegion()
|
java.lang.String |
getRemoteHost()
|
javax.servlet.RequestDispatcher |
getRequestDispatcher(java.lang.String handler)
|
URI |
getRequestURI()
|
SipApplicationRoutingDirective |
getRoutingDirective()
|
RoutingState |
getRoutingState()
|
java.lang.String |
getScheme()
|
java.lang.String |
getServerName()
|
int |
getServerPort()
|
javax.servlet.ServletContext |
getServletContext()
|
URI |
getSubscriberURI()
|
boolean |
is1xxResponseGenerated()
|
boolean |
isAsyncStarted()
|
boolean |
isAsyncSupported()
|
boolean |
isCommitted()
|
boolean |
isFinalResponseGenerated()
|
boolean |
isInitial()
|
boolean |
isSystemHeader(java.lang.String headerName)
Applications must not add, delete, or modify so-called "system" headers. |
static void |
optimizeRouteHeaderAddressForInternalRoutingrequest(SipConnector sipConnector,
javax.sip.message.Request request,
MobicentsSipSession session,
SipFactoryImpl sipFactoryImpl,
java.lang.String transport)
|
void |
pushPath(Address uri)
|
void |
pushRoute(Address address)
|
void |
pushRoute(SipURI uri)
|
void |
readExternal(java.io.ObjectInput in)
|
void |
removeAttribute(java.lang.String name)
|
void |
removeHeader(java.lang.String name)
|
protected void |
removeStaleAuthHeaders(javax.sip.header.WWWAuthenticateHeader responseAuthHeader)
|
void |
send()
|
void |
setAcceptLanguage(java.util.Locale locale)
|
void |
setAddressHeader(java.lang.String name,
Address addr)
|
void |
setAttribute(java.lang.String name,
java.lang.Object o)
|
void |
setCharacterEncoding(java.lang.String enc)
|
void |
setContent(java.lang.Object content,
java.lang.String contentType)
|
void |
setContentLanguage(java.util.Locale locale)
|
void |
setContentType(java.lang.String type)
|
void |
setExpires(int seconds)
|
void |
setHeader(java.lang.String name,
java.lang.String value)
|
void |
setHeaderForm(SipServletMessage.HeaderForm form)
|
void |
setLinkedRequest(SipServletRequestImpl linkedRequest)
Add a record route header for app composition |
void |
setMaxForwards(int n)
|
void |
setParameterableHeader(java.lang.String name,
Parameterable param)
|
void |
setPoppedRoute(javax.sip.header.RouteHeader routeHeader)
Set the popped route |
void |
setReadOnly(boolean isReadOnly)
|
void |
setRequestURI(URI uri)
|
void |
setResponse(SipServletResponseImpl response)
|
void |
setRoutingDirective(SipApplicationRoutingDirective directive,
SipServletRequest origRequest)
|
void |
setRoutingRegion(SipApplicationRoutingRegion routingRegion)
This method allows the application to set the region that the application is in with respect to this SipSession |
void |
setRoutingState(RoutingState routingState)
|
void |
setSubscriberURI(URI uri)
|
javax.servlet.AsyncContext |
startAsync()
|
javax.servlet.AsyncContext |
startAsync(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse)
|
protected void |
updateContactHeaderTransport(java.lang.String transport)
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.servlet.ServletRequest |
|---|
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getLocalAddr, getLocalPort, getProtocol, getRemoteAddr, getRemotePort, isSecure |
| Field Detail |
|---|
public static final java.lang.String STALE
public static final java.util.Set<java.lang.String> NON_INITIAL_SIP_REQUEST_METHODS
| Constructor Detail |
|---|
public SipServletRequestImpl()
public SipServletRequestImpl(javax.sip.message.Request request,
SipFactoryImpl sipFactoryImpl,
MobicentsSipSession sipSession,
javax.sip.Transaction transaction,
javax.sip.Dialog dialog,
boolean createDialog)
| Method Detail |
|---|
public boolean isSystemHeader(java.lang.String headerName)
SipServletMessageImpl
isSystemHeader in class SipServletMessageImplheaderName - -
either long or compact header name
public SipServletRequest createCancel()
createCancel in interface SipServletRequestpublic SipServletResponse createResponse(int statusCode)
createResponse in interface SipServletRequest
public SipServletResponse createResponse(int statusCode,
java.lang.String reasonPhrase)
createResponse in interface SipServletRequest
public SipServletResponse createResponse(int statusCode,
java.lang.String reasonPhrase,
boolean copyRecordRouteHeaders)
createResponse in interface SipServletRequestExt
public SipServletResponse createResponse(int statusCode,
java.lang.String reasonPhrase,
boolean copyRecordRouteHeaders,
boolean validate)
public B2buaHelper getB2buaHelper()
getB2buaHelper in interface SipServletRequest
public javax.servlet.ServletInputStream getInputStream()
throws java.io.IOException
getInputStream in interface javax.servlet.ServletRequestgetInputStream in interface SipServletRequestjava.io.IOExceptionpublic int getMaxForwards()
getMaxForwards in interface SipServletRequestpublic Address getPoppedRoute()
getPoppedRoute in interface SipServletRequestpublic javax.sip.header.RouteHeader getPoppedRouteHeader()
public void setPoppedRoute(javax.sip.header.RouteHeader routeHeader)
routeHeader - the popped route header to set
public Proxy getProxy()
throws TooManyHopsException
getProxy in interface SipServletRequestTooManyHopsException
public Proxy getProxy(boolean create)
throws TooManyHopsException
getProxy in interface SipServletRequestTooManyHopsException
public java.io.BufferedReader getReader()
throws java.io.IOException
getReader in interface javax.servlet.ServletRequestgetReader in interface SipServletRequestjava.io.IOExceptionpublic URI getRequestURI()
getRequestURI in interface SipServletRequestpublic boolean isInitial()
isInitial in interface SipServletRequestpublic boolean isCommitted()
isCommitted in interface SipServletMessageprotected void checkMessageState()
checkMessageState in class SipServletMessageImplpublic void pushPath(Address uri)
pushPath in interface SipServletRequestpublic void pushRoute(Address address)
pushRoute in interface SipServletRequestpublic void pushRoute(SipURI uri)
pushRoute in interface SipServletRequestpublic void setMaxForwards(int n)
setMaxForwards in interface SipServletRequestpublic void setRequestURI(URI uri)
setRequestURI in interface SipServletRequest
public void setRoutingDirective(SipApplicationRoutingDirective directive,
SipServletRequest origRequest)
throws java.lang.IllegalStateException
setRoutingDirective in interface SipServletRequestjava.lang.IllegalStateExceptionpublic java.lang.String getLocalName()
getLocalName in interface javax.servlet.ServletRequestpublic java.util.Locale getLocale()
getLocale in interface javax.servlet.ServletRequestpublic java.util.Enumeration getLocales()
getLocales in interface javax.servlet.ServletRequestpublic java.lang.String getParameter(java.lang.String name)
getParameter in interface javax.servlet.ServletRequestpublic java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
getParameterMap in interface javax.servlet.ServletRequestpublic java.util.Enumeration<java.lang.String> getParameterNames()
getParameterNames in interface javax.servlet.ServletRequestpublic java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues in interface javax.servlet.ServletRequestpublic java.lang.String getRealPath(java.lang.String arg0)
getRealPath in interface javax.servlet.ServletRequestpublic java.lang.String getRemoteHost()
getRemoteHost in interface javax.servlet.ServletRequestpublic javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String handler)
getRequestDispatcher in interface javax.servlet.ServletRequestpublic java.lang.String getScheme()
getScheme in interface javax.servlet.ServletRequestpublic java.lang.String getServerName()
getServerName in interface javax.servlet.ServletRequestpublic int getServerPort()
getServerPort in interface javax.servlet.ServletRequestpublic SipApplicationRoutingDirective getRoutingDirective()
getRoutingDirective in interface SipServletRequest
public static void optimizeRouteHeaderAddressForInternalRoutingrequest(SipConnector sipConnector,
javax.sip.message.Request request,
MobicentsSipSession session,
SipFactoryImpl sipFactoryImpl,
java.lang.String transport)
public void send()
send in interface SipServletMessagesend in interface SipServletRequestsend in class SipServletMessageImpl
protected void updateContactHeaderTransport(java.lang.String transport)
throws java.text.ParseException
java.text.ParseException
public void addInfoForRoutingBackToContainer(SipApplicationRouterInfo routerInfo,
java.lang.String applicationSessionId,
java.lang.String applicationName)
throws java.text.ParseException,
javax.sip.SipException
applicationName - the application name that was chosen by the AR to route the request
java.text.ParseException
javax.sip.SipException
java.lang.NullPointerExceptionpublic void setLinkedRequest(SipServletRequestImpl linkedRequest)
java.text.ParseException - if anything goes wrong while creating the record route header
javax.sip.SipException
java.lang.NullPointerException - public void addAppCompositionRRHeader()
throws ParseException, SipException {
final Request request = (Request) super.message;
final MobicentsSipSession session = getSipSession();
javax.sip.address.SipURI sipURI = JainSipUtils.createRecordRouteURI(
sipFactoryImpl.getSipNetworkInterfaceManager(),
request);
sipURI.setParameter(MessageDispatcher.RR_PARAM_APPLICATION_NAME, session.getKey().getApplicationName());
sipURI.setLrParam();
javax.sip.address.Address recordRouteAddress =
SipFactories.addressFactory.createAddress(sipURI);
RecordRouteHeader recordRouteHeader =
SipFactories.headerFactory.createRecordRouteHeader(recordRouteAddress);
request.addFirst(recordRouteHeader);
}public SipServletRequestImpl getLinkedRequest()
public RoutingState getRoutingState()
public void setRoutingState(RoutingState routingState)
throws java.lang.IllegalStateException
routingState - the routingState to set
java.lang.IllegalStateException
public void addAuthHeader(SipServletResponse challengeResponse,
AuthInfo authInfo)
addAuthHeader in interface SipServletRequest
public void addAuthHeader(SipServletResponse challengeResponse,
java.lang.String username,
java.lang.String password)
addAuthHeader in interface SipServletRequestprotected void removeStaleAuthHeaders(javax.sip.header.WWWAuthenticateHeader responseAuthHeader)
public SipServletResponse getLastFinalResponse()
public void setResponse(SipServletResponseImpl response)
finalResponse - the finalResponse to setpublic Address getInitialPoppedRoute()
getInitialPoppedRoute in interface SipServletRequestpublic SipApplicationRoutingRegion getRegion()
getRegion in interface SipServletRequestpublic void setRoutingRegion(SipApplicationRoutingRegion routingRegion)
routingRegion - the region that the application is inpublic URI getSubscriberURI()
getSubscriberURI in interface SipServletRequestpublic void setSubscriberURI(URI uri)
public boolean is1xxResponseGenerated()
public boolean isFinalResponseGenerated()
public SipServletResponse getLastInformationalResponse()
public void setReadOnly(boolean isReadOnly)
protected void checkReadOnly()
public void addAcceptLanguage(java.util.Locale locale)
addAcceptLanguage in interface SipServletMessageaddAcceptLanguage in class SipServletMessageImpl
public void addAddressHeader(java.lang.String name,
Address addr,
boolean first)
throws java.lang.IllegalArgumentException
addAddressHeader in interface SipServletMessageaddAddressHeader in class SipServletMessageImpljava.lang.IllegalArgumentException
public void addHeader(java.lang.String name,
java.lang.String value)
addHeader in interface SipServletMessageaddHeader in class SipServletMessageImpl
public void addParameterableHeader(java.lang.String name,
Parameterable param,
boolean first)
addParameterableHeader in interface SipServletMessageaddParameterableHeader in class SipServletMessageImplpublic void removeAttribute(java.lang.String name)
removeAttribute in interface javax.servlet.ServletRequestremoveAttribute in interface SipServletMessageremoveAttribute in class SipServletMessageImplpublic void removeHeader(java.lang.String name)
removeHeader in interface SipServletMessageremoveHeader in class SipServletMessageImplpublic void setAcceptLanguage(java.util.Locale locale)
setAcceptLanguage in interface SipServletMessagesetAcceptLanguage in class SipServletMessageImpl
public void setAddressHeader(java.lang.String name,
Address addr)
setAddressHeader in interface SipServletMessagesetAddressHeader in class SipServletMessageImpl
public void setAttribute(java.lang.String name,
java.lang.Object o)
setAttribute in interface javax.servlet.ServletRequestsetAttribute in interface SipServletMessagesetAttribute in class SipServletMessageImpl
public void setCharacterEncoding(java.lang.String enc)
throws java.io.UnsupportedEncodingException
setCharacterEncoding in interface javax.servlet.ServletRequestsetCharacterEncoding in interface SipServletMessagesetCharacterEncoding in class SipServletMessageImpljava.io.UnsupportedEncodingException
public void setContent(java.lang.Object content,
java.lang.String contentType)
throws java.io.UnsupportedEncodingException
setContent in interface SipServletMessagesetContent in class SipServletMessageImpljava.io.UnsupportedEncodingExceptionpublic void setContentLanguage(java.util.Locale locale)
setContentLanguage in interface SipServletMessagesetContentLanguage in class SipServletMessageImplpublic void setContentType(java.lang.String type)
setContentType in interface SipServletMessagesetContentType in class SipServletMessageImplpublic void setExpires(int seconds)
setExpires in interface SipServletMessagesetExpires in class SipServletMessageImpl
public void setHeader(java.lang.String name,
java.lang.String value)
setHeader in interface SipServletMessagesetHeader in class SipServletMessageImplpublic void setHeaderForm(SipServletMessage.HeaderForm form)
setHeaderForm in interface SipServletMessagesetHeaderForm in class SipServletMessageImpl
public void setParameterableHeader(java.lang.String name,
Parameterable param)
setParameterableHeader in interface SipServletMessagesetParameterableHeader in class SipServletMessageImplpublic java.lang.String getInitialRemoteAddr()
getInitialRemoteAddr in interface SipServletMessagegetInitialRemoteAddr in class SipServletMessageImplpublic int getInitialRemotePort()
getInitialRemotePort in interface SipServletMessagegetInitialRemotePort in class SipServletMessageImplpublic java.lang.String getInitialTransport()
getInitialTransport in interface SipServletMessagegetInitialTransport in class SipServletMessageImplpublic void cleanUp()
cleanUp in class SipServletMessageImplpublic void cleanUpLastResponses()
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class SipServletMessageImpljava.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class SipServletMessageImpljava.io.IOExceptionpublic javax.servlet.ServletContext getServletContext()
public javax.servlet.AsyncContext startAsync()
public javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse)
public boolean isAsyncStarted()
public boolean isAsyncSupported()
public javax.servlet.AsyncContext getAsyncContext()
public javax.servlet.DispatcherType getDispatcherType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||