wt.router
Class StandardRoutingService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.router.StandardRoutingService
All Implemented Interfaces:
Manager, NetFactor, RoutingService, Serializable

public class StandardRoutingService
extends StandardManager
implements RoutingService, Serializable

Use the newStandardRoutingService static factory method(s), not the StandardRoutingService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String QUEUE_PREFIX
           
private static String RESOURCE
           
 Hashtable routers
          

Supported API: false
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.router.RoutingService
ROUTERS
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardRoutingService()
           
 
Method Summary
private  void clearQueues(Hashtable routers)
           
 String getConceptualClassname()
          Deprecated.  
private  RouterMethodArg getMethodArg(Object targetObject)
           
 String getQueueName(int routerNum, int qNum)
          

Supported API: false
 String getQueueName(RouterIfc router, int qNum)
          

Supported API: false
 Hashtable getRouters()
          Gets the object for the association that plays role: routers.
 boolean isEmpty(ProcessingQueue pq)
          

Supported API: false
static StandardRoutingService newStandardRoutingService()
          Default factory for the class.
protected  void performStartupProcess()
          

Supported API: false
 void postMethod(RouterIfc router, Method method, Serializable targetObject, Serializable[] args)
          

Supported API: false
private  void printAllRoutersConfig()
           
private  void processImmediateMode(RouterIfc router, Method method, boolean putCoverWrapper, Serializable targetObject, Serializable[] args)
           
private  void processImmediateMode(RouterIfc router, Method method, boolean putCoverWrapper, Serializable targetObject, Serializable[] args, ScheduleHistory hItem)
          processImmediateMode - used immediate mode and when executing "todo" items.
static void processToDoList(String routerName, ScheduleHistory hItem)
          This method should be scheduled for execution by wt.scheduler.
private  void processTodoMode(RouterIfc router, Method method, Serializable targetObject, Serializable[] args)
           
 void subscribeOnRoutingEvent(Class eventClass, RouterIfc router)
          

Supported API: false
static void testRouter(Serializable t_obj)
           
 Method toMethod(String methodSpec)
          

Supported API: false
static void wrapperForPersistentTarg(ObjectReference targObjRef, Serializable[] invocationDesc, String t_method, String t_class)
          

Supported API: false
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

QUEUE_PREFIX

private static final String QUEUE_PREFIX
See Also:
Constant Field Values

routers

public final Hashtable routers


Supported API: false

Constructor Detail

StandardRoutingService

public StandardRoutingService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException


Supported API: false

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

newStandardRoutingService

public static StandardRoutingService newStandardRoutingService()
                                                        throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardRoutingService
Throws:
WTException

processToDoList

public static void processToDoList(String routerName,
                                   ScheduleHistory hItem)
This method should be scheduled for execution by wt.scheduler. The schedule History represent the invocation session and its history of this method and may be consequent operations.

Supported API: false

Parameters:
routerName -
hItem -

wrapperForPersistentTarg

public static void wrapperForPersistentTarg(ObjectReference targObjRef,
                                            Serializable[] invocationDesc,
                                            String t_method,
                                            String t_class)
                                     throws IllegalAccessException,
                                            IllegalArgumentException,
                                            InvocationTargetException


Supported API: false

Parameters:
targObjRef -
invocationDesc -
t_method -
t_class -
Throws:
IllegalAccessException
IllegalArgumentException
InvocationTargetException

postMethod

public void postMethod(RouterIfc router,
                       Method method,
                       Serializable targetObject,
                       Serializable[] args)
                throws WTException


Supported API: false

Specified by:
postMethod in interface RoutingService
Parameters:
router -
method -
targetObject -
args -
Throws:
WTException

toMethod

public Method toMethod(String methodSpec)
                throws WTPropertyVetoException


Supported API: false

Specified by:
toMethod in interface RoutingService
Parameters:
methodSpec -
Returns:
Method
Throws:
WTPropertyVetoException

getQueueName

public String getQueueName(RouterIfc router,
                           int qNum)


Supported API: false

Specified by:
getQueueName in interface RoutingService
Parameters:
router -
qNum -
Returns:
String

getQueueName

public String getQueueName(int routerNum,
                           int qNum)


Supported API: false

Specified by:
getQueueName in interface RoutingService
Parameters:
routerNum -
qNum -
Returns:
String

isEmpty

public boolean isEmpty(ProcessingQueue pq)
                throws WTException


Supported API: false

Specified by:
isEmpty in interface RoutingService
Parameters:
pq -
Returns:
boolean
Throws:
WTException

subscribeOnRoutingEvent

public void subscribeOnRoutingEvent(Class eventClass,
                                    RouterIfc router)


Supported API: false

Specified by:
subscribeOnRoutingEvent in interface RoutingService
Parameters:
eventClass -
router -

getRouters

public Hashtable getRouters()
Gets the object for the association that plays role: routers.

Supported API: false

Specified by:
getRouters in interface RoutingService
Returns:
Hashtable

processImmediateMode

private void processImmediateMode(RouterIfc router,
                                  Method method,
                                  boolean putCoverWrapper,
                                  Serializable targetObject,
                                  Serializable[] args)
                           throws WTException
Throws:
WTException

processImmediateMode

private void processImmediateMode(RouterIfc router,
                                  Method method,
                                  boolean putCoverWrapper,
                                  Serializable targetObject,
                                  Serializable[] args,
                                  ScheduleHistory hItem)
                           throws WTException
processImmediateMode - used immediate mode and when executing "todo" items.

Parameters:
router - router reference to know the RoundRobinRouter instance
method - method to be executed from FIFO ( i.e. "invokeScheduled" )
targetObject - principal object parameter
args - additional args for the "invokeScheduled" method: args[0] = actual method to invoke args[1] = other args for the actual method. args[2] = ScheduleHistory object
Throws:
WTException

processTodoMode

private void processTodoMode(RouterIfc router,
                             Method method,
                             Serializable targetObject,
                             Serializable[] args)
                      throws WTException
Throws:
WTException

clearQueues

private void clearQueues(Hashtable routers)
                  throws WTException
Throws:
WTException

getMethodArg

private RouterMethodArg getMethodArg(Object targetObject)
                              throws WTException,
                                     WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

testRouter

public static void testRouter(Serializable t_obj)

printAllRoutersConfig

private void printAllRoutersConfig()