[
https://issues.apache.org/jira/browse/DEFT-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Johnathan Meehan updated DEFT-142:
----------------------------------
Attachment: deft-142_clone.patch
Notes:
- Request handlers are created through clone (see RequestHandlerFactory and
callers), except for StaticRequestHandler which I left alone for now.
- Specific request handlers can be attached to status codes (see
CustomStatusRequestHandlerExample); right now, the setting for this pairs
directly to HttpStatus. This means that it is possible to set a handler for a
status code that will not be invoked - confusing, but for a first run I thought
it was acceptable. If people like the general idea and it is developed further,
it can be refined with a consideration of the whole application flow.
- Michele's comment noted as a future option, but not included in this patch.
- Sundry clean-up along the way, including a little reorganisation of example
packages. Ignore for now as that's DEFT-175, here because of the trouble
creating the patch.
I think I would like to make some minor changes, and add unit tests.
Nonetheless, could you review and let me know what you think?
> Dynamic creation of RequestHandlers
> -----------------------------------
>
> Key: DEFT-142
> URL: https://issues.apache.org/jira/browse/DEFT-142
> Project: Deft
> Issue Type: New Feature
> Assignee: Johnathan Meehan
> Attachments: deft-142_clone.patch
>
>
> The outcome after a discussion with github.com/inferno-:
> (In the current design) it's volatile to have fields in user defined
> RequestHandlers in conjunction with asynchronous calls. (intermediate request
> (to same RH) could change the state of the RH)
> We should investigate the performance impact for dynamic creation of RH.
> Proposed solution:
> 1, Map<String, RequestHandler> => Map<String, Class<RequestHandler>>
> 2, Application.getHandler should create the appropriate RequestHandler using
> reflection.
> 3, UT / benchmark
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira