CERN -> IPT Group -> FrameMaker at CERN
Information Service User's Guide

8.3 Advanced parameters of the stream constructor

The ISInfoStream constructor has 5 parameters with the last 3 having sensible defaults. In order to customize behavior of the ISInfoStream object one can provide other values for those parameters. Please note that the behaviour of the other public functions of the ISInfoStream class is not affected by those parameters.

The third parameter of the ISInfoStream constructor is of type ISCriteria. It can be used to define the subsets of information, which will be sent to the stream, in a very flexible way. See Subscribe using criteria for the complete description of how the ISCriteria can used.

The forth parameter allows to choose between two modes of receiving information: synchronous and asynchronous. If that parameter is set to false (the default) then the constructor returns immediately after establishing connection with the given IS server. The program may start using the ISInfoStream object immediately after the constructor returns, but the reading of IS objects from the stream will be done in parallel with receiving those objects from the IS server. The ISInfoStream in this mode creates several threads which are receiving new objects and packing them to the stream while user specific thread(s) may be reading this stream. This mode is very efficient in case of using it on the multi-core processors since it provides efficient CPU cores utilization.

If the forth parameter is set to true (synchronous = true) then the constructor returns only when all requested IS objects are received from the IS server. When the ISInfoStream constructor returns it's guaranteed that there no further communication with the IS server will be necessary for any operations with this instance of the ISInfoStream class. This mode can be used for example to find the moment when the IS server can be safely shut down without affecting the behaviour of the information reading application.

The last, fifth, parameter defines how many history values for the matching information objects have to be retrieved from the server. By default it's set to 1, which means that only 1 most recent value will be taken for every object. It can be set to a negative value, in which case the stream will be providing all history values for the matched objects, or to a certain positive value, in which case this value will define the maximum number of objects values to be retrieved. For more information about object's history values see Section 2.2.3 for more information on the IS information history.


2 July 1998 - WebMaster
Copyright © CERN 1998