|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Consumer
Specification for a consumer of objects that have already been processed
by switchboard clients, allowing arbitrary post-processing in a distributed
object-processing run involving a switchboard. It is guaranteed that after
each NumberedObject
has been processed by some client, every
registered consumer's consume(danbikel.switchboard.NumberedObject)
method will be called with that
numbered object as the argument. A consumer may collect information,
write information to the output file or do nothing; the action taken
after consumption is implementation-dependent. It is also guaranteed
that when the switchboard has determined that the input file contains
no more objects to be processed, every registered consumer's
processingComplete(java.lang.String, java.lang.String)
method will be called. The behavior of a
consumer upon invocation of this method is also implementation-dependent.
Switchboard.registerConsumer(Consumer)
Method Summary | |
---|---|
void |
consume(NumberedObject numObj)
Tells this consumer to consume the specified object that has been processed by one of the switchboard's clients. |
void |
newFile(String inputFilename,
String outputFilename)
Indicates that the consumer is about to be consuming objects from the specified input file. |
void |
processingComplete(String inputFilename,
String outputFilename)
Indicates that processing is complete for the specified input/output file pair. |
Method Detail |
---|
void newFile(String inputFilename, String outputFilename) throws RemoteException
inputFilename
- the name of the input file for which object
processing has commencedoutputFilename
- the name of the (optional) output file to be
created from the specified input file
RemoteException
void consume(NumberedObject numObj) throws RemoteException
numObj
- the processed switchboard object to be consumed by this
consumer instance
RemoteException
void processingComplete(String inputFilename, String outputFilename) throws RemoteException
inputFilename
- the name of the current input fileoutputFilename
- the name of the output file
RemoteException
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |