net.sf.pipet.api
Interface ModuleData

All Superinterfaces:
ResourceLoader

public interface ModuleData
extends ResourceLoader

A ModuleData object provides runtime access to a module's environment.


Method Summary
 void close(boolean result)
          Closes all streams.
 ModuleAttributes getAttributes()
          Returns the module's configuration.
 Map<String,? extends Collection<? extends InputStream>> getInputPipes()
          Returns the accessible input pipes.
 Map<String,? extends OutputStream> getOutputPipes()
          Returns the accessible output pipes.
 int getUniqueId()
          Creates an identifier which is unique within the current pipeline instance.
 boolean waitForPipeline(boolean result)
          This method may be called by the module after all processing is completed if the final success status of the pipeline is relevant to the module.
 
Methods inherited from interface net.sf.pipet.api.ResourceLoader
getResource, getResourceURL
 

Method Detail

getAttributes

ModuleAttributes getAttributes()
Returns the module's configuration.


getInputPipes

Map<String,? extends Collection<? extends InputStream>> getInputPipes()
Returns the accessible input pipes.


getOutputPipes

Map<String,? extends OutputStream> getOutputPipes()
Returns the accessible output pipes.


getUniqueId

int getUniqueId()
Creates an identifier which is unique within the current pipeline instance. Subsequent calls to this method return a new identifier.

Returns:
a unique identifier.

close

void close(boolean result)
Closes all streams.


waitForPipeline

boolean waitForPipeline(boolean result)
This method may be called by the module after all processing is completed if the final success status of the pipeline is relevant to the module. Calling this method is optional.

By calling this method, a module reports that its processing is completed. The method does not return until all processing in the pipeline is either completed or aborted, and finally returns the success status of the pipeline.

Parameters:
result - the exit status of the calling module.
Returns:
the exit status of the pipeline execution: true if all modules in the pipeline completed successfully; false otherwise.


Copyright © 2012 VU University Amsterdam. All Rights Reserved.