Ben Weidig created TAP5-2838:
--------------------------------

             Summary: 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


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)

Reply via email to