1CosNotifyFilter_Filter(3) Erlang Module Definition CosNotifyFilter_Filter(3)
2
3
4
6 CosNotifyFilter_Filter - This module implements the OMG CosNotifyFil‐
7 ter::Filter interface.
8
10 To get access to the record definitions for the structures use:
11 -include_lib("cosNotification/include/*.hrl").
12
14 _get_constraint_grammar(Filter) -> Grammar
15
16 Types:
17
18 Filter = #objref
19 Grammar = string()
20
21 This operation returns which type of Grammar the Filter uses.
22 Currently, only "EXTENDED_TCL" is supported.
23
24 add_constraints(Filter, ConstraintExpSeq) -> Reply
25
26 Types:
27
28 Filter = #objref
29 ConstraintExpSeq = [Constraint]
30 ConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types,
31 constraint_expr}
32 event_types = #'CosNotification_EventTypeSeq'{}
33 constraint_expr = string()
34 Reply = ConstraintInfoSeq | {'EXCEPTION', #'CosNotifyFil‐
35 ter_InvalidConstraint'{constr}}
36 constr = ConstraintExp
37 ConstraintInfoSeq = [ConstraintInfo]
38 ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{con‐
39 straint_expression, constraint_id}
40 constraint_expression = ConstraintExp
41 constraint_id = long()
42
43 Initially, Filters do not contain any constraints, hence, all
44 events will be forwarded. The add_constraints/2 operation allow
45 us to add constraints to the target object.
46
47 modify_constraints(Filter, ConstraintIDSeq, ConstraintInfoSeq) -> Reply
48
49 Types:
50
51 Filter = #objref
52 ConstraintIDSeq = [ConstraintID]
53 ConstraintID = long()
54 ConstraintInfoSeq = [ConstraintInfo]
55 ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{con‐
56 straint_expression, constraint_id}
57 constraint_expression = ConstraintExp
58 constraint_id = long()
59 Reply = ok | {'EXCEPTION', #'CosNotifyFilter_InvalidCon‐
60 straint'{constr}} | {'EXCEPTION', #'CosNotifyFilter_Con‐
61 straintNotFound'{id}}
62 constr = ConstraintExp
63 id = long()
64 ConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types,
65 constraint_expr}
66 event_types = #'CosNotification_EventTypeSeq'{}
67 constraint_expr = string()
68
69 This operation is invoked by a client in order to modify the
70 constraints associated with the target object. The constraints
71 related to the Id's in the parameter sequence ConstraintIDSeq
72 will, if all values are valid, be deleted. The ConstraintInfoSeq
73 parameter contains of Id-Expression pairs and a constraint
74 matching one of the unique Id's will, if all input values are
75 correct, be updated. If the parameters contain incorrect data en
76 exception will be raised.
77
78 get_constraints(Filter, ConstraintIDSeq) -> Reply
79
80 Types:
81
82 Filter = #objref
83 ConstraintIDSeq = [ConstraintID]
84 ConstraintID = long()
85 Reply = ConstraintInfoSeq | {'EXCEPTION', #'CosNotifyFil‐
86 ter_ConstraintNotFound'{id}}
87 ConstraintInfoSeq = [ConstraintInfo]
88 ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{con‐
89 straint_expression, constraint_id}
90 constraint_expression = ConstraintExp
91 constraint_id = id = long()
92
93 This operation return a sequence of ConstraintInfo's, related to
94 the given ConstraintID's, associated with the target object.
95
96 get_all_constraints(Filter) -> ConstraintInfoSeq
97
98 Types:
99
100 Filter = #objref
101 ConstraintInfoSeq = [ConstraintInfo]
102 ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{con‐
103 straint_expression, constraint_id}
104 constraint_expression = ConstraintExp
105 constraint_id = long()
106
107 All constraints, and their unique Id, associated with the target
108 object will be returned by this operation.
109
110 remove_all_constraints(Filter) -> ok
111
112 Types:
113
114 Filter = #objref
115
116 All constraints associated with the target object are removed by
117 this operation and, since the the target object no longer con‐
118 tain any constraints, true will always be the result of any
119 match operation.
120
121 destroy(Filter) -> ok
122
123 Types:
124
125 Filter = #objref
126
127 This operation terminates the target object.
128
129 match(Filter, Event) -> Reply
130
131 Types:
132
133 Filter = #objref
134 Event = #any
135 Reply = boolean() | {'EXCEPTION', #'CosNotifyFilter_Unsup‐
136 portedFilterableData'{}}
137
138 This operation accepts an #any{} event and returns true if it
139 satisfies at least one constraint. If the event contains data of
140 the wrong type, e.g., should be a string() but in fact i a
141 short(), an exception is raised.
142
143 match_structured(Filter, Event) -> Reply
144
145 Types:
146
147 Filter = #objref
148 Event = #'CosNotification_StructuredEvent'{}
149 Reply = boolean() | {'EXCEPTION', #'CosNotifyFilter_Unsup‐
150 portedFilterableData'{}}
151
152 This operation is similar to the match operation but accepts
153 structured events instead.
154
155 attach_callback(Filter, NotifySubscribe) -> CallbackID
156
157 Types:
158
159 Filter = #objref
160 NotifySubscribe = #objref
161 CallbackID = long()
162
163 This operation connects a NotifySubscribe object, which should
164 be informed when the target object's constraints are updated. A
165 unique Id is returned which must be stored if we ever want to
166 detach the callback object in the future.
167
168 detach_callback(Filter, CallbackID) -> Reply
169
170 Types:
171
172 Filter = #objref
173 CallbackID = long()
174 Reply = ok | {'EXCEPTION', #'CosNotifyFilter_CallbackNot‐
175 Found'{}}
176
177 If the target object has an associated callback that matches the
178 supplied Id it will be removed and longer informed of any
179 updates. If no object with a matching Id is found an exception
180 is raised.
181
182 get_callbacks(Filter) -> CallbackIDSeq
183
184 Types:
185
186 Filter = #objref
187 CallbackIDSeq = [CallbackID]
188 CallbackID = long()
189
190 This operation returns a sequence of all connected NotifySub‐
191 scribe object Id's. If no callbacks are associated with the tar‐
192 get object the list will be empty.
193
194
195
196Ericsson AB cosNotification 5.0 CosNotifyFilter_Filter(3)