net.esper.client.soda
Class ProjectedStream

java.lang.Object
  extended by net.esper.client.soda.Stream
      extended by net.esper.client.soda.ProjectedStream
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FilterStream, PatternStream

public abstract class ProjectedStream
extends Stream

Abstract base class for streams that can be projected via views providing data window, uniqueness or other projections or deriving further information from streams.

See Also:
Serialized Form

Constructor Summary
protected ProjectedStream(List<View> views, String optStreamName)
          Ctor.
 
Method Summary
 ProjectedStream addView(String namespace, String name)
          Adds an un-parameterized view to the stream.
 ProjectedStream addView(String namespace, String name, List<Object> parameters)
          Adds a parameterized view to the stream.
 ProjectedStream addView(String namespace, String name, Object... parameters)
          Adds a parameterized view to the stream.
 ProjectedStream addView(View view)
          Add a view to the stream.
 List<View> getViews()
          Returns the list of views added to the stream.
 void setViews(List<View> views)
          Sets the list of views onto the stream.
abstract  void toEQLProjectedStream(StringWriter writer)
          Represent as textual.
 void toEQLStream(StringWriter writer)
          Renders the clause in textual representation.
protected static void toEQLViews(StringWriter writer, List<View> views)
          Renders the views onto the projected stream.
 
Methods inherited from class net.esper.client.soda.Stream
getStreamName, setStreamName, toEQL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectedStream

protected ProjectedStream(List<View> views,
                          String optStreamName)
Ctor.

Parameters:
views - is a list of views upon the stream
optStreamName - is the stream as-name, or null if unnamed
Method Detail

toEQLProjectedStream

public abstract void toEQLProjectedStream(StringWriter writer)
Represent as textual.

Parameters:
writer - to output to

addView

public ProjectedStream addView(String namespace,
                               String name)
Adds an un-parameterized view to the stream.

Parameters:
namespace - is the view namespace, for example "win" for most data windows
name - is the view name, for example "length" for a length window
Returns:
stream

addView

public ProjectedStream addView(String namespace,
                               String name,
                               List<Object> parameters)
Adds a parameterized view to the stream.

Parameters:
namespace - is the view namespace, for example "win" for most data windows
name - is the view name, for example "length" for a length window
parameters - is a list of view parameters
Returns:
stream

addView

public ProjectedStream addView(String namespace,
                               String name,
                               Object... parameters)
Adds a parameterized view to the stream.

Parameters:
namespace - is the view namespace, for example "win" for most data windows
name - is the view name, for example "length" for a length window
parameters - is a list of view parameters
Returns:
stream

addView

public ProjectedStream addView(View view)
Add a view to the stream.

Parameters:
view - to add
Returns:
stream

getViews

public List<View> getViews()
Returns the list of views added to the stream.

Returns:
list of views

setViews

public void setViews(List<View> views)
Sets the list of views onto the stream.

Parameters:
views - list of views

toEQLStream

public void toEQLStream(StringWriter writer)
Renders the clause in textual representation.

Specified by:
toEQLStream in class Stream
Parameters:
writer - to output to

toEQLViews

protected static void toEQLViews(StringWriter writer,
                                 List<View> views)
Renders the views onto the projected stream.

Parameters:
writer - to render to
views - to render

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