/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

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