Defining streams
You can use a stream variable to reference a stream. A stream variable declaration has the following form:
stream<type> name
Replace type with the type of the items in the stream. This can be any Apama type.
Replace name with an identifier for the stream. For example:
stream<Tick> ticks;
A stream variable can be a field in an event. However, you cannot route, enqueue, or send an event that contains a stream variable field.
There are two ways to create a stream:
To obtain a reference to an existing stream, you must assign from or clone another stream value.
An inert stream never generates any output. There are a number of ways to create an inert stream including, but not limited to, the following:
Calling
new on a
stream type or a type that contains a stream
Declaring a global variable of
stream type, or a type that contains a stream
Spawning a monitor instance that contains a stream value