Interface LocalHtmlInspectForMatsFactory

All Known Implementing Classes:
LocalHtmlInspectForMatsFactoryImpl

public interface LocalHtmlInspectForMatsFactory
Will produce an "embeddable" HTML interface - notice that there are CSS (getStyleSheet(Appendable)), JavaScript (getJavaScript(Appendable)) and HTML (createFactoryReport(Appendable,..)) to include. If the LocalStatsMatsInterceptor is installed on the MatsFactory implementing MatsInterceptable, it will include pretty nice "local statistics" for all initiators, endpoints and stages.

Note: You are expected to create one instance of an implementation of this interface per MatsFactory, and keep these around for the lifetime of the MatsFactories (i.e. for the JVM) - as in multiple singletons. Do not create one per HTML request. The reason for this is that at a later point, this class might be extended with "active" features, like stopping and starting endpoints, change the concurrency etc - at which point it might itself need active state, e.g. for a feature like "stop this endpoint for 30 minutes".

  • Method Details

    • create

      static LocalHtmlInspectForMatsFactory create(MatsFactory matsFactory)
      Creates the standard implementation of this interface.
    • getStyleSheet

      void getStyleSheet(Appendable out) throws IOException
      Note: The return from this method is static, and should only be included once per HTML page, no matter how many MatsFactories you display.
      Throws:
      IOException
    • getJavaScript

      void getJavaScript(Appendable out) throws IOException
      Note: The return from this method is static, and should only be included once per HTML page, no matter how many MatsFactories you display.
      Throws:
      IOException
    • createFactoryReport

      void createFactoryReport(Appendable out, boolean includeInitiators, boolean includeEndpoints, boolean includeStages) throws IOException
      Creates the full MatsFactory HTML report.
      Parameters:
      out - where to output the HTML
      includeInitiators - whether to include the initiators in the report
      includeEndpoints - whether to include the endpoints in the report
      includeStages - whether to include the stages of the endpoints in the report
      Throws:
      IOException - if the Appendable throws while being output to.
    • createFactorySummary

      void createFactorySummary(Appendable out, boolean includeInitiators, boolean includeEndpoints) throws IOException
      Creates the "Summary table" which is a part of the factory report - it may be interesting to embed on a different page without the entire factory report.
      Parameters:
      out - where to output the HTML
      includeInitiators - whether to include the initiators in the report
      includeEndpoints - whether to include the endpoints in the report
      Throws:
      IOException - if the Appendable throws while being output to.
    • createInitiatorReport

      void createInitiatorReport(Appendable out, MatsInitiator matsInitiator) throws IOException
      Creates the report of a single initiator.
      Throws:
      IOException
    • createEndpointReport

      void createEndpointReport(Appendable out, MatsEndpoint<?,?> matsEndpoint, boolean includeStages) throws IOException
      Creates the report of a single endpoint.
      Throws:
      IOException
    • createStageReport

      void createStageReport(Appendable out, MatsStage<?,?,?> matsStage) throws IOException
      Creates the report of a single stage.
      Throws:
      IOException