#include <Trader_Utils.h>
Collaboration diagram for TAO_Offer_Filter:
Public Methods | |
TAO_Offer_Filter (TAO_Policies &policies ACE_ENV_ARG_DECL) | |
Glean from the TypeStruct and Policy setting the appropriate way to screen unsuitable offers from consideration. More... | |
void | configure_type (CosTradingRepos::ServiceTypeRepository::TypeStruct *type_struct) |
Set the offer filter to screen for offers containing properties that aren't marked as readonly in this TypeStruct. More... | |
CORBA::Boolean | ok_to_consider (CosTrading::Offer *offer) |
Determine whether the poicies contained in the given policy object allow the Lookup interface to consider the offer. More... | |
CORBA::Boolean | ok_to_consider_more (void) |
It's ok to consider more offers when lookup hasn't exceeded the cardinality values for searching and matching offers. More... | |
void | matched_offer (void) |
Signal that the Lookup method has matched an offer; decrement the match_card. More... | |
CosTrading::PolicyNameSeq * | limits_applied (void) |
BEGIN SPEC If any cardinality or other limits were applied by one or more traders in responding to a particular query, then the "limits_applied" parameter will contain the names of the policies which limited the query. More... | |
CORBA::ULong | search_card_remaining (void) const |
Accessors to retrieve the adjusted cardinalities. More... | |
CORBA::ULong | match_card_remaining (void) const |
Private Methods | |
TAO_Offer_Filter (const TAO_Offer_Filter &) | |
TAO_Offer_Filter & | operator= (const TAO_Offer_Filter &) |
Private Attributes | |
TAO_String_Set | not_mod_props_ |
The set of the name of modifiable properties. More... | |
TAO_String_Set | limits_ |
Cardinality and property limitations applied. More... | |
CORBA::ULong | search_card_ |
Keep track of the cardinalities. More... | |
CORBA::ULong | match_card_ |
Keep track of the cardinalities. More... | |
CORBA::ULong | return_card_ |
Keep track of the cardinalities. More... | |
CORBA::Boolean | dp_ |
Keep track of property limitations: modifiable or dynamic ones may be bad. More... | |
CORBA::Boolean | mod_ |
There two classes of reasons why an offer for a correct type shouldn't be considered: 1) The default parameters of the Trader or policies passed to the Lookup::query method deem it inappropriate to consider offers with modifiable (i.e., not readonly) or dynamic properties. 2) We've exceeded the default or provided cardinality constraints. TAO_Offer_Filter ensures that violation of policies doesn't occur. It's the enforcer.
|
Glean from the TypeStruct and Policy setting the appropriate way to screen unsuitable offers from consideration.
|
|
|
|
Set the offer filter to screen for offers containing properties that aren't marked as readonly in this TypeStruct.
|
|
BEGIN SPEC If any cardinality or other limits were applied by one or more traders in responding to a particular query, then the "limits_applied" parameter will contain the names of the policies which limited the query. The sequence of names returned in "limits_applied" from any federated or proxy queries must be concatenated onto the names of limits applied locally and returned. END SPEC |
|
|
|
Signal that the Lookup method has matched an offer; decrement the match_card.
|
|
Determine whether the poicies contained in the given policy object allow the Lookup interface to consider the offer. That is, if use_modifiable_properties is false, and the offer contains modifiable properties as designated in the type struct, return false. If use_dynamic_properties is false, and the offer contains dynamic properties, then return false. If the lookup interface is safe in considering this offer, return true and subtract from the search card value. When the search card value falls to zero, ok_to_consider always returns false. |
|
It's ok to consider more offers when lookup hasn't exceeded the cardinality values for searching and matching offers.
|
|
|
|
Accessors to retrieve the adjusted cardinalities.
|
|
Keep track of property limitations: modifiable or dynamic ones may be bad.
|
|
Cardinality and property limitations applied.
|
|
Keep track of the cardinalities.
|
|
|
|
The set of the name of modifiable properties.
|
|
Keep track of the cardinalities.
|
|
Keep track of the cardinalities.
|