Kieker 1.12

kieker.analysis.plugin.filter.forward
Class TeeFilter

java.lang.Object
  extended by kieker.analysis.analysisComponent.AbstractAnalysisComponent
      extended by kieker.analysis.plugin.AbstractPlugin
          extended by kieker.analysis.plugin.filter.AbstractFilterPlugin
              extended by kieker.analysis.plugin.filter.forward.TeeFilter
All Implemented Interfaces:
IAnalysisComponent, IFilterPlugin, IPlugin

public final class TeeFilter
extends AbstractFilterPlugin

This filter has exactly one input port and one output port. A simple message is printed to a configurable stream and all objects are forwarded to the output port.

Since:
1.2
Author:
Matthias Rohr, Jan Waller

Nested Class Summary
 
Nested classes/interfaces inherited from interface kieker.analysis.plugin.IPlugin
IPlugin.PluginInputPortReference, IPlugin.STATE
 
Field Summary
static java.lang.String CONFIG_PROPERTY_NAME_APPEND
          The name of the property determining whether or not the stream appends or overwrites to files.
static java.lang.String CONFIG_PROPERTY_NAME_ENCODING
          The name of the property determining the used encoding.
static java.lang.String CONFIG_PROPERTY_NAME_STREAM
          The name of the property determining the stream in which the incoming data will be printed.
static java.lang.String CONFIG_PROPERTY_VALUE_DEFAULT_ENCODING
          The default value of the encoding property which determines that the filter uses utf-8.
static java.lang.String CONFIG_PROPERTY_VALUE_STREAM_APPEND
          The default value of the stream property which determines that the filter appends or overwrites a file.
static java.lang.String CONFIG_PROPERTY_VALUE_STREAM_NULL
          The value of the stream property which determines that the filter doesn't print anything.
static java.lang.String CONFIG_PROPERTY_VALUE_STREAM_STDERR
          The value of the stream property which determines that the filter uses the standard error output.
static java.lang.String CONFIG_PROPERTY_VALUE_STREAM_STDLOG
          The value of the stream property which determines that the filter uses the standard log.
static java.lang.String CONFIG_PROPERTY_VALUE_STREAM_STDOUT
          The value of the stream property which determines that the filter uses the standard output.
static java.lang.String INPUT_PORT_NAME_EVENTS
          The name of the input port for incoming events.
static java.lang.String OUTPUT_PORT_NAME_RELAYED_EVENTS
          The name of the output port delivering the incoming events.
 
Fields inherited from class kieker.analysis.analysisComponent.AbstractAnalysisComponent
CONFIG_NAME, configuration, log, LOG, projectContext, recordsTimeUnitFromProjectContext
 
Constructor Summary
TeeFilter(Configuration configuration, IProjectContext projectContext)
          Creates a new instance of this class using the given parameters.
 
Method Summary
 Configuration getCurrentConfiguration()
          This method should deliver a Configuration object containing the current configuration of this instance.
 void inputEvent(java.lang.Object object)
          This method is the input port of the filter receiving incoming objects.
 void terminate(boolean error)
          Initiates a termination of the plugin.
 
Methods inherited from class kieker.analysis.plugin.filter.AbstractFilterPlugin
init
 
Methods inherited from class kieker.analysis.plugin.AbstractPlugin
areAllRepositoryPortsConnected, connect, connect, deliver, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getAllRepositoryPortNames, getConnectedPlugins, getCurrentRepositories, getDefaultConfiguration, getIncomingPlugins, getPluginDescription, getPluginName, getRepository, getState, isConnectionAllowed, notifyNewIncomingConnection, notifyNewOutgoingConnection, shutdown, start
 
Methods inherited from class kieker.analysis.analysisComponent.AbstractAnalysisComponent
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface kieker.analysis.plugin.IPlugin
connect, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getAllRepositoryPortNames, getConnectedPlugins, getCurrentRepositories, getName, getPluginDescription, getPluginName, getState
 

