public class CreateVariableView extends ViewSupport implements VariableChangeCallback
The view posts to listeners when a variable changes, if it has subviews.
The view returns the current variable value for the iterator.
The event type for such posted events is a single field Map with the variable value.
EMPTY_VIEW_ARRAY
Constructor and Description |
---|
CreateVariableView(java.lang.String statementId,
EventAdapterService eventAdapterService,
VariableService variableService,
java.lang.String variableName,
StatementResultService statementResultService)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
EventType |
getEventType()
Provides metadata information about the type of object the event collection contains.
|
static EventType |
getEventType(java.lang.String statementId,
EventAdapterService eventAdapterService,
VariableMetaData variableMetaData) |
java.util.Iterator<EventBean> |
iterator()
Allows iteration through all elements in this event collection.
|
void |
update(EventBean[] newData,
EventBean[] oldData)
Notify that data has been added or removed from the Viewable parent.
|
void |
update(java.lang.Object newValue,
java.lang.Object oldValue)
Indicate a change in variable value.
|
addView, addView, dumpChildViews, dumpUpdateParams, dumpUpdateParams, findDescendent, findViewIndex, getParent, getViews, hasViews, removeAllViews, removeView, removeView, setParent, updateChildren
public CreateVariableView(java.lang.String statementId, EventAdapterService eventAdapterService, VariableService variableService, java.lang.String variableName, StatementResultService statementResultService)
eventAdapterService
- for creating eventsvariableService
- for looking up variablesvariableName
- is the name of the variable to createstatementResultService
- for coordinating on whether insert and remove stream events should be postedpublic static EventType getEventType(java.lang.String statementId, EventAdapterService eventAdapterService, VariableMetaData variableMetaData)
public void update(java.lang.Object newValue, java.lang.Object oldValue)
VariableChangeCallback
update
in interface VariableChangeCallback
newValue
- new valueoldValue
- old valuepublic void update(EventBean[] newData, EventBean[] oldData)
View
public EventType getEventType()
EventCollection
getEventType
in interface EventCollection
public java.util.Iterator<EventBean> iterator()
EventCollection
iterator
in interface EventCollection
iterator
in interface java.lang.Iterable<EventBean>