Erlang -- CosNotifyFilter_Filter

cosNotification

Reference Manual

Version 1.2.3

- User's Guide
- Reference Manual
- Release Notes
- PDF
- Top

- Expand All
- Contract All

### Table of Contents

- cosNotificationApp
  - Top of manual page
  - create_structured_event/6
  - install/0
  - install/1
  - install_event/0
  - install_event/1
  - start/0
  - start_factory/0
  - start_factory/1
  - start_filter_factory/0
  - start_global_factory/0
  - start_global_factory/1
  - stop/0
  - stop_factory/1
  - stop_filter_factory/1
  - type_check/0
  - uninstall/0
  - uninstall/1
  - uninstall_event/0
  - uninstall_event/1
- CosNotifyChannelAdmin_EventChannelFactory
  - Top of manual page
  - create_channel/3
  - get_all_channels/1
  - get_event_channel/2
- CosNotifyChannelAdmin_EventChannel
  - Top of manual page
  - destroy/1
  - for_consumers/1
  - for_suppliers/1
  - get_all_consumeradmins/1
  - get_all_supplieradmins/1
  - get_consumeradmin/2
  - get_supplieradmin/2
  - new_for_consumers/2
  - new_for_suppliers/2
  - _get_MyFactory/1
  - _get_default_consumer_admin/1
  - _get_default_filter_factory/1
  - _get_default_supplier_admin/1
- CosNotification
  - Top of manual page
  - 'AnyOrder'/0
  - 'BestEffort'/0
  - 'ConnectionReliability'/0
  - 'DeadlineOrder'/0
  - 'DefaultPriority'/0
  - 'DiscardPolicy'/0
  - 'EventReliability'/0
  - 'FifoOrder'/0
  - 'HighestPriority'/0
  - 'LifoOrder'/0
  - 'LowestPriority'/0
  - 'MaxConsumers'/0
  - 'MaxEventsPerConsumer'/0
  - 'MaxQueueLength'/0
  - 'MaxSuppliers'/0
  - 'MaximumBatchSize'/0
  - 'OrderPolicy'/0
  - 'PacingInterval'/0
  - 'Persistent'/0
  - 'Priority'/0
  - 'PriorityOrder'/0
  - 'RejectNewEvents'/0
  - 'StartTime'/0
  - 'StartTimeSupported'/0
  - 'StopTime'/0
  - 'StopTimeSupported'/0
  - 'Timeout'/0
- CosNotification_QoSAdmin
  - Top of manual page
  - get_qos/1
  - set_qos/2
  - validate_qos/2
- CosNotification_AdminPropertiesAdmin
  - Top of manual page
  - get_admin/1
  - set_admin/2
- CosNotifyChannelAdmin_ConsumerAdmin
  - Top of manual page
  - destroy/1
  - get_proxy_supplier/2
  - obtain_notification_pull_supplier/2
  - obtain_notification_push_supplier/2
  - obtain_pull_supplier/1
  - obtain_push_supplier/1
  - _get_MyChannel/1
  - _get_MyID/1
  - _get_MyOperator/1
  - _get_lifetime_filter/1
  - _get_priority_filter/1
  - _get_pull_suppliers/1
  - _get_push_suppliers/1
  - _set_lifetime_filter/2
  - _set_priority_filter/2
- CosNotifyChannelAdmin_SupplierAdmin
  - Top of manual page
  - destroy/1
  - get_proxy_consumer/2
  - obtain_notification_pull_consumer/2
  - obtain_notification_push_consumer/2
  - obtain_pull_consumer/1
  - obtain_push_consumer/1
  - _get_MyChannel/1
  - _get_MyID/1
  - _get_MyOperator/1
  - _get_pull_consumers/1
  - _get_push_consumers/1
- CosNotifyComm_NotifyPublish
  - Top of manual page
  - offer_change/3
- CosNotifyComm_NotifySubscribe
  - Top of manual page
  - subscription_change/3
- CosNotifyFilter_FilterAdmin
  - Top of manual page
  - add_filter/2
  - get_all_filters/1
  - get_filter/2
  - remove_all_filters/1
  - remove_filter/2
- CosNotifyFilter_FilterFactory
  - Top of manual page
  - create_filter/2
  - create_mapping_filter/2
- CosNotifyFilter_Filter
  - Top of manual page
  - add_constraints/2
  - attach_callback/2
  - destroy/1
  - detach_callback/2
  - get_all_constraints/1
  - get_callbacks/1
  - get_constraints/2
  - match/2
  - match_structured/2
  - modify_constraints/3
  - remove_all_constraints/1
  - _get_constraint_grammar/1
- CosNotifyFilter_MappingFilter
  - Top of manual page
  - add_mapping_constraints/2
  - destroy/1
  - get_all_mapping_constraints/1
  - get_mapping_constraints/2
  - match/2
  - match_structured/2
  - modify_constraints/3
  - remove_all_mapping_constraints/1
  - _get_constraint_grammar/1
  - _get_default_value/1
  - _get_value_type/1
- CosNotifyChannelAdmin_ProxyConsumer
  - Top of manual page
  - obtain_subscription_types/2
  - validate_event_qos/2
  - _get_MyAdmin/1
  - _get_MyType/1
- CosNotifyChannelAdmin_ProxySupplier
  - Top of manual page
  - obtain_offered_types/2
  - validate_event_qos/2
  - _get_MyAdmin/1
  - _get_MyType/1
  - _get_lifetime_filter/1
  - _get_priority_filter/1
  - _set_lifetime_filter/2
  - _set_priority_filter/2
- CosNotifyChannelAdmin_ProxyPullConsumer
  - Top of manual page
  - connect_any_pull_supplier/2
  - disconnect_pull_consumer/1
  - resume_connection/1
  - suspend_connection/1
- CosNotifyChannelAdmin_ProxyPullSupplier
  - Top of manual page
  - connect_any_pull_consumer/2
  - disconnect_pull_supplier/1
  - pull/1
  - try_pull/1
- CosNotifyChannelAdmin_ProxyPushConsumer
  - Top of manual page
  - connect_any_push_supplier/2
  - disconnect_push_consumer/1
  - push/2
- CosNotifyChannelAdmin_ProxyPushSupplier
  - Top of manual page
  - connect_any_push_consumer/2
  - disconnect_push_supplier/1
  - resume_connection/1
  - suspend_connection/1
- CosNotifyChannelAdmin_SequenceProxyPullConsumer
  - Top of manual page
  - connect_sequence_pull_supplier/2
  - disconnect_sequence_pull_consumer/1
  - resume_connection/1
  - suspend_connection/1
- CosNotifyChannelAdmin_SequenceProxyPullSupplier
  - Top of manual page
  - connect_sequence_pull_consumer/2
  - disconnect_sequence_pull_supplier/1
  - pull_structured_events/2
  - try_pull_structured_events/2
- CosNotifyChannelAdmin_SequenceProxyPushConsumer
  - Top of manual page
  - connect_sequence_push_supplier/2
  - disconnect_sequence_push_consumer/1
  - push_structured_events/2
- CosNotifyChannelAdmin_SequenceProxyPushSupplier
  - Top of manual page
  - connect_sequence_push_consumer/2
  - disconnect_sequence_push_supplier/1
  - resume_connection/1
  - suspend_connection/1
- CosNotifyChannelAdmin_StructuredProxyPullConsumer
  - Top of manual page
  - connect_structured_pull_supplier/2
  - disconnect_structured_pull_consumer/1
  - resume_connection/1
  - suspend_connection/1
- CosNotifyChannelAdmin_StructuredProxyPullSupplier
  - Top of manual page
  - connect_structured_pull_consumer/2
  - disconnect_structured_pull_supplier/1
  - pull_structured_event/1
  - try_pull_structured_event/1
- CosNotifyChannelAdmin_StructuredProxyPushConsumer
  - Top of manual page
  - connect_structured_push_supplier/2
  - disconnect_structured_push_consumer/1
  - push_structured_event/2
- CosNotifyChannelAdmin_StructuredProxyPushSupplier
  - Top of manual page
  - connect_structured_push_consumer/2
  - disconnect_structured_push_supplier/1
  - resume_connection/1
  - suspend_connection/1

# CosNotifyFilter_Filter

### Module

CosNotifyFilter_Filter

### Module Summary

This module implements the OMG CosNotifyFilter::Filter interface.

### Description

To get access to the record definitions for the structures use:
-include_lib("cosNotification/include/*.hrl").

### Exports

_get_constraint_grammar(Filter) -> Grammar

### Types

Filter = #objref
Grammar = string()

This operation returns which type of Grammar the Filter uses. Currently, only "EXTENDED_TCL" is supported.

add_constraints(Filter, ConstraintExpSeq) -> Reply

### Types

Filter = #objref
ConstraintExpSeq = [Constraint]
ConstraintExp = #'CosNotifyFilter_ConstraintExp'{event_types, constraint_expr}
event_types = #'CosNotification_EventTypeSeq'{}
constraint_expr = string()
Reply = ConstraintInfoSeq | {'EXCEPTION', #'CosNotifyFilter_InvalidConstraint'{constr}}
constr = ConstraintExp
ConstraintInfoSeq = [ConstraintInfo]
ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}
constraint_expression = ConstraintExp
constraint_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

### Types

Filter = #objref
ConstraintIDSeq = [ConstraintID]
ConstraintID = long()
ConstraintInfoSeq = [ConstraintInfo]
ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}
constraint_expression = ConstraintExp
constraint_id = long()
Reply = ok | {'EXCEPTION', #'CosNotifyFilter_InvalidConstraint'{constr}} | {'EXCEPTION', #'CosNotifyFilter_ConstraintNotFound'{id}}
constr = ConstraintExp
id = 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

### Types

Filter = #objref
ConstraintIDSeq = [ConstraintID]
ConstraintID = long()
Reply = ConstraintInfoSeq | {'EXCEPTION', #'CosNotifyFilter_ConstraintNotFound'{id}}
ConstraintInfoSeq = [ConstraintInfo]
ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}
constraint_expression = ConstraintExp
constraint_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

### Types

Filter = #objref
ConstraintInfoSeq = [ConstraintInfo]
ConstraintInfo = #'CosNotifyFilter_ConstraintInfo'{constraint_expression, constraint_id}
constraint_expression = ConstraintExp
constraint_id = long()

All constraints, and their unique Id, associated with the target object will be returned by this operation.

remove_all_constraints(Filter) -> ok

### Types

Filter = #objref

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.

destroy(Filter) -> ok

### Types

Filter = #objref

This operation terminates the target object.

match(Filter, Event) -> Reply

### Types

Filter = #objref
Event = #any
Reply = boolean() | {'EXCEPTION', #'CosNotifyFilter_UnsupportedFilterableData'{}}

This operation accepts an #any{} event and returns true 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.

match_structured(Filter, Event) -> Reply

### Types

Filter = #objref
Event = #'CosNotification_StructuredEvent'{}
Reply = boolean() | {'EXCEPTION', #'CosNotifyFilter_UnsupportedFilterableData'{}}

This operation is similar to the match operation but accepts structured events instead.

attach_callback(Filter, NotifySubscribe) -> CallbackID

### Types

Filter = #objref
NotifySubscribe = #objref
CallbackID = 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

### Types

Filter = #objref
CallbackID = 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

### Types

Filter = #objref
CallbackIDSeq = [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.