org.datcracker.core.cell.buffer
Class BatchOfSamples

java.lang.Object
  extended by org.datcracker.core.Cell
      extended by org.datcracker.core.cell.buffer.Buffer
          extended by org.datcracker.core.cell.buffer.BatchOfSamples

public class BatchOfSamples
extends Buffer

Author:
Marcin Wojnarski

Nested Class Summary
 
Nested classes/interfaces inherited from class org.datcracker.core.Cell
Cell.CellMethod, Cell.State
 
Field Summary
 
Fields inherited from class org.datcracker.core.cell.buffer.Buffer
meta
 
Fields inherited from class org.datcracker.core.Cell
parameters, source
 
Constructor Summary
BatchOfSamples()
           
 
Method Summary
 void add(Sample sample)
           
protected  void onClose()
          Called by Cell.close().
protected  Sample onNext()
          Called by Cell.next().
protected  Sample.MetaSample onOpen()
          Called by Cell.open().
 
Methods inherited from class org.datcracker.core.cell.buffer.Buffer
setMeta
 
Methods inherited from class org.datcracker.core.Cell
build, close, erase, getParameters, next, onBuild, onErase, open, set, setParameters, setSource, state, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BatchOfSamples

public BatchOfSamples()
Method Detail

add

public void add(Sample sample)

onOpen

protected Sample.MetaSample onOpen()
                            throws java.lang.Exception
Description copied from class: Cell
Called by Cell.open(). Performs the actual opening of communication session, while open checks only against access violation and handles exceptions. Must be overridden in subclasses if open is to be used.

Overrides:
onOpen in class Cell
Throws:
java.lang.Exception

onNext

protected Sample onNext()
                 throws java.lang.Exception
Description copied from class: Cell
Called by Cell.next(). Performs the actual generation of the next sample, while next checks only against access violation and handles exceptions. Must be overridden in subclasses if next is to be used.

Overrides:
onNext in class Cell
Throws:
java.lang.Exception

onClose

protected void onClose()
                throws java.lang.Exception
Description copied from class: Cell
Called by Cell.close(). Performs the actual closing of communication session, while close checks only against access violation and handles exceptions. Must be overridden in subclasses if close is to be used. Usually the overrider will use onClose to release resources, to let them be garbage-collected.

Overrides:
onClose in class Cell
Throws:
java.lang.Exception