org.siprop.v2.core.router.impl
Class MessageRouter

java.lang.Object
  extended by org.siprop.v2.core.router.impl.MessageRouter
All Implemented Interfaces:
DynamicRouter, Router

public class MessageRouter
extends java.lang.Object
implements DynamicRouter

This class is a router for MessageContextImpl.

Author:
nisato

Field Summary
static java.lang.String CONTROLMESSAGE_BASENAME
          base name of StackControlMessageImpl
 
Constructor Summary
MessageRouter()
          Constructor.
 
Method Summary
 void addRoute(RouterInfo routerinfo)
          add Route information.
 void doRoute(Context messagecontext)
          Execute routing.
 RouterInfo getRouterInfo(RouteKey routekey)
          get RouterInfo.
 void removeRoute(RouteKey routekey)
          delete Route information by RouteKey.
 void removeRoute(RouterInfo routerinfo)
          delete Route information by RouterInfo.
 void setThreadPoolCount(int count)
           
 void start()
          Start Router.
 void stop()
          Stop router.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTROLMESSAGE_BASENAME

public static final java.lang.String CONTROLMESSAGE_BASENAME
base name of StackControlMessageImpl

See Also:
Constant Field Values
Constructor Detail

MessageRouter

public MessageRouter()
Constructor.

Method Detail

start

public void start()
Description copied from interface: DynamicRouter
Start Router.

Specified by:
start in interface DynamicRouter

stop

public void stop()
Description copied from interface: DynamicRouter
Stop router.

Specified by:
stop in interface DynamicRouter

setThreadPoolCount

public void setThreadPoolCount(int count)
Parameters:
count -

addRoute

public void addRoute(RouterInfo routerinfo)
Description copied from interface: DynamicRouter
add Route information.

Specified by:
addRoute in interface DynamicRouter
Parameters:
routerinfo - Route information

doRoute

public void doRoute(Context messagecontext)
             throws MessageException
Description copied from interface: Router
Execute routing.

Specified by:
doRoute in interface Router
Throws:
MessageException

getRouterInfo

public RouterInfo getRouterInfo(RouteKey routekey)
Description copied from interface: DynamicRouter
get RouterInfo.

Specified by:
getRouterInfo in interface DynamicRouter
Parameters:
routekey - Route key
Returns:
Route information

removeRoute

public void removeRoute(RouteKey routekey)
Description copied from interface: DynamicRouter
delete Route information by RouteKey.

Specified by:
removeRoute in interface DynamicRouter
Parameters:
routekey - Route key

removeRoute

public void removeRoute(RouterInfo routerinfo)
Description copied from interface: DynamicRouter
delete Route information by RouterInfo.

Specified by:
removeRoute in interface DynamicRouter
Parameters:
routerinfo - Route information