org.fusesource.hawtdispatch
Interface CustomDispatchSource<Event,MergedEvent>

Type Parameters:
Event -
MergedEvent -
All Superinterfaces:
DispatchObject, DispatchSource, Suspendable

public interface CustomDispatchSource<Event,MergedEvent>
extends DispatchSource

A dispatch source that is used to coalesce multiple application generated events for later processing by the dispatch source event handler.


Method Summary
 MergedEvent getData()
           Returns pending data for the dispatch source.
 void merge(Event value)
           Merges data into a dispatch source and submits its event handler runnable to its target queue.
 
Methods inherited from interface org.fusesource.hawtdispatch.DispatchSource
cancel, isCanceled, setCancelHandler, setEventHandler
 
Methods inherited from interface org.fusesource.hawtdispatch.DispatchObject
getTargetQueue, setTargetQueue
 
Methods inherited from interface org.fusesource.hawtdispatch.Suspendable
isSuspended, resume, suspend
 

Method Detail

getData

MergedEvent getData()

Returns pending data for the dispatch source.

This function is intended to be called from within the event handler runnable. The result of calling this function outside of the event handler runnable is undefined.


merge

void merge(Event value)

Merges data into a dispatch source and submits its event handler runnable to its target queue.

Parameters:
value - The value to coalesce with the pending data using the EventAggregator that was specified when this dispach source was created.


Copyright © 2010-2012 FuseSource, Corp.. All Rights Reserved.