.TH CosNotifyFilter_Filter 3erl "cosNotification 1.2.2" "Ericsson AB" "Erlang Module Definition" .SH NAME CosNotifyFilter_Filter \- This module implements the OMG CosNotifyFilter::Filter interface. .SH DESCRIPTION .LP To get access to the record definitions for the structures use: .br \fI-include_lib("cosNotification/include/*\&.hrl")\&.\fR\& .SH EXPORTS .LP .B _get_constraint_grammar(Filter) -> Grammar .br .RS .LP Types: .RS 3 Filter = #objref .br Grammar = string() .br .RE .RE .RS .LP This operation returns which type of Grammar the Filter uses\&. Currently, only \fI"EXTENDED_TCL"\fR\& is supported\&. .RE .LP .B add_constraints(Filter, ConstraintExpSeq) -> Reply .br .RS .LP Types: .RS 3 Filter = #objref .br ConstraintExpSeq = [Constraint] .br ConstraintExp = #\&'CosNotifyFilter_ConstraintExp\&'{event_types, constraint_expr} .br event_types = #\&'CosNotification_EventTypeSeq\&'{} .br constraint_expr = string() .br Reply = ConstraintInfoSeq | {\&'EXCEPTION\&', #\&'CosNotifyFilter_InvalidConstraint\&'{constr}} .br constr = ConstraintExp .br ConstraintInfoSeq = [ConstraintInfo] .br ConstraintInfo = #\&'CosNotifyFilter_ConstraintInfo\&'{constraint_expression, constraint_id} .br constraint_expression = ConstraintExp .br constraint_id = long() .br .RE .RE .RS .LP Initially, Filters do not contain any constraints, hence, all events will be forwarded\&. The \fIadd_constraints/2\fR\& operation allow us to add constraints to the target object\&. .RE .LP .B modify_constraints(Filter, ConstraintIDSeq, ConstraintInfoSeq) -> Reply .br .RS .LP Types: .RS 3 Filter = #objref .br ConstraintIDSeq = [ConstraintID] .br ConstraintID = long() .br ConstraintInfoSeq = [ConstraintInfo] .br ConstraintInfo = #\&'CosNotifyFilter_ConstraintInfo\&'{constraint_expression, constraint_id} .br constraint_expression = ConstraintExp .br constraint_id = long() .br Reply = ok | {\&'EXCEPTION\&', #\&'CosNotifyFilter_InvalidConstraint\&'{constr}} | {\&'EXCEPTION\&', #\&'CosNotifyFilter_ConstraintNotFound\&'{id}} .br constr = ConstraintExp .br id = long() .br ConstraintExp = #\&'CosNotifyFilter_ConstraintExp\&'{event_types, constraint_expr} .br event_types = #\&'CosNotification_EventTypeSeq\&'{} .br constraint_expr = string() .br .RE .RE .RS .LP 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 \fIConstraintIDSeq\fR\& will, if all values are valid, be deleted\&. The \fIConstraintInfoSeq\fR\& 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\&. .RE .LP .B get_constraints(Filter, ConstraintIDSeq) -> Reply .br .RS .LP Types: .RS 3 Filter = #objref .br ConstraintIDSeq = [ConstraintID] .br ConstraintID = long() .br Reply = ConstraintInfoSeq | {\&'EXCEPTION\&', #\&'CosNotifyFilter_ConstraintNotFound\&'{id}} .br ConstraintInfoSeq = [ConstraintInfo] .br ConstraintInfo = #\&'CosNotifyFilter_ConstraintInfo\&'{constraint_expression, constraint_id} .br constraint_expression = ConstraintExp .br constraint_id = id = long() .br .RE .RE .RS .LP This operation return a sequence of ConstraintInfo\&'s, related to the given ConstraintID\&'s, associated with the target object\&. .RE .LP .B get_all_constraints(Filter) -> ConstraintInfoSeq .br .RS .LP Types: .RS 3 Filter = #objref .br ConstraintInfoSeq = [ConstraintInfo] .br ConstraintInfo = #\&'CosNotifyFilter_ConstraintInfo\&'{constraint_expression, constraint_id} .br constraint_expression = ConstraintExp .br constraint_id = long() .br .RE .RE .RS .LP All constraints, and their unique Id, associated with the target object will be returned by this operation\&. .RE .LP .B remove_all_constraints(Filter) -> ok .br .RS .LP Types: .RS 3 Filter = #objref .br .RE .RE .RS .LP 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\&. .RE .LP .B destroy(Filter) -> ok .br .RS .LP Types: .RS 3 Filter = #objref .br .RE .RE .RS .LP This operation terminates the target object\&. .RE .LP .B match(Filter, Event) -> Reply .br .RS .LP Types: .RS 3 Filter = #objref .br Event = #any .br Reply = boolean() | {\&'EXCEPTION\&', #\&'CosNotifyFilter_UnsupportedFilterableData\&'{}} .br .RE .RE .RS .LP This operation accepts an \fI#any{}\fR\& event and returns \fItrue\fR\& 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\&. .RE .LP .B match_structured(Filter, Event) -> Reply .br .RS .LP Types: .RS 3 Filter = #objref .br Event = #\&'CosNotification_StructuredEvent\&'{} .br Reply = boolean() | {\&'EXCEPTION\&', #\&'CosNotifyFilter_UnsupportedFilterableData\&'{}} .br .RE .RE .RS .LP This operation is similar to the \fImatch\fR\& operation but accepts structured events instead\&. .RE .LP .B attach_callback(Filter, NotifySubscribe) -> CallbackID .br .RS .LP Types: .RS 3 Filter = #objref .br NotifySubscribe = #objref .br CallbackID = long() .br .RE .RE .RS .LP 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\&. .RE .LP .B detach_callback(Filter, CallbackID) -> Reply .br .RS .LP Types: .RS 3 Filter = #objref .br CallbackID = long() .br Reply = ok | {\&'EXCEPTION\&', #\&'CosNotifyFilter_CallbackNotFound\&'{}} .br .RE .RE .RS .LP 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\&. .RE .LP .B get_callbacks(Filter) -> CallbackIDSeq .br .RS .LP Types: .RS 3 Filter = #objref .br CallbackIDSeq = [CallbackID] .br CallbackID = long() .br .RE .RE .RS .LP 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\&. .RE