|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CanyonInputProvider
This class represents the way Canyon gets access to data input Out of the box Canyon gives 5 options for input File, Resource (classpath lookup), Property (environment or runtime variable) or Directory (all the files in a particular directory) or Provider (your custom implementation of this class) By creating your own implementation of this class it is possible to create unlimited ways of obtaining input data. In the unlikely event you data is coming from a database, network stream or even a console you can overwrite this class and create the functionality required. To select the correct provider simply use the correct attribute in the input tag of the canyon.cfg.xml file. For file
<input file="<absolute path to file>"/>For resource
<input resource="<logical path to resource>"/>For property
<input property="<property name>"/>The value of the property should be the absolute path to the input file For directory
<input directory="<absolute path to directory>"/>For custom
<input provider="<the full class name of your implementation>"/>NB: The custom implementation must be in the class path at execution time
| Method Summary | |
|---|---|
java.io.InputStream[] |
getInputStreams(java.util.Properties properties)
Returns an array of input streams to be consumed as input configuration or data |
void |
validate(java.util.Properties properties)
Is called to validate the input streams, so that Canyon can operate on them |
| Method Detail |
|---|
java.io.InputStream[] getInputStreams(java.util.Properties properties)
properties - - the properties defined in the configuration
void validate(java.util.Properties properties)
throws CanyonException
properties - - the properties defined in the configuration
CanyonException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||