|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.AbleObject
com.ibm.able.beans.AbleExport
This class writes data out to external text files.
| Field Summary | |
|---|---|
protected java.lang.String |
dataFileName
The dataFileName is the file name and extension. |
static java.lang.String |
defaultName
|
protected int |
numFieldsPerRecord
The number of fields in a record in the output data. |
protected java.io.BufferedWriter |
out
|
| Fields inherited from class com.ibm.able.AbleObject |
|---|
changed, chgSupport, comment, dataFlowEnabled, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, properties, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace |
| Constructor Summary | |
|---|---|
AbleExport()
Construct a default AbleExport object |
|
AbleExport(java.lang.String name)
Construct an AbleExport object with specified name. |
|
AbleExport(java.lang.String name,
java.lang.String dataFileName)
Construct an AbleExport object with specified name and file. |
|
| Method Summary | |
|---|---|
void |
close()
Close the output file, disable data flow, and set its state to Unititiated. |
void |
erase()
Erase the current file and close the current writer. |
void |
flush()
Flush the output buffer. |
java.lang.String |
getDataFileName()
Get the current output file name. |
java.lang.String |
getDelimiter()
Return the current delimiter String. |
int |
getNumberOfInputFields()
Returns the number of inputs provided to this output device. |
void |
init()
Open the output datafile. |
boolean |
isReady()
Indicate whether the export is ready to write data. |
void |
process()
Write out the contents of inputBuffer to file using specified delimiter. |
java.lang.Object |
process(java.lang.Object theArg)
Write out the contents of the parameter to the data file. |
void |
processAbleEvent(AbleEvent theEvent)
Extract the argument object from an AbleEvent and output it to the data file. |
void |
quitAll()
Close any open file. |
void |
reset()
re-initialize the bean close and reopen the output file |
void |
setDataFileName(java.lang.String newName)
Set the current output file name. |
void |
setDelimiter(java.lang.String newDelims)
Set the current delimiter. |
void |
setNumberOfInputs(int inputs)
Sets the number of inputs to be provided to this output device. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.able.AbleBean |
|---|
getComment, getLogger, getName, getParent, getProperties, getProperty, getState, getTraceLogger, init, isChanged, removeAllConnections, removeProperty, resumeAll, setChanged, setComment, setLogger, setName, setParent, setProperties, setProperty, setState, setTraceLogger, suspendAll |
| Methods inherited from interface com.ibm.able.AbleEventListener |
|---|
handleAbleEvent |
| Methods inherited from interface com.ibm.able.AbleEventListenerManager |
|---|
addAbleEventListener, dataChanged, getAbleEventListeners, notifyAbleEventListeners, removeAbleEventListener |
| Methods inherited from interface com.ibm.able.AbleEventQueueProcessor |
|---|
processNoEventProcessingEnabledSituation, processTimerEvent |
| Methods inherited from interface com.ibm.able.AblePropertyChangeManager |
|---|
addPropertyChangeListener, addPropertyConnection, getPropertyChangeListeners, getPropertyConnectionManager, removeAllPropertyConnections, removePropertyChangeListener, removePropertyConnection |
| Methods inherited from interface com.ibm.able.AbleSerializable |
|---|
getFileName, restoreFromFile, restoreFromFile, saveToFile, saveToFile, setFileName |
| Field Detail |
public static final java.lang.String defaultName
protected java.lang.String dataFileName
protected int numFieldsPerRecord
protected transient java.io.BufferedWriter out
| Constructor Detail |
public AbleExport()
throws AbleException
public AbleExport(java.lang.String name)
throws AbleException
public AbleExport(java.lang.String name,
java.lang.String dataFileName)
throws AbleException
name - A String containing the name used to identify this bean.dataFileName - A String containing the name of the file with no file extension.| Method Detail |
public void init()
throws AbleException
init in interface AbleBeaninit in class AbleObjectAbleException - If an error occurs.AbleObject.startEnabledEventProcessing()public void setDataFileName(java.lang.String newName)
public java.lang.String getDataFileName()
public void setDelimiter(java.lang.String newDelims)
public java.lang.String getDelimiter()
public void setNumberOfInputs(int inputs)
AbleDataSink
setNumberOfInputs in interface AbleDataSinkinputs - The number of inputs required by this output device.public int getNumberOfInputFields()
AbleDataSink
getNumberOfInputFields in interface AbleDataSink
public void process()
throws AbleException
process in interface AbleBeanprocess in class AbleObjectAbleExceptionAbleObject.inputBuffer,
AbleObject.outputBuffer,
AbleBean.process()
public java.lang.Object process(java.lang.Object theArg)
throws AbleException
process in interface AbleBeanprocess in class AbleObjecttheArg - An Object providing data input to the bean.
Note: Only Object[], String[], Vector, and double[] arguments are handled
AbleException - In the following situations:
AbleObject.inputBuffer,
AbleObject.outputBuffer,
AbleBean.process()
public void quitAll()
throws AbleException
quitAll in interface AbleBeanquitAll in class AbleObjectAbleExceptionclose()public void close()
public void flush()
throws AbleException
AbleException
public void erase()
throws AbleException
AbleException
public void reset()
throws AbleException
reset in interface AbleBeanreset in class AbleObjectAbleException - If an error occurs.AbleBean.reset()
public boolean isReady()
throws AbleException
isReady in interface AbleDataSinkAbleException
public void processAbleEvent(AbleEvent theEvent)
throws AbleException
processAbleEvent in interface AbleEventQueueProcessorprocessAbleEvent in class AbleObjecttheEvent - An AbleEvent containing the data to be written to file.
AbleException - If an error occurs.AbleObject.setAbleEventProcessingEnabled(int),
AbleObject.startEnabledEventProcessing(),
AbleObject.handleAbleEvent(AbleEvent)
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||