com.espertech.esper.client.hook
Class VirtualDataWindowContext

java.lang.Object
  extended by com.espertech.esper.client.hook.VirtualDataWindowContext

public class VirtualDataWindowContext
extends java.lang.Object

Context for use with virtual data window factory VirtualDataWindowFactory provides contextual information about the named window and the type of events held, handle for posting insert and remove streams and factory for event bean instances.


Constructor Summary
VirtualDataWindowContext(AgentInstanceContext agentInstanceContext, EventType eventType, java.lang.Object[] parameters, ExprNode[] parameterExpressions, EventBeanFactory eventFactory, VirtualDataWindowOutStream outputStream, java.lang.String namedWindowName, ViewFactoryContext viewFactoryContext, java.io.Serializable customConfiguration)
          Ctor.
 
Method Summary
 AgentInstanceContext getAgentInstanceContext()
          Returns the agent instance (context partition) context.
 java.io.Serializable getCustomConfiguration()
          Returns any additional configuration provided.
 EventBeanFactory getEventFactory()
          Returns the factory for creating instances of EventBean from rows.
 EventType getEventType()
          Returns the event type of the events held in the virtual data window as per declaration of the named window.
 java.lang.String getNamedWindowName()
          Returns the name of the named window used in connection with the virtual data window.
 VirtualDataWindowOutStream getOutputStream()
          Returns a handle for use to send insert and remove stream data to consuming statements.
 ExprNode[] getParameterExpressions()
          Returns the expressions passed as parameters to the virtual data window.
 java.lang.Object[] getParameters()
          Returns the parameters passed; for example "create window ABC.my:vdw("10.0.0.1")" passes one paramater here.
 StatementContext getStatementContext()
          Returns the statement context which holds statement information (name, expression, id) and statement-level services.
 ViewFactoryContext getViewFactoryContext()
          Returns the engine services context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualDataWindowContext

public VirtualDataWindowContext(AgentInstanceContext agentInstanceContext,
                                EventType eventType,
                                java.lang.Object[] parameters,
                                ExprNode[] parameterExpressions,
                                EventBeanFactory eventFactory,
                                VirtualDataWindowOutStream outputStream,
                                java.lang.String namedWindowName,
                                ViewFactoryContext viewFactoryContext,
                                java.io.Serializable customConfiguration)
Ctor.

Parameters:
agentInstanceContext - statement services and statement information such as statement name, statement id, EPL expression
eventType - the event type that the named window is declared to hold.
parameters - the parameters passed when declaring the named window, for example "create window ABC.my:vdw("10.0.0.1")" passes one paramater here.
eventFactory - factory for converting row objects to EventBean instances
outputStream - forward the input and output stream received from the update method here
namedWindowName - the name of the named window
parameterExpressions - parameter expressions passed to the virtual data window
viewFactoryContext - context of services
customConfiguration - additional configuration
Method Detail

getStatementContext

public StatementContext getStatementContext()
Returns the statement context which holds statement information (name, expression, id) and statement-level services.

Returns:
statement context

getEventType

public EventType getEventType()
Returns the event type of the events held in the virtual data window as per declaration of the named window.

Returns:
event type

getParameters

public java.lang.Object[] getParameters()
Returns the parameters passed; for example "create window ABC.my:vdw("10.0.0.1")" passes one paramater here.

Returns:
parameters

getEventFactory

public EventBeanFactory getEventFactory()
Returns the factory for creating instances of EventBean from rows.

Returns:
event bean factory

getOutputStream

public VirtualDataWindowOutStream getOutputStream()
Returns a handle for use to send insert and remove stream data to consuming statements.

Typically use "context.getOutputStream().update(newData, oldData);" in the update method of the virtual data window.

Returns:
handle for posting insert and remove stream

getNamedWindowName

public java.lang.String getNamedWindowName()
Returns the name of the named window used in connection with the virtual data window.

Returns:
named window

getParameterExpressions

public ExprNode[] getParameterExpressions()
Returns the expressions passed as parameters to the virtual data window.

Returns:
parameter expressions

getViewFactoryContext

public ViewFactoryContext getViewFactoryContext()
Returns the engine services context.

Returns:
engine services context

getCustomConfiguration

public java.io.Serializable getCustomConfiguration()
Returns any additional configuration provided.

Returns:
additional config

getAgentInstanceContext

public AgentInstanceContext getAgentInstanceContext()
Returns the agent instance (context partition) context.

Returns:
context

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