[
https://issues.apache.org/jira/browse/TAP5-2838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18128168#comment-18128168
]
ASF subversion and git services commented on TAP5-2838:
-------------------------------------------------------
Commit a237b3426d4244641974aabc4cfacf3b470a046f in tapestry-5's branch
refs/heads/5.9.x from Ben Weidig
[ https://gitbox.apache.org/repos/asf?p=tapestry-5.git;h=a237b3426 ]
TAP5-2838: Make pipeline structure visible at runtime via toString() (#68)
Not implemented as originally described in the Jira ticket.
Instead, Plastic introduces a new interface PipelineStep to each filter, so
they can describe themselves.
This allows for better introspection, not just better toString() output.
Also added a page to T5Dashboard to list the assembled pipelines and what they
contain.
> Make pipeline structure visible at runtime via toString()
> ---------------------------------------------------------
>
> Key: TAP5-2838
> URL: https://issues.apache.org/jira/browse/TAP5-2838
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-ioc
> Reporter: Ben Weidig
> Assignee: Ben Weidig
> Priority: Minor
> Fix For: 5.10.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> h2. Context
> {{PipelineBuilder}} creates filter chains using dynamically generated bridge
> proxies.
> Currently, calling {{toString()}} on a bridge returns only a simple
> description (e.g. {{{}<PipelineBridge from (serviceInterface) to
> (filterInterface)>{}}}).
> There's no way to inspect the full pipeline at runtime.
> To provide more insight in what the pipeline actually does, especially how
> the ordering has resolved, pipelines should output the full chain in
> {{toString()}}
> h2. Design
> Dynamically generate a {{toString()}} implementation for bridge instances
> that formats the bridge's filter and recursively invokes {{toString()}} on the
> {{next}} step (either the next bridge or the terminator).
> Calling {{toString()}} on the pipeline head will automatically compose and
> output the complete pipeline chain at runtime, e.g.:
> {noformat}
> <PipelineBridge from (serviceInterface) to (filterInterface):
> com.example.LoggingFilter@4a3f1c1b com.example.SecurityFilter@1d2e3f>
> {noformat}
> Or something similar.
> h2. Possible Additions / Enhancements
> - Build-time / Startup Logging: Log the assembled pipeline string at
> {{DEBUG}} level when a pipeline is built in {{PipelineBuilderImpl}}
> - Tapestry 5 Dashboard: Expose the formatted pipeline structure on the
> dashboard for easier access
--
This message was sent by Atlassian Jira
(v8.20.10#820010)