We can improve the Thread printer in a number of ways:
- it should be based on Sling thread printer : http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/threaddump/src/main/java/org/apache/sling/extensions/threaddump/internal/
- it should call the Java 5+ methods via reflection, so it will work also in older JVMs
- it should keeps sorting of the thread groups and threads by name
- It should be mode aware printer.
- In ZIP mode, the printer should also include thread dumps and class loader information
- There will be a separate ThreadDumper class, that contains all logic for printing threads/groups. It should be independent from the Web Console API so it can be included by other projects.