![]() |
| Front Controller Pattern |
![]() |
| Basic Front Controller sequence |
![]() |
| Command and Controller styled
Front Controller |
![]() |
| Command and Controller Sequence |
![]() |
| Sequence diagram of dispatch to worker and to
view. |
![]() |
| The Front Controller, Request
Initializer and ViewManager |
![]() |
| Sequence with RequestInitializer |
![]() |
| Class diagram of
FrontController, Worker, and WorkRequest |
![]() |
| Class detail of view helper, view model, work request and model manager. |
![]() |
| Sequence showing page template nesting. |
![]() |
| Sequence diagram of stack-based dispatching. |
| Example of WorkerRequestEntry: |
| public interface
WorkRequestEntry extends Serializable { public RequestQueue getRequestQueue(); public void setWorkerKey( String key ); public void setWorkerAction( String action ); public String getWorkerKey( ); public String getWorkerAction( ); // public void setAttribute( String key, Object a ); // public Object getAttribute( String key ); } |
| Example of Dispatching a worker request entry: |
| WorkerSubclass
implements Worker { public void handle( WorkerRequestEntry r ) { WorkerRequestEntry newRequest = r.getRequestQueue().createRequest(); newRequest.setWorkerKey( HumbleWorker.KEY ); newRequest.setWorkerAction( HumbleWorker.ACTION_FLIPOUT ); r.getRequestQueue().push( newRequest ); } } |
| try { Iterator workerKeys = viewModel.getChildNames().getKeys().iterator();j while( workerKeys.hasNext() ) { workerMap.getWorkerByKey( workerKeys.next() ).handle( workRequest ); } workerMap.getWorkerByKey( getviewModel.getParent().KEY ).handle( workRequest ); } catch( SecurityVetoException sve ) { } catch( ApplicationException ae ) { } catch( SystemErrorException see ) { } |
| Code example of worker request dispatching. |