public abstract class MessageDispatcher extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
APP_ID |
static String |
BRANCH_MAGIC_COOKIE |
static String |
ROUTE_PARAM_DIRECTIVE |
static String |
ROUTE_PARAM_NODE_HOST |
static String |
ROUTE_PARAM_NODE_PORT |
static String |
ROUTE_PARAM_PREV_APP_ID |
static String |
ROUTE_PARAM_PREV_APPLICATION_NAME |
static String |
ROUTE_PARAM_REGION_LABEL |
static String |
ROUTE_PARAM_REGION_TYPE |
static String |
RR_PARAM_APPLICATION_NAME |
static String |
RR_PARAM_PROXY_APP |
static String |
RR_PARAM_SERVER_NAME |
static String |
SIP_OUTBOUND_PARAM_OB
From RFC 5626:
"The "ob" parameter is a SIP URI parameter that has a different meaning
depending on context.
|
static String |
SIP_OUTBOUND_PARAM_REG_ID |
protected SipApplicationDispatcher |
sipApplicationDispatcher |
| Constructor and Description |
|---|
MessageDispatcher() |
| Modifier and Type | Method and Description |
|---|---|
static void |
callServlet(MobicentsSipServletRequest request) |
static void |
callServlet(MobicentsSipServletResponse response) |
static void |
callServletForOrphanRequest(SipContext sipContext,
SipServletRequestImpl request) |
static void |
callServletForOrphanResponse(SipContext sipContext,
SipServletResponse response) |
abstract void |
dispatchMessage(javax.sip.SipProvider sipProvider,
SipServletMessageImpl sipServletMessage)
Responsible for routing and dispatching a SIP message to the correct application
|
ExecutorService |
getConcurrencyModelExecutorService(SipContext sipContext,
SipServletMessageImpl sipServletMessage)
This method return an ExecutorService depending on the current concurrency strategy.
|
protected static SipApplicationSessionKey |
makeAppSessionKey(SipContext sipContext,
SipServletRequestImpl sipServletRequestImpl,
String applicationName) |
static boolean |
securityCheck(MobicentsSipServletRequest request) |
static void |
sendErrorResponse(SipApplicationDispatcher sipApplicationDispatcher,
int errorCode,
javax.sip.ServerTransaction transaction,
javax.sip.message.Request request,
javax.sip.SipProvider sipProvider) |
static void |
sendErrorResponse(SipApplicationDispatcher sipApplicationDispatcher,
int errorCode,
SipServletRequestImpl sipServletRequest,
javax.sip.SipProvider sipProvider) |
public static final String ROUTE_PARAM_DIRECTIVE
public static final String ROUTE_PARAM_REGION_LABEL
public static final String ROUTE_PARAM_REGION_TYPE
public static final String ROUTE_PARAM_PREV_APPLICATION_NAME
public static final String ROUTE_PARAM_PREV_APP_ID
public static final String RR_PARAM_SERVER_NAME
public static final String RR_PARAM_APPLICATION_NAME
public static final String RR_PARAM_PROXY_APP
public static final String BRANCH_MAGIC_COOKIE
public static final String APP_ID
public static final String ROUTE_PARAM_NODE_HOST
public static final String ROUTE_PARAM_NODE_PORT
protected SipApplicationDispatcher sipApplicationDispatcher
public static final String SIP_OUTBOUND_PARAM_OB
public static final String SIP_OUTBOUND_PARAM_REG_ID
public static void sendErrorResponse(SipApplicationDispatcher sipApplicationDispatcher, int errorCode, SipServletRequestImpl sipServletRequest, javax.sip.SipProvider sipProvider)
public static void sendErrorResponse(SipApplicationDispatcher sipApplicationDispatcher, int errorCode, javax.sip.ServerTransaction transaction, javax.sip.message.Request request, javax.sip.SipProvider sipProvider)
errorCode - transaction - request - sipProvider - protected static SipApplicationSessionKey makeAppSessionKey(SipContext sipContext, SipServletRequestImpl sipServletRequestImpl, String applicationName) throws DispatcherException
DispatcherExceptionpublic static void callServletForOrphanRequest(SipContext sipContext, SipServletRequestImpl request) throws DispatcherException, javax.servlet.ServletException, IOException
DispatcherExceptionjavax.servlet.ServletExceptionIOExceptionpublic static void callServletForOrphanResponse(SipContext sipContext, SipServletResponse response) throws DispatcherException, javax.servlet.ServletException, IOException
DispatcherExceptionjavax.servlet.ServletExceptionIOExceptionpublic static void callServlet(MobicentsSipServletRequest request) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionpublic static void callServlet(MobicentsSipServletResponse response) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionpublic static boolean securityCheck(MobicentsSipServletRequest request)
public abstract void dispatchMessage(javax.sip.SipProvider sipProvider,
SipServletMessageImpl sipServletMessage)
throws DispatcherException
sipProvider - use the sipProvider to route the message if needed, can be nullsipServletMessage - the SIP message to route and dispatchException - if anything wrong happensDispatcherExceptionpublic final ExecutorService getConcurrencyModelExecutorService(SipContext sipContext, SipServletMessageImpl sipServletMessage)
sipServletMessage - the request you put here must have app and sip session associatedCopyright © 2015. All Rights Reserved.