com.itmusings.owiz.impl
Class Router<InputType>
java.lang.Object
com.itmusings.owiz.impl.CommandBase<InputType>
com.itmusings.owiz.impl.Router<InputType>
- All Implemented Interfaces:
- AttachableCommand<InputType>, Command<InputType>
- Direct Known Subclasses:
- OgnlRouter
public abstract class Router<InputType>
- extends CommandBase<InputType>
- implements Command<InputType>, AttachableCommand<InputType>
A router is a command that executes one of several commands based on a routing string.
The computation of the routing string is left to a sub class and hence this is an abstract class.
- Author:
- Raja Shankar Kolluru
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ROUTE
public static final String ROUTE
- See Also:
- Constant Field Values
DEFAULT
public static final String DEFAULT
- See Also:
- Constant Field Values
commandsMap
protected Map<String,CommandDescriptor<InputType>> commandsMap
defaultCommandDescriptor
protected CommandDescriptor<InputType> defaultCommandDescriptor
Router
public Router()
attachCommand
public void attachCommand(AttachmentDescriptor<InputType> attachmentDescriptor,
CommandDescriptor<InputType> command)
- Specified by:
attachCommand
in interface AttachableCommand<InputType>
doExecute
public void doExecute(InputType context)
throws Exception
- Specified by:
doExecute
in class CommandBase<InputType>
- Throws:
Exception
computeRoutingString
protected abstract String computeRoutingString(InputType context)
throws Exception
- Throws:
Exception
Copyright © 2010 ITMUSINGS. All Rights Reserved.