org.aludratest.service.file
Class FileStream<E extends FileStream<E>>

java.lang.Object
  extended by org.aludratest.service.file.FileStream<E>
Type Parameters:
E -
All Implemented Interfaces:
ActionWordLibrary<E>
Direct Known Subclasses:
EdifactFileWriter, FlatFileReader, FlatFileWriter, SeparatedFileReader, SeparatedFileWriter

public abstract class FileStream<E extends FileStream<E>>
extends Object
implements ActionWordLibrary<E>

Parent class for file reader/writer classes that support the action word library approach.

Author:
Volker Bergmann

Field Summary
protected  String elementType
           
protected  String filePath
           
protected  FileService fileService
           
 
Constructor Summary
protected FileStream(String filePath, FileService fileService)
           
 
Method Summary
 E delete()
          Deletes the file.
 E waitUntilExists()
          Polls the file system until a file at the given path is found or a timeout occurs.
 E waitUntilNotExists()
          Polls the file system until no file is found at the given path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.aludratest.dict.ActionWordLibrary
verifyState
 

Field Detail

filePath

protected final String filePath

fileService

protected final FileService fileService

elementType

protected final String elementType
Constructor Detail

FileStream

protected FileStream(String filePath,
                     FileService fileService)
Method Detail

delete

public E delete()
Deletes the file.

Returns:
a reference to the FileStream object itself

waitUntilExists

public E waitUntilExists()
Polls the file system until a file at the given path is found or a timeout occurs.

Returns:
a reference to the FileStream object itself

waitUntilNotExists

public E waitUntilNotExists()
Polls the file system until no file is found at the given path.

Returns:
a reference to the FileStream object itself


Copyright © 2015 aludratest.org. All rights reserved.