aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cosNotification/doc/src/CosNotifyFilter_Filter.xml
blob: a953540849fc17291049bb0116c6d69503881347 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2000</year><year>2016</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
 
          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    
    </legalnotice>

    <title>CosNotifyFilter_Filter</title>
    <prepared></prepared>
    <docno></docno>
    <checked></checked>
    <date>2000-02-01</date>
    <rev>1.0</rev>
  </header>
  <module>CosNotifyFilter_Filter</module>
  <modulesummary>This module implements the OMG CosNotifyFilter::Filter interface.</modulesummary>
  <description>
    <p>To get access to the record definitions for the structures use:      <br></br>
<c>-include_lib("cosNotification/include/*.hrl").</c></p>
  </description>
  <funcs>
    <func>
      <name>_get_constraint_grammar(Filter) -> Grammar</name>
      <fsummary>Return which type of Grammar the Filter uses</fsummary>
      <type>
        <v>Filter = #objref</v>
        <v>Grammar = string()</v>
      </type>
      <desc>
        <p>This operation returns which type of Grammar the Filter uses. Currently, only <c>"EXTENDED_TCL"</c> is supported.</p>
      </desc>
    </func>
    <func>
      <name>add_constraints(Filter, ConstraintExpSeq) -> Reply</name>
      <fsummary>Add new constraints to the filter</fsummary>
      <type>
        <v>Filter = #objref</v>
        <v>ConstraintExpSeq = [Constraint]</v>
        <v>ConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}</v>
        <v>event_types = #'CosNotification_EventTypeSeq'{}</v>
        <v>constraint_expr = string()</v>
        <v>Reply = ConstraintInfoSeq | {'EXCEPTION', #'CosNotifyFilter_InvalidConstraint'{constr}}</v>
        <v>constr = ConstraintExp</v>
        <v>ConstraintInfoSeq = [ConstraintInfo]</v>
        <v>ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}</v>
        <v>constraint_expression = ConstraintExp</v>
        <v>constraint_id = long()</v>
      </type>
      <desc>
        <p>Initially, Filters do not contain any constraints, hence, all events will be forwarded.
          The <c>add_constraints/2</c> operation allow us to add constraints to the target object.</p>
      </desc>
    </func>
    <func>
      <name>modify_constraints(Filter, ConstraintIDSeq, ConstraintInfoSeq) -> Reply</name>
      <fsummary>Modify existing constraints</fsummary>
      <type>
        <v>Filter = #objref</v>
        <v>ConstraintIDSeq = [ConstraintID]</v>
        <v>ConstraintID = long()</v>
        <v>ConstraintInfoSeq = [ConstraintInfo]</v>
        <v>ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}</v>
        <v>constraint_expression = ConstraintExp</v>
        <v>constraint_id = long()</v>
        <v>Reply = ok | {'EXCEPTION', #'CosNotifyFilter_InvalidConstraint'{constr}} | {'EXCEPTION', #'CosNotifyFilter_ConstraintNotFound'{id}}</v>
        <v>constr = ConstraintExp</v>
        <v>id = long()</v>
        <v>ConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}</v>
        <v>event_types = #'CosNotification_EventTypeSeq'{}</v>
        <v>constraint_expr = string()</v>
      </type>
      <desc>
        <p>This operation is invoked by a client in order to modify the constraints associated
          with the target object. The constraints related to the Id's in the parameter sequence
          <c>ConstraintIDSeq</c> will, if all values are valid, be deleted. The <c>ConstraintInfoSeq</c>
          parameter contains of Id-Expression pairs and a constraint matching one of the unique
          Id's will, if all input values are correct, be updated. If the parameters contain incorrect
          data en exception will be raised.</p>
      </desc>
    </func>
    <func>
      <name>get_constraints(Filter, ConstraintIDSeq) -> Reply</name>
      <fsummary>Return all constraints which match the supplied Ids</fsummary>
      <type>
        <v>Filter = #objref</v>
        <v>ConstraintIDSeq = [ConstraintID]</v>
        <v>ConstraintID = long()</v>
        <v>Reply = ConstraintInfoSeq | {'EXCEPTION', #'CosNotifyFilter_ConstraintNotFound'{id}}</v>
        <v>ConstraintInfoSeq = [ConstraintInfo]</v>
        <v>ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}</v>
        <v>constraint_expression = ConstraintExp</v>
        <v>constraint_id = id = long()</v>
      </type>
      <desc>
        <p>This operation return a sequence of ConstraintInfo's, related to the given ConstraintID's,
          associated with the target object.</p>
      </desc>
    </func>
    <func>
      <name>get_all_constraints(Filter) -> ConstraintInfoSeq</name>
      <fsummary>Return all constraints associated with the target object</fsummary>
      <type>
        <v>Filter = #objref</v>
        <v>ConstraintInfoSeq = [ConstraintInfo]</v>
        <v>ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}</v>
        <v>constraint_expression = ConstraintExp</v>
        <v>constraint_id = long()</v>
      </type>
      <desc>
        <p>All constraints, and their unique Id, associated with the target object will be returned by this operation.</p>
      </desc>
    </func>
    <func>
      <name>remove_all_constraints(Filter) -> ok</name>
      <fsummary>Remove all constraints associated with the target object</fsummary>
      <type>
        <v>Filter = #objref</v>
      </type>
      <desc>
        <p>All constraints associated with the target object are removed by this operation and, since
          the the target object no longer contain any constraints, true will always be the result of
          any match operation.</p>
      </desc>
    </func>
    <func>
      <name>destroy(Filter) -> ok</name>
      <fsummary>Terminate the target object</fsummary>
      <type>
        <v>Filter = #objref</v>
      </type>
      <desc>
        <p>This operation terminates the target object.</p>
      </desc>
    </func>
    <func>
      <name>match(Filter, Event) -> Reply</name>
      <fsummary>Match the Any event if it satisfies at least one constraint</fsummary>
      <type>
        <v>Filter = #objref</v>
        <v>Event = #any</v>
        <v>Reply = boolean() | {'EXCEPTION', #'CosNotifyFilter_UnsupportedFilterableData'{}}</v>
      </type>
      <desc>
        <p>This operation accepts an <c>#any{}</c> event and returns <c>true</c> if it satisfies
          at least one constraint. If the event contains data of the wrong type, e.g., should be 
          a string() but in fact i a short(), an exception is raised.</p>
      </desc>
    </func>
    <func>
      <name>match_structured(Filter, Event) -> Reply</name>
      <fsummary>Match the structured event if it satisfies at least one constraint</fsummary>
      <type>
        <v>Filter = #objref</v>
        <v>Event = #'CosNotification_StructuredEvent'{}</v>
        <v>Reply = boolean() | {'EXCEPTION', #'CosNotifyFilter_UnsupportedFilterableData'{}}</v>
      </type>
      <desc>
        <p>This operation is similar to the <c>match</c> operation but accepts structured
          events instead.</p>
      </desc>
    </func>
    <func>
      <name>attach_callback(Filter, NotifySubscribe) -> CallbackID</name>
      <fsummary>Connect NotifySubscribe object, which should be informed when the target object's constraints are updated</fsummary>
      <type>
        <v>Filter = #objref</v>
        <v>NotifySubscribe = #objref</v>
        <v>CallbackID = long()</v>
      </type>
      <desc>
        <p>This operation connects a NotifySubscribe object, which should be informed
          when the target object's constraints are updated. A unique Id is returned
          which must be stored if we ever want to detach the callback object in the future.</p>
      </desc>
    </func>
    <func>
      <name>detach_callback(Filter, CallbackID) -> Reply</name>
      <fsummary>Disconnect the NotifySubscribe object with the given Id</fsummary>
      <type>
        <v>Filter = #objref</v>
        <v>CallbackID = long()</v>
        <v>Reply = ok | {'EXCEPTION', #'CosNotifyFilter_CallbackNotFound'{}}</v>
      </type>
      <desc>
        <p>If the target object has an associated callback that matches the supplied
          Id it will be removed and longer informed of any updates. If no object 
          with a matching Id is found an exception is raised.</p>
      </desc>
    </func>
    <func>
      <name>get_callbacks(Filter) -> CallbackIDSeq</name>
      <fsummary>Return all NotifySubscribe Id's associated with the target object</fsummary>
      <type>
        <v>Filter = #objref</v>
        <v>CallbackIDSeq = [CallbackID]</v>
        <v>CallbackID = long()</v>
      </type>
      <desc>
        <p>This operation returns a sequence of all connected NotifySubscribe object Id's.
          If no callbacks are associated with the target object the list will be empty.</p>
      </desc>
    </func>
  </funcs>
  
</erlref>