To get access to the record definitions for the structures use:
-include_lib("cosNotification/include/*.hrl").
_get_constraint_grammar(Filter) -> Grammar
Filter = #objrefGrammar = string() This operation returns which type of Grammar the Filter uses. Currently, only "EXTENDED_TCL" is supported.
add_constraints(Filter, ConstraintExpSeq) -> Reply
Filter = #objrefConstraintExpSeq = [Constraint]ConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}event_types = #'CosNotification_EventTypeSeq'{}constraint_expr = string()Reply = ConstraintInfoSeq |
{'EXCEPTION', #'CosNotifyFilter_InvalidConstraint'{constr}}constr = ConstraintExpConstraintInfoSeq = [ConstraintInfo]ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}constraint_expression = ConstraintExpconstraint_id = long() Initially, Filters do not contain any constraints, hence, all events will be forwarded.
The add_constraints/2 operation allow us to add constraints to the target object.
modify_constraints(Filter, ConstraintIDSeq, ConstraintInfoSeq) -> Reply
Filter = #objrefConstraintIDSeq = [ConstraintID]ConstraintID = long()ConstraintInfoSeq = [ConstraintInfo]ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}constraint_expression = ConstraintExpconstraint_id = long()Reply = ok |
{'EXCEPTION', #'CosNotifyFilter_InvalidConstraint'{constr}} |
{'EXCEPTION', #'CosNotifyFilter_ConstraintNotFound'{id}}constr = ConstraintExpid = long()ConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}event_types = #'CosNotification_EventTypeSeq'{}constraint_expr = string() 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
ConstraintIDSeq will, if all values are valid, be deleted. The ConstraintInfoSeq
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.
get_constraints(Filter, ConstraintIDSeq) -> Reply
Filter = #objrefConstraintIDSeq = [ConstraintID]ConstraintID = long()Reply = ConstraintInfoSeq |
{'EXCEPTION', #'CosNotifyFilter_ConstraintNotFound'{id}}ConstraintInfoSeq = [ConstraintInfo]ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}constraint_expression = ConstraintExpconstraint_id = id = long()This operation return a sequence of ConstraintInfo's, related to the given ConstraintID's, associated with the target object.
get_all_constraints(Filter) -> ConstraintInfoSeq
Filter = #objrefConstraintInfoSeq = [ConstraintInfo]ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}constraint_expression = ConstraintExpconstraint_id = long()All constraints, and their unique Id, associated with the target object will be returned by this operation.
remove_all_constraints(Filter) -> ok
Filter = #objrefAll 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.
Filter = #objrefThis operation terminates the target object.
Filter = #objrefEvent = #anyReply = boolean() |
{'EXCEPTION', #'CosNotifyFilter_UnsupportedFilterableData'{}} This operation accepts an #any{} event and returns true if it satisfies
at least one constraint. If the event containts data of the wrong type, e.g., should be
a string() but in fact i a short(), an exception is raised.
match_structured(Filter, Event) -> Reply
Filter = #objrefEvent = #'CosNotification_StructuredEvent'{}Reply = boolean() |
{'EXCEPTION', #'CosNotifyFilter_UnsupportedFilterableData'{}} This operation is similar to the matchy operation but accepts structured
events instead.
attach_callback(Filter, NotifySubscribe) -> CallbackID
Filter = #objrefNotifySubscribe = #objrefCallbackID = long()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.
detach_callback(Filter, CallbackID) -> Reply
Filter = #objrefCallbackID = long()Reply = ok |
{'EXCEPTION', #'CosNotifyFilter_CallbackNotFound'{}}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.
get_callbacks(Filter) -> CallbackIDSeq
Filter = #objrefCallbackIDSeq = [CallbackID]CallbackID = long()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.