Field Detail

INPUT_PORT_NAME_EVENTS

public static final java.lang.String INPUT_PORT_NAME_EVENTS
The name of the input port for incoming events.

See Also:
Constant Field Values

OUTPUT_PORT_NAME_RELAYED_EVENTS

public static final java.lang.String OUTPUT_PORT_NAME_RELAYED_EVENTS
The name of the output port delivering the incoming events.

See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_STREAM

public static final java.lang.String CONFIG_PROPERTY_NAME_STREAM
The name of the property determining the stream in which the incoming data will be printed.

See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_ENCODING

public static final java.lang.String CONFIG_PROPERTY_NAME_ENCODING
The name of the property determining the used encoding.

See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_APPEND

public static final java.lang.String CONFIG_PROPERTY_NAME_APPEND
The name of the property determining whether or not the stream appends or overwrites to files.

See Also:
Constant Field Values

CONFIG_PROPERTY_VALUE_STREAM_STDOUT

public static final java.lang.String CONFIG_PROPERTY_VALUE_STREAM_STDOUT
The value of the stream property which determines that the filter uses the standard output.

See Also:
Constant Field Values

CONFIG_PROPERTY_VALUE_STREAM_STDERR

public static final java.lang.String CONFIG_PROPERTY_VALUE_STREAM_STDERR
The value of the stream property which determines that the filter uses the standard error output.

See Also:
Constant Field Values

CONFIG_PROPERTY_VALUE_STREAM_STDLOG

public static final java.lang.String CONFIG_PROPERTY_VALUE_STREAM_STDLOG
The value of the stream property which determines that the filter uses the standard log.

See Also:
Constant Field Values

CONFIG_PROPERTY_VALUE_STREAM_NULL

public static final java.lang.String CONFIG_PROPERTY_VALUE_STREAM_NULL
The value of the stream property which determines that the filter doesn't print anything.

See Also:
Constant Field Values

CONFIG_PROPERTY_VALUE_DEFAULT_ENCODING

public static final java.lang.String CONFIG_PROPERTY_VALUE_DEFAULT_ENCODING
The default value of the encoding property which determines that the filter uses utf-8.

See Also:
Constant Field Values

CONFIG_PROPERTY_VALUE_STREAM_APPEND

public static final java.lang.String CONFIG_PROPERTY_VALUE_STREAM_APPEND
The default value of the stream property which determines that the filter appends or overwrites a file.

See Also:
Constant Field Values
Constructor Detail

TeeFilter

public TeeFilter(Configuration configuration,
                 IProjectContext projectContext)
Creates a new instance of this class using the given parameters.

Parameters:
configuration - The configuration for this component.
projectContext - The project context for this component.
Method Detail

terminate

public final void terminate(boolean error)
Description copied from class: AbstractFilterPlugin
Initiates a termination of the plugin. This method is only used by the framework and should not be called manually. Use the method AnalysisController.terminate(boolean) instead. After receiving this notification, the plugin should terminate any running methods, e.g., read for readers.

Specified by:
terminate in interface IPlugin
Overrides:
terminate in class AbstractFilterPlugin
Parameters:
error - Determines whether the plugin is terminated due to an error or not.

getCurrentConfiguration

public final Configuration getCurrentConfiguration()
This method should deliver a Configuration object containing the current configuration of this instance. In other words: The constructor should be able to use the given object to initialize a new instance of this class with the same intern properties.

Specified by:
getCurrentConfiguration in interface IAnalysisComponent
Specified by:
getCurrentConfiguration in interface IPlugin
Specified by:
getCurrentConfiguration in class AbstractAnalysisComponent
Returns:
A completely filled configuration object.

inputEvent

public final void inputEvent(java.lang.Object object)
This method is the input port of the filter receiving incoming objects. Every object will be printed into a stream (based on the configuration) before the filter sends it to the output port.

Parameters:
object - The new object.

Kieker 1.12

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