Package org.apache.camel.spi
Interface BacklogTracerEventMessage
-
public interface BacklogTracerEventMessageRepresents a traced message by the BacklogTracer.
-
-
Field Summary
Fields Modifier and Type Field Description static StringROOT_TAGstatic StringTIMESTAMP_FORMAT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,Object>asJSon()The event message as an org.apache.camel.util.json.JsonObject object.StringgetExchangeId()The exchange idStringgetMessageAsJSon()The content of the message as JSon (body and headers)StringgetMessageAsXml()The content of the message as XML (body and headers)StringgetRouteId()Route idlonggetTimestamp()Timestamp of the traced eventStringgetToNode()Node id where the message is being routed tolonggetUid()Unique id of the traced messagebooleanisRest()Whether this event was from a route that is created from Rest DSL.booleanisTemplate()Whether this event was from a route that is created from route template or kamelet.StringtoJSon(int indent)Dumps the event message as JSon.StringtoXml(int indent)Dumps the event message as XML using theROOT_TAGas root tag.
-
-
-
Field Detail
-
ROOT_TAG
static final String ROOT_TAG
- See Also:
- Constant Field Values
-
TIMESTAMP_FORMAT
static final String TIMESTAMP_FORMAT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUid
long getUid()
Unique id of the traced message
-
getTimestamp
long getTimestamp()
Timestamp of the traced event
-
getRouteId
String getRouteId()
Route id
-
isRest
boolean isRest()
Whether this event was from a route that is created from Rest DSL.
-
isTemplate
boolean isTemplate()
Whether this event was from a route that is created from route template or kamelet.
-
getToNode
String getToNode()
Node id where the message is being routed to
-
getExchangeId
String getExchangeId()
The exchange id
-
getMessageAsXml
String getMessageAsXml()
The content of the message as XML (body and headers)
-
getMessageAsJSon
String getMessageAsJSon()
The content of the message as JSon (body and headers)
-
toXml
String toXml(int indent)
Dumps the event message as XML using theROOT_TAGas root tag. The timestamp tag is formatted in the format defined byTIMESTAMP_FORMAT- Parameters:
indent- number of spaces to indent- Returns:
- xml representation of this event
-
toJSon
String toJSon(int indent)
Dumps the event message as JSon.- Parameters:
indent- number of spaces to indent- Returns:
- JSon representation of this event
-
-