org.specrunner.core.pipes
Class PipeMemory

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

public class PipeMemory
extends AbstractPipeModel

Add memory information to the pipe.

Author:
Thiago Santos

Field Summary
static String FREE
          Free information.
static String MAX
          Max information.
static String TOTAL
          Total information.
 
Constructor Summary
PipeMemory()
           
 
Method Summary
static Long lookupFree(IChannel channel)
          Get the free memory information.
static Long lookupMax(IChannel channel)
          Get the max memory information.
static Long lookupTotal(IChannel channel)
          Get the total memory information.
 IChannel process(IChannel channel, Map<String,Object> model)
          Process the channel with the model already recovered.
 
Methods inherited from class org.specrunner.core.pipes.AbstractPipeModel
check, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FREE

public static final String FREE
Free information.

See Also:
Constant Field Values

TOTAL

public static final String TOTAL
Total information.

See Also:
Constant Field Values

MAX

public static final String MAX
Max information.

See Also:
Constant Field Values
Constructor Detail

PipeMemory

public PipeMemory()
Method Detail

process

public IChannel process(IChannel channel,
                        Map<String,Object> model)
                 throws PipelineException
Description copied from class: AbstractPipeModel
Process the channel with the model already recovered.

Specified by:
process in class AbstractPipeModel
Parameters:
channel - The pipeline channel.
model - The model.
Returns:
The channel itself.
Throws:
PipelineException - On pipeline errors.

lookupFree

public static Long lookupFree(IChannel channel)
                       throws NotFoundException,
                              InvalidTypeException
Get the free memory information.

Parameters:
channel - The channel.
Returns:
The value.
Throws:
NotFoundException - On lookup errors.
InvalidTypeException - On type errors.

lookupTotal

public static Long lookupTotal(IChannel channel)
                        throws NotFoundException,
                               InvalidTypeException
Get the total memory information.

Parameters:
channel - The channel.
Returns:
The value.
Throws:
NotFoundException - On lookup errors.
InvalidTypeException - On type errors.

lookupMax

public static Long lookupMax(IChannel channel)
                      throws NotFoundException,
                             InvalidTypeException
Get the max memory information.

Parameters:
channel - The channel.
Returns:
The value.
Throws:
NotFoundException - On lookup errors.
InvalidTypeException - On type errors.


Copyright © 2014. All rights reserved.