org.springframework.data.hadoop.cascading.tap.local
Class MessageHandlerTap

java.lang.Object
  extended by cascading.tap.Tap<Config,Void,Output>
      extended by cascading.tap.SinkTap<Properties,OutputStream>
          extended by org.springframework.data.hadoop.cascading.tap.local.MessageHandlerTap
All Implemented Interfaces:
FlowElement, Serializable

public class MessageHandlerTap
extends SinkTap<Properties,OutputStream>

SinkTap on top of Spring Integration MessageHandler.

The creation of the message depends on the behaviour of the underlying stream. Each time it is flushed, a Message will be created (with payload of type byte[]). If supported by the underlying stream, a message will be created for each tuple.

Author:
Costin Leau
See Also:
Serialized Form

Constructor Summary
MessageHandlerTap(Scheme<Properties,?,OutputStream,?,?> scheme, MessageHandler handler)
           
 
Method Summary
 boolean createResource(Properties conf)
           
 boolean deleteResource(Properties conf)
           
 String getIdentifier()
           
 long getModifiedTime(Properties conf)
           
 TupleEntryCollector openForWrite(FlowProcess<Properties> flowProcess, OutputStream output)
           
 boolean resourceExists(Properties conf)
           
 
Methods inherited from class cascading.tap.SinkTap
getSourceFields, isSource, openForRead, sourceConfInit
 
Methods inherited from class cascading.tap.Tap
commitResource, equals, flowConfInit, getConfigDef, getFullIdentifier, getScheme, getSinkFields, getSinkMode, getStepConfigDef, getTrace, hasConfigDef, hashCode, hasStepConfigDef, id, isEquivalentTo, isKeep, isReplace, isSink, isTemporary, isUpdate, openForRead, openForWrite, outgoingScopeFor, presentSinkFields, presentSourceFields, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, retrieveSinkFields, retrieveSourceFields, rollbackResource, setScheme, sinkConfInit, taps, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageHandlerTap

public MessageHandlerTap(Scheme<Properties,?,OutputStream,?,?> scheme,
                         MessageHandler handler)
Method Detail

getIdentifier

public String getIdentifier()
Specified by:
getIdentifier in class Tap<Properties,Void,OutputStream>

openForWrite

public TupleEntryCollector openForWrite(FlowProcess<Properties> flowProcess,
                                        OutputStream output)
                                 throws IOException
Specified by:
openForWrite in class Tap<Properties,Void,OutputStream>
Throws:
IOException

createResource

public boolean createResource(Properties conf)
                       throws IOException
Specified by:
createResource in class Tap<Properties,Void,OutputStream>
Throws:
IOException

deleteResource

public boolean deleteResource(Properties conf)
                       throws IOException
Specified by:
deleteResource in class Tap<Properties,Void,OutputStream>
Throws:
IOException

resourceExists

public boolean resourceExists(Properties conf)
                       throws IOException
Specified by:
resourceExists in class Tap<Properties,Void,OutputStream>
Throws:
IOException

getModifiedTime

public long getModifiedTime(Properties conf)
                     throws IOException
Specified by:
getModifiedTime in class Tap<Properties,Void,OutputStream>
Throws:
IOException