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
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageSupplier
Creates aMessageSupplier
for the specifiedmessage
.static MessageSupplier
Creates aMessageSupplier
for the specifiedtemplate
andargs
.abstract Message
get()
Returns theMessage
for aTraceEntry
.
-
Constructor Details
-
MessageSupplier
protected MessageSupplier()
-
-
Method Details
-
get
Returns theMessage
for aTraceEntry
. TheMessage
does not need to be thread safe if it is instantiated by the implementation of this method. -
create
Creates aMessageSupplier
for the specifiedmessage
. -
create
Creates aMessageSupplier
for the specifiedtemplate
andargs
. Thetemplate
can contain one or more placeholders{}
that will be substituted if/when the message text is needed by the specifiedargs
.
-