net.esper.view
Class ViewServiceImpl

java.lang.Object
  extended by net.esper.view.ViewServiceImpl
All Implemented Interfaces:
ViewService

public final class ViewServiceImpl
extends Object
implements ViewService

Implementation of the view evaluation service business interface.


Constructor Summary
ViewServiceImpl()
          Ctor.
 
Method Summary
 ViewFactoryChain createFactories(EventType parentEventType, List<ViewSpec> viewSpecDefinitions, ViewServiceContext context)
           
 Viewable createViews(Viewable eventStreamViewable, List<ViewFactory> viewFactories, ViewServiceContext context)
          Creates the views given a chain of view factories.
 void remove(EventStream eventStream, Viewable viewToRemove)
          Removes a view discoupling the view and any of it's parent views up the tree to the last shared parent view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewServiceImpl

public ViewServiceImpl()
Ctor.

Method Detail

createFactories

public ViewFactoryChain createFactories(EventType parentEventType,
                                        List<ViewSpec> viewSpecDefinitions,
                                        ViewServiceContext context)
                                 throws ViewProcessingException
Specified by:
createFactories in interface ViewService
Throws:
ViewProcessingException

createViews

public Viewable createViews(Viewable eventStreamViewable,
                            List<ViewFactory> viewFactories,
                            ViewServiceContext context)
Description copied from interface: ViewService
Creates the views given a chain of view factories.

Attempts to reuse compatible views under then parent event stream viewable as indicated by each view factories reuse method.

Specified by:
createViews in interface ViewService
Parameters:
eventStreamViewable - is the event stream to hook into
viewFactories - defines the list of view factorys to call makeView or canReuse on
context - provides services
Returns:
last viewable in chain, or the eventStreamViewable if no view factories are supplied

remove

public void remove(EventStream eventStream,
                   Viewable viewToRemove)
Description copied from interface: ViewService
Removes a view discoupling the view and any of it's parent views up the tree to the last shared parent view.

Specified by:
remove in interface ViewService
Parameters:
eventStream - - the event stream that originates the raw events
viewToRemove - - the view (should be the last in a chain) to remove