BEA Systems, Inc.

com.beasys.commerce.foundation.flow
Class FlowManager

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--com.beasys.commerce.foundation.flow.FlowManager

public class FlowManager
extends javax.servlet.http.HttpServlet
implements FlowManagerConstants

Flow Manager servlet. This class is responsible for pulling the property set for the application, caching it, and passing the information to the DestinationDeterminer and DestinationHandler.

See Also:
Serialized Form

Field Summary
protected  java.util.HashMap applications
          Keep track of the applications and their data.
protected  SchemaManager schemaManager
           
 
Fields inherited from interface com.beasys.commerce.foundation.flow.FlowManagerConstants
APPLICATION_FLOW_MANAGER, APPLICATION_RESET_FLAG, PERIOD
 
Constructor Summary
FlowManager()
          Default constructor.
 
Method Summary
protected  java.lang.String cleanPathInfo(java.lang.String aPath)
          Clean the path info.
protected  java.lang.Object createObject(java.lang.String aName)
          Create a new instance for the specified name.
protected  com.beasys.commerce.foundation.flow.FlowManager.Application getApplication(java.lang.String aName, boolean forceReset)
          Get the application associated to the passed name.
protected  java.lang.String getFlowManagerURI(javax.servlet.http.HttpServletRequest req)
          Get flow manager URI.
protected  java.util.Map getPropertySet(java.lang.String aName)
          Get the property set for the application name.
 SchemaManager getSchemaManager()
          Look up and get a handle to the SchemaManager.
 void init(javax.servlet.ServletConfig config)
          Initializes the servlet.
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Service the request.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applications

protected java.util.HashMap applications
Keep track of the applications and their data.

schemaManager

protected SchemaManager schemaManager
Constructor Detail

FlowManager

public FlowManager()
Default constructor.
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initializes the servlet.
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config - a ServletConfig configuration
Throws:
ServletException -  

cleanPathInfo

protected java.lang.String cleanPathInfo(java.lang.String aPath)
Clean the path info. If the path starts with a '/', strip it off. If there is a trailing '/', strip it off also.
Parameters:
aPath - the path info from getPathInfo().
Returns:
String

getSchemaManager

public SchemaManager getSchemaManager()
                               throws javax.servlet.ServletException
Look up and get a handle to the SchemaManager.
Returns:
SchemaManager

createObject

protected java.lang.Object createObject(java.lang.String aName)
                                 throws javax.servlet.ServletException
Create a new instance for the specified name. Check all of the exceptions, if there is an exception, wrap it in a ServletException.
Parameters:
aName - a qualified class name.
Returns:
Object a new instance of the class name.
Throws:
ServletException -  

getApplication

protected com.beasys.commerce.foundation.flow.FlowManager.Application getApplication(java.lang.String aName,
                                                                                     boolean forceReset)
                                                                              throws javax.servlet.ServletException
Get the application associated to the passed name.
Parameters:
aName - the name of the application.
forceReset - are we forcing the cache to be reset, regardless of the last time it was retrieved.
Returns:
Application struct containing information for the application. Contains ttl, DestinationDeterminer, DestinationHandler, and the last time it was retrieved.
Throws:
ServletException -  

getPropertySet

protected java.util.Map getPropertySet(java.lang.String aName)
                                throws javax.servlet.ServletException
Get the property set for the application name.
Parameters:
aName - the application name.
Returns:
Map the property set as a Map.
Throws:
ServletException -  

getFlowManagerURI

protected java.lang.String getFlowManagerURI(javax.servlet.http.HttpServletRequest req)
Get flow manager URI.
Parameters:
req -  
Returns:
String

service

public void service(javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse res)
             throws java.io.IOException,
                    javax.servlet.ServletException
Service the request. This is the standard servlet service method. 1. Retrieve the application name. 2. Retrieve the application property set. 3. Get the DestinationDeterminer and DestinationHandler. 4. Call the DestinationDeterminer. 5. Call the DestinationHandler.
Overrides:
service in class javax.servlet.http.HttpServlet
Parameters:
req - the request.
res - the response.
Throws:
IOException -  
ServletException -  

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved