The main purpose of this module is to match events against associated constraints and return the value for the first constraint that returns true for the given event. If all constraints return false the default value will be returned.
To get access to the record definitions for the structures use:
-include_lib("cosNotification/include/*.hrl").
_get_constraint_grammar(MappingFilter) -> Grammar
MappingFilter = #objrefGrammar = string() This operation returns which type of Grammar the MappingFilter uses.
Currently, only "EXTENDED_TCL" is supported.
_get_value_type(MappingFilter) -> CORBA::TypeCode
MappingFilter = #objref This readonly attribute maintains the CORBA::TypeCode of the default value
associated with the target object.
_get_default_value(MappingFilter) -> #any
MappingFilter = #objref This readonly attribute maintains the #any{} defualt value associated with
the target object.
add_mapping_constraints(MappingFilter, MappingConstraintPairSeq) -> Reply
MappingFilter = #objrefMappingConstraintPairSeq = [MappingConstraintPair]MappingConstraintPair = #'CosNotifyFilter_MappingConstraintPair'{constraint_expression, result_to_set}constraint_expression = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}event_types = #'CosNotification_EventTypeSeq'{}constraint_expr = string()result_to_set = #anyReply = MappingConstraintInfoSeq |
{'EXCEPTION', #'CosNotifyFilter_InvalidConstraint'{constr}} |
{'EXCEPTION', #'CosNotifyFilter_InvalidValue'{constr, value}}constr = ConstraintExpConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}event_types = #'CosNotification_EventTypeSeq'{}constraint_expr = string()MappingConstraintInfoSeq = [MappingConstraintInfo]MappingConstraintInfo = #'CosNotifyFilter_MappingConstraintInfo'{constraint_expression, constraint_id, value}constraint_expression = ConstraintExpconstraint_id = long()value = #anyThis operation add new mapping constraints, which will be used when trying to override Quality of Service settings defined in the given event. If a constraint return true the associated value will be returned, otherwise the default value.
modify_constraints(MappingFilter, ConstraintIDSeq, MappingConstraintInfoSeq) -> Reply
MappingFilter = #objrefConstraintIDSeq = [ConstraintID]ConstraintID = long()MappingConstraintInfoSeq = [MappingConstraintInfo]MappingConstraintInfo = #'CosNotifyFilter_MappingConstraintInfo'{constraint_expression, constraint_id, value}constraint_expression = ConstraintExpconstraint_id = long()value = #anyConstraintInfoSeq = [ConstraintInfo]ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}constraint_expression = ConstraintExpconstraint_id = long()Reply = ok |
{'EXCEPTION', #'CosNotifyFilter_InvalidConstraint'{constr}} |
{'EXCEPTION', #'CosNotifyFilter_ConstraintNotFound'{id}} |
{'EXCEPTION', #'CosNotifyFilter_InvalidValue'{constr, value}}constr = ConstraintExpid = long()value = #anyConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}event_types = #'CosNotification_EventTypeSeq'{}constraint_expr = string() The ConstraintIDSeq supplied should relate to constraints the caller wishes to
remove. If any of the supplied Id's are not found an exception will be raised. This
operation also accepts a sequence of MappingConstraintInfo which will be added.
If the target object cannot modify the constraints as requested an exception is raised
describing which constraint, and why, could not be updated.
get_mapping_constraints(MappingFilter, ConstraintIDSeq) -> Reply
MappingFilter = #objrefConstraintIDSeq = [ConstraintID]ConstraintID = long()Reply = MappingConstraintInfoSeq |
{'EXCEPTION', #'CosNotifyFilter_ConstraintNotFound'{id}}MappingConstraintInfoSeq = [MappingConstraintInfo]MappingConstraintInfo = #'CosNotifyFilter_MappingConstraintInfo'{constraint_expression, constraint_id, value}constraint_expression = ConstraintExpConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}event_types = #'CosNotification_EventTypeSeq'{}constraint_expr = string()constraint_id = id = long()value = #anyWhen adding a new constraint a unique Id is returned, which is accepted as input for this operation. The associated constraint is returned, but if no such Id exists an exception is raised.
get_all_mapping_constraints(MappingFilter) -> MappingConstraintInfoSeq
MappingFilter = #objrefMappingConstraintInfoSeq = [MappingConstraintInfo]MappingConstraintInfo = #'CosNotifyFilter_MappingConstraintInfo'{constraint_expression, constraint_id, value}constraint_expression = ConstraintExpConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}event_types = #'CosNotification_EventTypeSeq'{}constraint_expr = string()constraint_id = long()value = #anyThis operation returns a sequence of all unique Id's associated with the target object. If no constraint have been added the sequence will be empty.
remove_all_mapping_constraints(MappingFilter) -> ok
MappingFilter = #objrefThis operation removes all constraints associated with the target object.
MappingFilter = #objrefThis operation terminates the target object. Remember to remove this Filter from the objects it have been associated with.
match(MappingFilter, Event) -> Reply
MappingFilter = #objrefEvent = #anyReply = {boolean(), #any} |
{'EXCEPTION', #'CosNotifyFilter_UnsupportedFilterableData'{}} This operation evaluates Any events with the Filter's constraints,
and returns the value to use. The value is the default value if all constraints
returns false and the value associated with the first constraint returning true.
match_structured(MappingFilter, Event) -> Reply
MappingFilter = #objrefEvent = #'CosNotification_StructuredEvent'{}Reply = {boolean(), #any} |
{'EXCEPTION', #'CosNotifyFilter_UnsupportedFilterableData'{}} Similar to match/2 but accepts a structured event as input.