org.specrunner.core.pipes
Class PipeTransformSource

java.lang.Object
  extended by org.specrunner.core.pipes.PipeTransformSource
All Implemented Interfaces:
IPipe

public class PipeTransformSource
extends Object
implements IPipe

Pipe perform a transformation into sources.

Author:
Thiago Santos

Constructor Summary
PipeTransformSource()
           
 
Method Summary
 boolean check(IChannel channel)
          Check if a pipe must perform something on channel.
 IChannel process(IChannel channel)
          Perform some transformation over the channel.
protected  ISource transformSource(ISource source)
          Perform a transformation of a given source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipeTransformSource

public PipeTransformSource()
Method Detail

check

public boolean check(IChannel channel)
              throws AbortException
Description copied from interface: IPipe
Check if a pipe must perform something on channel. If the channel is corrupted the pipe must throw AbortException.

Specified by:
check in interface IPipe
Parameters:
channel - The information channel.
Returns:
true, if pipe must perform something on channel, false, otherwise.
Throws:
AbortException - If the channel is corrupted.

process

public IChannel process(IChannel channel)
                 throws PipelineException
Description copied from interface: IPipe
Perform some transformation over the channel.

Specified by:
process in interface IPipe
Parameters:
channel - The channel.
Returns:
The pipe itself.
Throws:
PipelineException - On processing errors.

transformSource

protected ISource transformSource(ISource source)
                           throws SourceException
Perform a transformation of a given source.

Parameters:
source - The source to be transformed.
Returns:
The transformed source.
Throws:
SourceException - On transformation errors.


Copyright © 2014. All rights reserved.