Professional Documents
Culture Documents
RMI/JMS
(VALET OBJECT FOLLOWS COMMAND PATTERN)
RESOURCES PRINTER,SCANNER,DB
TECHNICIAN
Continued
The technician allows the command object to access its resources and instructs it to execute . The valet is passed back to the manager with the requested information. Manager handles all the requests from POS to use the resources and they provide the API to POS. Conduit script help in finding the manager/technician pair.
TECHNICIAN
Technicians operate on the resources based on the requests received from the managers. Technicians usually reside on the same machine with the resource to be accessed. Many managers make requests to the same technician.
VALET OBJECT
The command object in the command pattern Contains both data and code to execute Managers pass the Valet Object over RMI to the Technician
Conduit Script
Defines the Bus and all Manager/Technician pairs that will be instantiated in the system Dispatcher reads the conduit script at run time. Conduit script points to the manager and technician top-level configuration files (eg:defaultuicfg.xml), top-level parameter files, database configuration files etc.
Continued
Journal Manager/Technician Pair
writes audit information and updates the ejournal table jl_enr in the database
Parameter Manager/Technician
Site Parameter Xml
Parameter Tchn
Command Pattern
PARAMETER MANAGER/TECHNICIAN
Parameters can be changed at run time by a user with appropriates rights. Base implementation makes use of the parameter XML which is read at application startup. A handle to parameter Manager is obtained from the bus. Parameter manager communicates to parameter technician who in turn act on the Parameter XML and do the required action. Parameter XML is defined in the main parameter technician file, application.xml
PARAMETER MANAGER/TECHNICIAN
First step is to get the manager out of the bus which is Parameter Manager in this case. ParameterManager param=(ParameterManager)Bus.getManager() ; Set up a variable to hold the result and make a request to manager. Manager in turn send the request to Technician which is Parameter Technician using RMI valet object.
UI MANAGER TECHNICIAN
User Interface technician is coded to create the entire user interface subsystem by using Swing Java Classes :
UIManager class POSUIManager provides API
showScreen() getModel() setModel()
UI Configuration Scripts
defaultuicfg.xml commonuicfg.xml One uicfg.xml per tour
Continued
Prepare data and show the screen: Public void arrive (BusIfc bus) { POSUIManagerIfc ui = (POSUIManagerIfc) bus.getManager(UIManagerIfc.TYPE); model = new POSBaseBeanModel(); ui.showscreen(POSUIManagerIfc.SCREEN_NAME, model); }
COMMAND PATTERN
Command pattern is a data driven design pattern and falls under behavioral pattern category. A request is wrapped under a object as command and passed to invoker object. Invoker object looks for the appropriate object which can handle this command and pass the command to the corresponding object and that object executes the command.