Package io.mats3.localinspect
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 Summary
Modifier and TypeMethodDescriptioncreate(MatsFactory matsFactory) Creates thestandard implementationof this interface.voidcreateEndpointReport(Appendable out, MatsEndpoint<?, ?> matsEndpoint, boolean includeStages) Creates the report of a single endpoint.voidcreateFactoryReport(Appendable out, boolean includeInitiators, boolean includeEndpoints, boolean includeStages) Creates the full MatsFactory HTML report.voidcreateFactorySummary(Appendable out, boolean includeInitiators, boolean includeEndpoints) 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.voidcreateInitiatorReport(Appendable out, MatsInitiator matsInitiator) Creates the report of a single initiator.voidcreateStageReport(Appendable out, MatsStage<?, ?, ?> matsStage) Creates the report of a single stage.voidgetJavaScript(Appendable out) Note: The return from this method is static, and should only be included once per HTML page, no matter how many MatsFactories you display.voidgetStyleSheet(Appendable out) Note: The return from this method is static, and should only be included once per HTML page, no matter how many MatsFactories you display.
-
Method Details
-
create
Creates thestandard implementationof this interface. -
getStyleSheet
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
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 HTMLincludeInitiators- whether to include the initiators in the reportincludeEndpoints- whether to include the endpoints in the reportincludeStages- 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 HTMLincludeInitiators- whether to include the initiators in the reportincludeEndpoints- whether to include the endpoints in the report- Throws:
IOException- if the Appendable throws while being output to.
-
createInitiatorReport
Creates the report of a single initiator.- Throws:
IOException
-
createEndpointReport
void createEndpointReport(Appendable out, MatsEndpoint<?, ?> matsEndpoint, boolean includeStages) throws IOExceptionCreates the report of a single endpoint.- Throws:
IOException
-
createStageReport
Creates the report of a single stage.- Throws:
IOException
-