Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

CosNotifyFilter.idl

Go to the documentation of this file.
00001 #ifndef COSNOTIFYFILTER_IDL 
00002 #define COSNOTIFYFILTER_IDL
00003 
00014 #include <orbdefs.idl>
00015 
00016 #include <CosNotification.idl>
00017 #include <CosNotifyComm.idl>
00018 
00019 #pragma prefix "omg.org"
00020 
00021 module CosNotifyFilter
00022 {
00026    typedef long ConstraintID;
00027 
00032    struct ConstraintExp
00033    {
00034       CosNotification::EventTypeSeq event_types;
00035       string constraint_expr;
00036    };
00037 
00041    typedef sequence<ConstraintID> ConstraintIDSeq;
00042 
00046    typedef sequence<ConstraintExp> ConstraintExpSeq;
00047 
00051    struct ConstraintInfo
00052    {
00053       ConstraintExp constraint_expression;
00054       ConstraintID constraint_id;
00055    };
00056 
00060    typedef sequence<ConstraintInfo> ConstraintInfoSeq;
00061 
00066    struct MappingConstraintPair
00067    {
00068       ConstraintExp constraint_expression;
00069       any result_to_set;
00070    };
00071 
00075    typedef sequence<MappingConstraintPair> MappingConstraintPairSeq;
00076 
00081    struct MappingConstraintInfo
00082    {
00083       ConstraintExp constraint_expression;
00084       ConstraintID constraint_id;
00085       any value;
00086    };
00087 
00091    typedef sequence<MappingConstraintInfo> MappingConstraintInfoSeq;
00092 
00096    typedef long CallbackID;
00097 
00101    typedef sequence<CallbackID> CallbackIDSeq;
00102 
00106    exception UnsupportedFilterableData {};
00107 
00111    exception InvalidGrammar {};
00112 
00116    exception InvalidConstraint {ConstraintExp constr;};
00117 
00121    exception DuplicateConstraintID {ConstraintID id;};
00122 
00126    exception ConstraintNotFound {ConstraintID id;};
00127 
00131    exception CallbackNotFound {};
00132 
00136    exception InvalidValue {ConstraintExp constr; any value;};
00137 
00141    interface Filter
00142    {
00146       readonly attribute string constraint_grammar;
00147 
00155       ConstraintInfoSeq add_constraints (
00156          in ConstraintExpSeq constraint_list)
00157          raises (InvalidConstraint);
00158 
00168       void modify_constraints (
00169          in ConstraintIDSeq del_list,
00170          in ConstraintInfoSeq modify_list)
00171          raises (InvalidConstraint, ConstraintNotFound);
00172 
00179       ConstraintInfoSeq get_constraints(
00180          in ConstraintIDSeq id_list)
00181          raises (ConstraintNotFound);
00182 
00187       ConstraintInfoSeq get_all_constraints();
00188 
00192       void remove_all_constraints();
00193 
00197       void destroy();
00198 
00209       boolean match ( in any filterable_data )
00210          raises (UnsupportedFilterableData);
00211 
00222       boolean match_structured (
00223          in CosNotification::StructuredEvent filterable_data )
00224          raises (UnsupportedFilterableData);
00225 
00236       boolean match_typed (
00237          in CosNotification::PropertySeq filterable_data )
00238          raises (UnsupportedFilterableData);
00239 
00247       CallbackID attach_callback (
00248          in CosNotifyComm::NotifySubscribe callback);
00249 
00256       void detach_callback ( in CallbackID callback)
00257          raises ( CallbackNotFound );
00258 
00263       CallbackIDSeq get_callbacks();
00264 
00265    }; // Filter
00266 
00270    interface MappingFilter
00271    {
00275       readonly attribute string constraint_grammar;
00276 
00281       readonly attribute CORBA::TypeCode value_type;
00282 
00286       readonly attribute any default_value;
00287 
00298       MappingConstraintInfoSeq add_mapping_constraints (
00299          in MappingConstraintPairSeq pair_list)
00300          raises (InvalidConstraint, InvalidValue);
00301 
00313       void modify_mapping_constraints (
00314          in ConstraintIDSeq del_list,
00315          in MappingConstraintInfoSeq modify_list)
00316          raises (InvalidConstraint, InvalidValue,
00317                  ConstraintNotFound);
00318 
00327       MappingConstraintInfoSeq get_mapping_constraints (
00328          in ConstraintIDSeq id_list)
00329          raises (ConstraintNotFound);
00330 
00335       MappingConstraintInfoSeq get_all_mapping_constraints();
00336 
00340       void remove_all_mapping_constraints();
00341 
00345       void destroy();
00346 
00360       boolean match ( in any filterable_data,
00361                       out any result_to_set )
00362          raises (UnsupportedFilterableData);
00363       
00377       boolean match_structured (
00378          in CosNotification::StructuredEvent filterable_data,
00379          out any result_to_set)
00380          raises (UnsupportedFilterableData);
00381 
00395       boolean match_typed (
00396          in CosNotification::PropertySeq filterable_data,
00397          out any result_to_set)
00398          raises (UnsupportedFilterableData);
00399 
00400    }; // MappingFilter
00401 
00405    interface FilterFactory
00406    {
00414       Filter create_filter (
00415          in string constraint_grammar)
00416          raises (InvalidGrammar);
00417 
00428       MappingFilter create_mapping_filter (
00429          in string constraint_grammar,
00430          in any default_value)
00431          raises(InvalidGrammar);
00432 
00433    }; // FilterFactory
00434 
00438    typedef long FilterID;
00439 
00443    typedef sequence<FilterID> FilterIDSeq;
00444 
00448    exception FilterNotFound {};
00449 
00453    interface FilterAdmin
00454    {
00461       FilterID add_filter ( in Filter new_filter );
00462 
00469       void remove_filter ( in FilterID filter )
00470          raises ( FilterNotFound );
00471 
00478       Filter get_filter ( in FilterID filter )
00479          raises ( FilterNotFound );
00480 
00485       FilterIDSeq get_all_filters();
00486 
00490       void remove_all_filters();
00491 
00492    }; // FilterAdmin
00493 
00494 }; // CosNotifyFilter
00495 
00496 #endif /* COSNOTIFYFILTER_IDL */