PageRenderTime 27ms CodeModel.GetById 22ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/src/com/googlecode/jmxtrans/model/output/StdOutWriter.java

http://jmxtrans.googlecode.com/
Java | 29 lines | 16 code | 5 blank | 8 comment | 1 complexity | 45c6bea8c95a7fc5fb3de7bb1365f2a8 MD5 | raw file
 1package com.googlecode.jmxtrans.model.output;
 2
 3import com.googlecode.jmxtrans.model.Query;
 4import com.googlecode.jmxtrans.model.Result;
 5import com.googlecode.jmxtrans.util.BaseOutputWriter;
 6import com.googlecode.jmxtrans.util.ValidationException;
 7
 8/**
 9 * Basic filter good for testing that just outputs the Result objects using System.out.
10 *
11 * @author jon
12 */
13public class StdOutWriter extends BaseOutputWriter {
14
15    public StdOutWriter() {
16    }
17
18    /**
19     * nothing to validate
20     */
21    public void validateSetup(Query query) throws ValidationException {
22    }
23
24    public void doWrite(Query query) throws Exception {
25        for (Result r : query.getResults()) {
26            System.out.println(r);
27        }
28    }
29}