com.justhis.control
Class CommandDispatcher

java.lang.Object
  extended bycom.justhis.control.CommandDispatcher

public class CommandDispatcher
extends java.lang.Object

Instances turn a request into a command, which may then be executed.

Version:
$Revision: 1.1 $
Author:
acai

Constructor Summary
CommandDispatcher(javax.servlet.ServletConfig config, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Create a new instance of the dispatcher containing the parameters from the servlet request.
 
Method Summary
 java.lang.String executeCommand()
           
 Command getCommand()
          Get the command specified by the servlet request.
 java.util.Properties getProperties()
          Get the servlet request properties.
 javax.servlet.http.HttpServletRequest getRequest()
          Get the servlet request.
 javax.servlet.http.HttpServletResponse getResponse()
          Get the servlet response.
 javax.servlet.ServletConfig getServletConfig()
          get the Servlet config
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandDispatcher

public CommandDispatcher(javax.servlet.ServletConfig config,
                         javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
Create a new instance of the dispatcher containing the parameters from the servlet request.

Parameters:
request - the servlet request
response - the servlet response
Method Detail

getProperties

public java.util.Properties getProperties()
Get the servlet request properties.

Returns:
the properties for the servlet request

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Get the servlet request.

Returns:
the servlet request

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Get the servlet response.

Returns:
the servlet response

getServletConfig

public javax.servlet.ServletConfig getServletConfig()
get the Servlet config

Returns:
the servlet config

getCommand

public Command getCommand()
                   throws com.justhis.util.exception.UtilException,
                          com.justhis.util.exception.PropertiesFileReadException,
                          com.justhis.util.exception.JavaClassRefectException
Get the command specified by the servlet request.

Returns:
the command specified by the servlet request
Throws:
com.justhis.util.exception.UtilException
com.justhis.util.exception.PropertiesFileReadException
com.justhis.util.exception.JavaClassRefectException

executeCommand

public java.lang.String executeCommand()
                                throws com.justhis.util.exception.JavaClassRefectException,
                                       com.justhis.util.exception.LogicException,
                                       java.sql.SQLException,
                                       javax.servlet.ServletException,
                                       com.justhis.util.exception.UtilException
Throws:
com.justhis.util.exception.JavaClassRefectException
com.justhis.util.exception.LogicException
java.sql.SQLException
javax.servlet.ServletException
com.justhis.util.exception.UtilException
See Also:
Command.execute()


Copyright © 2003 EastNetworks.Net(China)Co.,Ltd.. All Rights Reserved.