Package org.glowroot.agent.plugin.api
Class MessageSupplier
java.lang.Object
org.glowroot.agent.plugin.api.MessageSupplier
A (lazy) supplier of
Message instances. Needs to be thread safe since transaction thread
creates it, but trace storage (and live viewing) is done in a separate thread.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageSupplierCreates aMessageSupplierfor the specifiedmessage.static MessageSupplierCreates aMessageSupplierfor the specifiedtemplateandargs.abstract Messageget()Returns theMessagefor aTraceEntry.
-
Constructor Details
-
MessageSupplier
protected MessageSupplier()
-
-
Method Details
-
get
Returns theMessagefor aTraceEntry. TheMessagedoes not need to be thread safe if it is instantiated by the implementation of this method. -
create
Creates aMessageSupplierfor the specifiedmessage. -
create
Creates aMessageSupplierfor the specifiedtemplateandargs. Thetemplatecan contain one or more placeholders{}that will be substituted if/when the message text is needed by the specifiedargs.
-