Kieker 1.6

kieker.analysis.plugin.reader.namedRecordPipe
Class PipeReader

java.lang.Object
  extended by kieker.analysis.plugin.AbstractPlugin
      extended by kieker.analysis.plugin.reader.AbstractReaderPlugin
          extended by kieker.analysis.plugin.reader.namedRecordPipe.PipeReader
All Implemented Interfaces:
IPlugin, IReaderPlugin, IPipeReader

public final class PipeReader
extends AbstractReaderPlugin
implements IPipeReader

Author:
Andre van Hoorn

Nested Class Summary
 
Nested classes/interfaces inherited from interface kieker.analysis.plugin.IPlugin
IPlugin.PluginInputPortReference, IPlugin.STATE
 
Field Summary
static String CONFIG_PROPERTY_NAME_PIPENAME
          This is the configuration-parameter for the name of the pipe to be used.
static String CONFIG_PROPERTY_VALUE_PIPENAME_DEFAULT
           
static String OUTPUT_PORT_NAME_RECORDS
          This is the name of the default output port.
 
Fields inherited from class kieker.analysis.plugin.AbstractPlugin
CONFIG_NAME
 
Constructor Summary
PipeReader(Configuration configuration)
          Creates a new instance of this class using the given parameter.
 
Method Summary
 Configuration getCurrentConfiguration()
          This method should deliver a Configuration object containing the current configuration of this instance.
 boolean newMonitoringRecord(IMonitoringRecord rec)
          Called for each new record.
 void notifyPipeClosed()
          Called to notify the reader that the pipe is closed.
 boolean read()
          Blocks until the associated pipe is being closed.
 void terminate(boolean error)
          Initiates a termination of the plugin.
 
Methods inherited from class kieker.analysis.plugin.reader.AbstractReaderPlugin
init
 
Methods inherited from class kieker.analysis.plugin.AbstractPlugin
areAllRepositoryPortsConnected, connect, connect, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getAllRepositoryPortNames, getConnectedPlugins, getCurrentRepositories, getIncomingPlugins, getName, getPluginDescription, getPluginName, getState, isConnectionAllowed, shutdown, start
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUT_PORT_NAME_RECORDS

public static final String OUTPUT_PORT_NAME_RECORDS
This is the name of the default output port.

See Also:
Constant Field Values

CONFIG_PROPERTY_NAME_PIPENAME

public static final String CONFIG_PROPERTY_NAME_PIPENAME
This is the configuration-parameter for the name of the pipe to be used.

See Also:
Constant Field Values

CONFIG_PROPERTY_VALUE_PIPENAME_DEFAULT

public static final String CONFIG_PROPERTY_VALUE_PIPENAME_DEFAULT
See Also:
Constant Field Values
Constructor Detail

PipeReader

public PipeReader(Configuration configuration)
           throws IllegalArgumentException
Creates a new instance of this class using the given parameter.

Parameters:
configuration - The configuration used to load the pipe name. It must contain the property CONFIG_PROPERTY_NAME_PIPENAME.
Throws:
IllegalArgumentException - If the pipe name was invalid.
Method Detail

read

public boolean read()
Blocks until the associated pipe is being closed.

Specified by:
read in interface IReaderPlugin
Returns:
true if reading was successful; false if an error occurred

newMonitoringRecord

public boolean newMonitoringRecord(IMonitoringRecord rec)
Description copied from interface: IPipeReader
Called for each new record.

Specified by:
newMonitoringRecord in interface IPipeReader
Parameters:
rec - the record.
Returns:
true on success; false in case of an error.

notifyPipeClosed

public void notifyPipeClosed()
Description copied from interface: IPipeReader
Called to notify the reader that the pipe is closed.

Specified by:
notifyPipeClosed in interface IPipeReader

terminate

public void terminate(boolean error)
Description copied from interface: IPlugin
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

getCurrentConfiguration

public Configuration getCurrentConfiguration()
Description copied from interface: IPlugin
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 IPlugin
Returns:
A completely filled configuration object.

Kieker 1.6

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