Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Kieker 1.10
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kieker.monitoring.writer
Class PrintStreamWriter

    java.lang.Object
      kieker.monitoring.writer.AbstractMonitoringWriter
          kieker.monitoring.writer.PrintStreamWriter

All Implemented Interfaces:
  IMonitoringRecordReceiver, IMonitoringWriter

    public class PrintStreamWriter

extends AbstractMonitoringWriter

A writer that prints incoming records to the specified PrintStream.

Since:
  1.5
Author:
  Jan Waller

Field Summary
`static String` | `CONFIG_STREAM_STDERR`
`static String` | `CONFIG_STREAM_STDOUT`
`static String` | `STREAM`

Constructor Summary
`PrintStreamWriter(Configuration configuration)` Creates a new instance of this writer.

Method Summary
`void` | `init()` Implementing classes should indicate an initialization error by throwing an `Exception`.
`boolean` | `newMonitoringRecord(IMonitoringRecord record)` Called for each new record.
`void` | `terminate()` Called by the Monitoring Controller to announce a shutdown of monitoring.

Methods inherited from class kieker.monitoring.writer.AbstractMonitoringWriter
`newMonitoringRecordNonBlocking, setController, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### STREAM

    public static final String STREAM

### CONFIG_STREAM_STDOUT

    public static final String CONFIG_STREAM_STDOUT

See Also:
  Constant Field Values

### CONFIG_STREAM_STDERR

    public static final String CONFIG_STREAM_STDERR

See Also:
  Constant Field Values

Constructor Detail

### PrintStreamWriter

    public PrintStreamWriter(Configuration configuration)

  Creates a new instance of this writer.

  Parameters:
    `configuration` - The configuration which will be used to initialize this writer.

Method Detail

### init

    public void init()
              throws FileNotFoundException,
                     UnsupportedEncodingException

  Description copied from class: `AbstractMonitoringWriter`
  Implementing classes should indicate an initialization error by throwing an `Exception`.

  Throws:
    `FileNotFoundException`
    `UnsupportedEncodingException`

### newMonitoringRecord

    public boolean newMonitoringRecord(IMonitoringRecord record)

  Called for each new record. Notice, that this method should not throw an exception, but indicate an error by the return value false.

  Parameters:
    `record` - the record.
  Returns:
    true on success; false in case of an error.

### terminate

    public void terminate()

  Called by the Monitoring Controller to announce a shutdown of monitoring. Writers should return as soon as it is safe to terminate Kieker.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Kieker 1.10
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2014 Kieker Project, http://kieker-monitoring.net