org.mobicents.servlet.sip.core.dispatchers
Class MessageDispatcher
java.lang.Object
org.mobicents.servlet.sip.core.dispatchers.MessageDispatcher
- Direct Known Subclasses:
- RequestDispatcher, ResponseDispatcher
public abstract class MessageDispatcher
- extends java.lang.Object
- Author:
- Jean Deruelle
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ROUTE_PARAM_DIRECTIVE
public static final java.lang.String ROUTE_PARAM_DIRECTIVE
- See Also:
- Constant Field Values
ROUTE_PARAM_PREV_APPLICATION_NAME
public static final java.lang.String ROUTE_PARAM_PREV_APPLICATION_NAME
- See Also:
- Constant Field Values
RR_PARAM_APPLICATION_NAME
public static final java.lang.String RR_PARAM_APPLICATION_NAME
- See Also:
- Constant Field Values
RR_PARAM_PROXY_APP
public static final java.lang.String RR_PARAM_PROXY_APP
- See Also:
- Constant Field Values
FINAL_RESPONSE
public static final java.lang.String FINAL_RESPONSE
- See Also:
- Constant Field Values
GENERATED_APP_KEY
public static final java.lang.String GENERATED_APP_KEY
- See Also:
- Constant Field Values
APP_ID
public static final java.lang.String APP_ID
- See Also:
- Constant Field Values
APP_NOT_DEPLOYED
public static final java.lang.String APP_NOT_DEPLOYED
- See Also:
- Constant Field Values
NO_APP_RETURNED
public static final java.lang.String NO_APP_RETURNED
- See Also:
- Constant Field Values
MODIFIER
public static final java.lang.String MODIFIER
- See Also:
- Constant Field Values
ROUTE_PARAM_NODE_HOST
public static final java.lang.String ROUTE_PARAM_NODE_HOST
- See Also:
- Constant Field Values
ROUTE_PARAM_NODE_PORT
public static final java.lang.String ROUTE_PARAM_NODE_PORT
- See Also:
- Constant Field Values
sipApplicationDispatcher
protected SipApplicationDispatcher sipApplicationDispatcher
MessageDispatcher
public MessageDispatcher(SipApplicationDispatcher sipApplicationDispatcher)
sendErrorResponse
public static void sendErrorResponse(int errorCode,
javax.sip.ServerTransaction transaction,
javax.sip.message.Request request,
javax.sip.SipProvider sipProvider)
- Parameters:
errorCode - transaction - request - sipProvider -
makeAppSessionKey
protected static SipApplicationSessionKey makeAppSessionKey(SipContext sipContext,
SipServletRequestImpl sipServletRequestImpl,
java.lang.String applicationName)
throws DispatcherException
- Throws:
DispatcherException
callServlet
public static void callServlet(SipServletRequestImpl request)
throws javax.servlet.ServletException,
java.io.IOException
- Throws:
javax.servlet.ServletException
java.io.IOException
callServlet
public static void callServlet(SipServletResponseImpl response)
throws javax.servlet.ServletException,
java.io.IOException
- Throws:
javax.servlet.ServletException
java.io.IOException
securityCheck
public static boolean securityCheck(SipServletRequestImpl request)
dispatchMessage
public abstract void dispatchMessage(javax.sip.SipProvider sipProvider,
SipServletMessageImpl sipServletMessage)
throws DispatcherException
- Responsible for routing and dispatching a SIP message to the correct application
- Parameters:
sipProvider - use the sipProvider to route the message if needed, can be nullsipServletMessage - the SIP message to route and dispatch
- Throws:
java.lang.Exception - if anything wrong happens
DispatcherException
getConcurrencyModelExecutorService
public final java.util.concurrent.ExecutorService getConcurrencyModelExecutorService(SipContext sipContext,
SipServletMessageImpl sipServletMessage)
- This method return an ExecutorService depending on the current concurrency strategy. It can return the
executor of a sip session, app session or just threadpool executor which doesn't limit concurrent processing
of requests per app or sip session.
Since 0.8.1 it always return threadpool executor which doesn't limit concurrent processing since concurrency is achieved through semaphore
- Parameters:
sipServletMessage - the request you put here must have app and sip session associated
- Returns:
Copyright © 2009. All Rights Reserved.