|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.view.ViewSupport
com.espertech.esper.view.std.AddPropertyValueView
public final class AddPropertyValueView
This view simply adds a property to the events posted to it. This is useful for the group-merge views.
Field Summary |
---|
Fields inherited from class com.espertech.esper.view.ViewSupport |
---|
EMPTY_VIEW_ARRAY, parent |
Constructor Summary | |
---|---|
AddPropertyValueView(AgentInstanceViewFactoryChainContext agentInstanceContext,
java.lang.String[] propertyNames,
java.lang.Object mergeValues,
EventType mergedResultEventType)
Constructor. |
Method Summary | |
---|---|
protected static EventBean |
addProperty(EventBean originalEvent,
java.lang.String[] propertyNames,
java.lang.Object propertyValues,
EventType targetEventType,
EventAdapterService eventAdapterService)
Add a property to the event passed in. |
View |
cloneView()
Duplicates the view. |
EventType |
getEventType()
Provides metadata information about the type of object the event collection contains. |
java.lang.String[] |
getPropertyNames()
Returns field name for which to set the merge value for. |
java.lang.Object |
getPropertyValues()
Returns the value to set for the field. |
java.util.Iterator<EventBean> |
iterator()
Allows iteration through all elements in this event collection. |
void |
setParent(Viewable parent)
Called when the View is added to a Viewable object. |
void |
stopView()
|
java.lang.String |
toString()
|
void |
update(EventBean[] newData,
EventBean[] oldData)
Notify that data has been added or removed from the Viewable parent. |
Methods inherited from class com.espertech.esper.view.ViewSupport |
---|
addView, addView, dumpChildViews, dumpUpdateParams, dumpUpdateParams, findDescendent, findViewIndex, getParent, getViews, hasViews, removeAllViews, removeView, removeView, updateChildren, updateChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AddPropertyValueView(AgentInstanceViewFactoryChainContext agentInstanceContext, java.lang.String[] propertyNames, java.lang.Object mergeValues, EventType mergedResultEventType)
propertyNames
- is the name of the field that is added to any events received by this view.mergeValues
- is the values of the field that is added to any events received by this view.mergedResultEventType
- is the event type that the merge view reports to it's child viewsagentInstanceContext
- contains required view servicesMethod Detail |
---|
public View cloneView()
CloneableView
Expected to return a same view in initialized state for grouping.
cloneView
in interface CloneableView
public void setParent(Viewable parent)
View
setParent
in interface View
setParent
in class ViewSupport
parent
- is the parent that this view is a child ofpublic final java.lang.String[] getPropertyNames()
public final java.lang.Object getPropertyValues()
public final void update(EventBean[] newData, EventBean[] oldData)
View
update
in interface View
newData
- is the new data that has been added to the parent viewoldData
- is the old data that has been removed from the parent viewpublic final EventType getEventType()
EventCollection
getEventType
in interface EventCollection
public final java.util.Iterator<EventBean> iterator()
EventCollection
iterator
in interface EventCollection
iterator
in interface java.lang.Iterable<EventBean>
public void stopView()
stopView
in interface StoppableView
protected static EventBean addProperty(EventBean originalEvent, java.lang.String[] propertyNames, java.lang.Object propertyValues, EventType targetEventType, EventAdapterService eventAdapterService)
originalEvent
- - event to add property topropertyNames
- - names of properties to addpropertyValues
- - value of properties to addtargetEventType
- - new event typeeventAdapterService
- - service for generating events and handling event types
public final java.lang.String toString()
toString
in class java.lang.Object
|
© 2006-2015 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |