use of org.platformlayer.client.cli.output.MetricToJsonVisitor in project platformlayer by platformlayer.
the class GetMetric method formatRaw.
@Override
public void formatRaw(Object o, PrintWriter writer) {
MetricDataStream dataStream = (MetricDataStream) o;
try {
MetricToJsonVisitor visitor = new MetricToJsonVisitor(writer);
dataStream.accept(visitor);
visitor.close();
} catch (IOException e) {
throw new IllegalArgumentException("Error formatting results", e);
}
}
Aggregations