net.esper.view
Class ViewFactorySupport

java.lang.Object
  extended by net.esper.view.ViewFactorySupport
All Implemented Interfaces:
ViewFactory

public abstract class ViewFactorySupport
extends Object
implements ViewFactory

Abstract base class for view factories that do not make re-useable views and that do not share view resources with expression nodes.


Constructor Summary
ViewFactorySupport()
           
 
Method Summary
 boolean canProvideCapability(ViewCapability viewCapability)
          Returns true if the view factory can make views that provide a view resource with the given capability.
 boolean canReuse(View view)
          Determines if the given view could be used instead of creating a new view, requires the view factory to compare view type, parameters and other capabilities provided.
 void setProvideCapability(ViewCapability viewCapability, ViewResourceCallback resourceCallback)
          Indicates to the view factory to provide the view resource indicated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.esper.view.ViewFactory
attach, getEventType, makeView, setViewParameters
 

Constructor Detail

ViewFactorySupport

public ViewFactorySupport()
Method Detail

canProvideCapability

public boolean canProvideCapability(ViewCapability viewCapability)
Description copied from interface: ViewFactory
Returns true if the view factory can make views that provide a view resource with the given capability.

Specified by:
canProvideCapability in interface ViewFactory
Parameters:
viewCapability - is the view resource needed
Returns:
true to indicate that the view can provide the resource, or false if not

setProvideCapability

public void setProvideCapability(ViewCapability viewCapability,
                                 ViewResourceCallback resourceCallback)
Description copied from interface: ViewFactory
Indicates to the view factory to provide the view resource indicated.

Specified by:
setProvideCapability in interface ViewFactory
Parameters:
viewCapability - is the required resource descriptor
resourceCallback - is the callback to use to supply the resource needed

canReuse

public boolean canReuse(View view)
Description copied from interface: ViewFactory
Determines if the given view could be used instead of creating a new view, requires the view factory to compare view type, parameters and other capabilities provided.

Specified by:
canReuse in interface ViewFactory
Parameters:
view - is the candidate view to compare to
Returns:
true if the given view can be reused instead of creating a new view, or false to indicate the view is not right for reuse

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com