public class MetricsCollectingMarshaller<T> extends Object implements Marshaller<T>
Marshallerwhich delegates to another marshaller, whilst collecting metrics about the execution and streaming of that delegate.
Metrics will onlty be collected if the executiuon and streaming do not throw exceptions. Exception conditions are likely to skew the metrics, and so will not be recorded.
|Modifier and Type||Method and Description|
Creates an instrumented wrapper around another Marshaller which will gather execution metrics
Marshals an object to XML.
@Nonnull public static <T> Marshaller<T> forMarshaller(MarshallerMetricsCollector metricsCollector, Marshaller<T> marshaller)
T- The type of the values being marshalled
metricsCollector- The collector to use
marshaller- The marshaller to be instrumented
public Streamable marshal(T object, @Nullable ConversionContext conversionContext) throws XhtmlException
Copyright © 2003–2017 Atlassian. All rights reserved.