This class ensures that policies submitted to Lookup make sense, have the correct value types, and don't exceed the maximums set through the Admin Interface.
More...
Public Types |
enum | POLICY_TYPE {
STARTING_TRADER,
EXACT_TYPE_MATCH,
HOP_COUNT,
LINK_FOLLOW_RULE,
MATCH_CARD,
RETURN_CARD,
SEARCH_CARD,
USE_DYNAMIC_PROPERTIES,
USE_MODIFIABLE_PROPERTIES,
USE_PROXY_OFFERS,
REQUEST_ID
} |
Public Member Functions |
| TAO_Policies (TAO_Trader_Base &trader, const CosTrading::PolicySeq &policies) |
| ~TAO_Policies (void) |
CORBA::ULong | search_card (void) const |
CORBA::ULong | match_card (void) const |
CORBA::ULong | return_card (void) const |
CORBA::Boolean | use_modifiable_properties (void) const |
CORBA::Boolean | use_dynamic_properties (void) const |
CORBA::Boolean | use_proxy_offers (void) const |
CORBA::Boolean | exact_type_match (void) const |
CosTrading::TraderName * | starting_trader (void) const |
CosTrading::FollowOption | link_follow_rule (void) const |
| Determine the link follow policy for this query overall.
|
CosTrading::FollowOption | link_follow_rule (const CosTrading::Link::LinkInfo &link_info) const |
CORBA::ULong | hop_count (void) const |
CosTrading::Admin::OctetSeq * | request_id (void) const |
void | copy_to_pass (CosTrading::PolicySeq &policy_seq, const CosTrading::Admin::OctetSeq &request_id) const |
| Policies to forward to the next trader in a federated query.
|
void | copy_to_forward (CosTrading::PolicySeq &policy_seq, const CosTrading::TraderName &name) const |
| Policies to forward to the next trader in a directed query.
|
void | copy_in_follow_option (CosTrading::PolicySeq &policy_seq, const CosTrading::Link::LinkInfo &link_info) const |
Static Public Attributes |
static const char * | POLICY_NAMES [] |
Private Member Functions |
CORBA::ULong | ulong_prop (POLICY_TYPE pol) const |
| Reconclile a ULong property with its default.
|
CORBA::Boolean | boolean_prop (POLICY_TYPE pol) const |
| Reconcile a Boolean property with its debault.
|
| TAO_Policies (const TAO_Policies &) |
TAO_Policies & | operator= (const TAO_Policies &) |
Private Attributes |
CosTrading::Policy * | policies_ [TAO_NUM_POLICIES] |
| The policies indexable from the enumerated type.
|
TAO_Trader_Base & | trader_ |
| For the validating identifier names.
|
This class ensures that policies submitted to Lookup make sense, have the correct value types, and don't exceed the maximums set through the Admin Interface.
TAO_Policies does an admirable job of reconciling differences between the default parameter settings of the Trader and the import and other policies set by the client. Unbeknownst to its client TAO_Policies hides this arbitration, and records whether the user policy was chosen, or the default. This information gets returned to the invoker of the query method.