com.espertech.esper.core.service
Class UpdateDispatchViewBase

java.lang.Object
  extended by com.espertech.esper.view.ViewSupport
      extended by com.espertech.esper.core.service.UpdateDispatchViewBase
All Implemented Interfaces:
UpdateDispatchView, Dispatchable, EventCollection, View, Viewable, java.lang.Iterable<EventBean>
Direct Known Subclasses:
UpdateDispatchViewBlockingSpin, UpdateDispatchViewBlockingWait, UpdateDispatchViewNonBlocking

public abstract class UpdateDispatchViewBase
extends ViewSupport
implements Dispatchable, UpdateDispatchView

Convenience view for dispatching view updates received from a parent view to update listeners via the dispatch service.


Field Summary
protected  DispatchService dispatchService
          Dispatches events to listeners.
protected  java.lang.ThreadLocal<java.lang.Boolean> isDispatchWaiting
          Flag to indicate we have registered a dispatch.
protected  EventBean lastIterableEvent
          For iteration with patterns.
protected  StatementResultService statementResultService
          Handles result delivery
 
Fields inherited from class com.espertech.esper.view.ViewSupport
EMPTY_VIEW_ARRAY, parent
 
Constructor Summary
UpdateDispatchViewBase(StatementResultService statementResultServiceImpl, DispatchService dispatchService)
          Ctor.
 
Method Summary
 void clear()
          Remove event reference to last event.
 void execute()
          Execute dispatch.
 EventType getEventType()
          Provides metadata information about the type of object the event collection contains.
 StatementResultService getStatementResultService()
           
 java.util.Iterator<EventBean> iterator()
          Allows iteration through all elements in this event collection.
 
Methods inherited from class com.espertech.esper.view.ViewSupport
addView, addView, dumpChildViews, dumpUpdateParams, dumpUpdateParams, findDescendent, findViewIndex, getParent, getViews, hasViews, removeAllViews, removeView, removeView, setParent, updateChildren, updateChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.espertech.esper.core.service.UpdateDispatchView
newResult
 
Methods inherited from interface com.espertech.esper.view.View
getParent, setParent, update
 
Methods inherited from interface com.espertech.esper.view.Viewable
addView, getViews, hasViews, removeAllViews, removeView
 

Field Detail

statementResultService

protected final StatementResultService statementResultService
Handles result delivery


dispatchService

protected final DispatchService dispatchService
Dispatches events to listeners.


lastIterableEvent

protected EventBean lastIterableEvent
For iteration with patterns.


isDispatchWaiting

protected java.lang.ThreadLocal<java.lang.Boolean> isDispatchWaiting
Flag to indicate we have registered a dispatch.

Constructor Detail

UpdateDispatchViewBase

public UpdateDispatchViewBase(StatementResultService statementResultServiceImpl,
                              DispatchService dispatchService)
Ctor.

Parameters:
dispatchService - - for performing the dispatch
statementResultServiceImpl - - handles result delivery
Method Detail

getEventType

public EventType getEventType()
Description copied from interface: EventCollection
Provides metadata information about the type of object the event collection contains.

Specified by:
getEventType in interface EventCollection
Returns:
metadata for the objects in the collection

iterator

public java.util.Iterator<EventBean> iterator()
Description copied from interface: EventCollection
Allows iteration through all elements in this event collection. The iterator will return the elements in the collection in their natural order, or, if there is no natural ordering, in some unpredictable order.

Specified by:
iterator in interface EventCollection
Specified by:
iterator in interface java.lang.Iterable<EventBean>
Returns:
an iterator which will go through all current elements in the collection.

execute

public void execute()
Description copied from interface: Dispatchable
Execute dispatch.

Specified by:
execute in interface Dispatchable

clear

public void clear()
Remove event reference to last event.


getStatementResultService

public StatementResultService getStatementResultService()

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com