com.northconcepts.datapipeline.core
Class MultiWriter

java.lang.Object
  extended by com.northconcepts.datapipeline.core.DataEndpoint
      extended by com.northconcepts.datapipeline.core.DataWriter
          extended by com.northconcepts.datapipeline.core.MultiWriter

public class MultiWriter
extends DataWriter

Writes records to multiple DataWriter.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint
DataEndpoint.State
 
Field Summary
 
Fields inherited from class com.northconcepts.datapipeline.core.DataEndpoint
BUFFER_SIZE, log
 
Constructor Summary
MultiWriter()
           
MultiWriter(DataWriter... sinks)
           
 
Method Summary
 MultiWriter add(DataWriter... sinks)
           
 void close()
          Indicates that this endpoint has finished reading or writing.
 DataEndpoint get(int index)
           
 int getCount()
           
 void open()
          Makes this endpoint ready for reading or writing.
 MultiWriter remove(DataWriter sink)
           
 MultiWriter removeAllDataSink()
           
protected  void writeImpl(Record record)
          Overridden by subclasses to write the specified record to this DataWriter.
 
Methods inherited from class com.northconcepts.datapipeline.core.DataWriter
addExceptionProperties, getNestedWriter, getRootWriter, write
 
Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
assertNotOpened, assertOpened, decrementRecordCount, exception, exception, exception, finalize, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiWriter

public MultiWriter()

MultiWriter

public MultiWriter(DataWriter... sinks)
Method Detail

add

public MultiWriter add(DataWriter... sinks)

getCount

public int getCount()

remove

public MultiWriter remove(DataWriter sink)

removeAllDataSink

public MultiWriter removeAllDataSink()

get

public DataEndpoint get(int index)

open

public void open()
          throws DataException
Description copied from class: DataEndpoint
Makes this endpoint ready for reading or writing.

Overrides:
open in class DataEndpoint
Throws:
DataException

close

public void close()
           throws DataException
Description copied from class: DataEndpoint
Indicates that this endpoint has finished reading or writing.

Overrides:
close in class DataEndpoint
Throws:
DataException

writeImpl

protected void writeImpl(Record record)
                  throws Throwable
Description copied from class: DataWriter
Overridden by subclasses to write the specified record to this DataWriter.

Specified by:
writeImpl in class DataWriter
Throws:
Throwable


Copyright (c) 2007-2009 North Concepts Inc. All Rights Reserved.