Developing Apama Applications > Apama EPL Reference > Types > Reference data types > stream
stream
A value of stream type refers to a stream. Each stream is a conduit or channel through which items flow. The item types that can flow through streams are event, location, boolean, decimal, float, integer, or string. A stream transports items of only one type. Streams are internal to a monitor.
Usage
An event can contain a field of type stream, however you cannot emit, route, or enqueue an event that has a stream type field. Also, you cannot specify an event that has a stream field in an event template.
Syntax
The syntax for declaring a stream variable is:
stream< type > varname
Replace type with the type of the items in the stream. This can be an event type, or location, boolean, decimal, float, integer, or string.
Replace varname with an identifier for the stream. For example:
stream<Tick> ticks;
Methods
The methods available to the stream data type are:
StreamMethods
*clone() – returns the original stream. It does not clone it.
*quit() – causes a stream listener to terminate.
If the referenced listener’s value is an inert stream, then the quit() method does nothing and does not raise an error.
The quit() method takes no parameters and does not return a result.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.