TAO_CosTrader 4.0.1
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE > Class Template Reference

This class implements CosTrading::Lookup IDL interface. More...

#include <Trader_Interfaces.h>

Inheritance diagram for TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >:
Inheritance graph
[legend]
Collaboration diagram for TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >:
Collaboration graph
[legend]

Public Member Functions

 TAO_Lookup (TAO_Trader< TRADER_LOCK_TYPE, MAP_LOCK_TYPE > &trader)
 
 ~TAO_Lookup ()
 
virtual void query (const char *type, const char *constr, const char *pref, const CosTrading::PolicySeq &policies, const CosTrading::Lookup::SpecifiedProps &desired_props, CORBA::ULong how_many, CosTrading::OfferSeq_out offers, CosTrading::OfferIterator_out offer_itr, CosTrading::PolicyNameSeq_out limits_applied)
 
- Public Member Functions inherited from TAO_Trader_Components< POA_CosTrading::Lookup >
 TAO_Trader_Components (const TAO_Trading_Components_i &comps)
 
virtual CosTrading::Lookup_ptr lookup_if ()
 
virtual CosTrading::Register_ptr register_if ()
 
virtual CosTrading::Link_ptr link_if ()
 
virtual CosTrading::Proxy_ptr proxy_if ()
 
virtual CosTrading::Admin_ptr admin_if ()
 
- Public Member Functions inherited from TAO_Support_Attributes< POA_CosTrading::Lookup >
 TAO_Support_Attributes (const TAO_Support_Attributes_i &attrs)
 
virtual CORBA::Boolean supports_modifiable_properties ()
 
virtual CORBA::Boolean supports_dynamic_properties ()
 
virtual CORBA::Boolean supports_proxy_offers ()
 
virtual CosTrading::TypeRepository_ptr type_repos ()
 
- Public Member Functions inherited from TAO_Import_Attributes< POA_CosTrading::Lookup >
 TAO_Import_Attributes (const TAO_Import_Attributes_i &attrs)
 
virtual CORBA::ULong def_search_card ()
 
virtual CORBA::ULong max_search_card ()
 
virtual CORBA::ULong def_match_card ()
 
virtual CORBA::ULong max_match_card ()
 
virtual CORBA::ULong def_return_card ()
 
virtual CORBA::ULong max_return_card ()
 
virtual CORBA::ULong max_list ()
 
virtual CORBA::ULong def_hop_count ()
 
virtual CORBA::ULong max_hop_count ()
 
virtual CosTrading::FollowOption def_follow_policy ()
 
virtual CosTrading::FollowOption max_follow_policy ()
 

Private Types

typedef ACE_Unbounded_Queue< const CosTrading::Admin::OctetSeq * > Request_Ids
 

Private Member Functions

TAO_Offer_Iteratorcreate_offer_iterator (const TAO_Property_Filter &)
 
void lookup_all_subtypes (const char *type, CosTradingRepos::ServiceTypeRepository::IncarnationNumber &inc_num, TAO_Offer_Database< MAP_LOCK_TYPE > &offer_database, CosTradingRepos::ServiceTypeRepository_ptr rep, TAO_Constraint_Interpreter &constr_inter, TAO_Preference_Interpreter &pref_inter, TAO_Offer_Filter &offer_filter)
 
void lookup_one_type (const char *type, TAO_Offer_Database< MAP_LOCK_TYPE > &offer_database, TAO_Constraint_Interpreter &constr_inter, TAO_Preference_Interpreter &pref_inter, TAO_Offer_Filter &offer_filter)
 
int fill_receptacles (const char *, CORBA::ULong how_many, const CosTrading::Lookup::SpecifiedProps &desired_props, TAO_Policies &policies, TAO_Preference_Interpreter &pref_inter, CosTrading::OfferSeq &offers, CosTrading::OfferIterator_ptr &offer_itr)
 
void forward_query (const char *next_hop, const char *type, const char *constr, const char *pref, const CosTrading::PolicySeq &policy_seq, const CosTrading::Lookup::SpecifiedProps &desired_props, CORBA::ULong how_many, CosTrading::OfferSeq_out offers, CosTrading::OfferIterator_out offer_itr, CosTrading::PolicyNameSeq_out limits_applied)
 
CORBA::Boolean retrieve_links (TAO_Policies &policies, CORBA::ULong offer_returned, CosTrading::LinkNameSeq_out links)
 
void federated_query (const CosTrading::LinkNameSeq &links, const TAO_Policies &policies, const CosTrading::Admin::OctetSeq &request_id, TAO_Preference_Interpreter &pref_inter, const char *type, const char *constr, const char *pref, const CosTrading::Lookup::SpecifiedProps &desired_props, CORBA::ULong how_many, CosTrading::OfferSeq &offers, CosTrading::OfferIterator_ptr &offer_itr, CosTrading::PolicyNameSeq &limits_applied)
 
void order_merged_sequence (TAO_Preference_Interpreter &pref_inter, CosTrading::OfferSeq &offers)
 Merge the results from a federated query into the collected results.
 
CORBA::Boolean seen_request_id (TAO_Policies &policies, const CosTrading::Admin::OctetSeq *&seq)
 
void operator= (const TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE > &)=delete
 
 TAO_Lookup (const TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE > &)=delete
 

Private Attributes

const unsigned int IDS_SAVED
 
TAO_Trader< TRADER_LOCK_TYPE, MAP_LOCK_TYPE > & trader_
 A reference to the trader for obtaining offer maps.
 
Request_Ids request_ids_
 A list of recent request_id_stems.
 
TRADER_LOCK_TYPE lock_
 Lock to secure the set of request ids.
 

Detailed Description

template<class TRADER_LOCK_TYPE, class MAP_LOCK_TYPE>
class TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >

This class implements CosTrading::Lookup IDL interface.

Member Typedef Documentation

◆ Request_Ids

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
typedef ACE_Unbounded_Queue<const CosTrading::Admin::OctetSeq*> TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::Request_Ids
private

Constructor & Destructor Documentation

◆ TAO_Lookup() [1/2]

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::TAO_Lookup ( TAO_Trader< TRADER_LOCK_TYPE, MAP_LOCK_TYPE > & trader)

◆ ~TAO_Lookup()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::~TAO_Lookup ( )

◆ TAO_Lookup() [2/2]

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::TAO_Lookup ( const TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE > & )
privatedelete

Member Function Documentation

◆ create_offer_iterator()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
TAO_Offer_Iterator * TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::create_offer_iterator ( const TAO_Property_Filter & pfilter)
private

Factory method for creating an appropriate Offer Iterator based on the presence of the Register Interface.

◆ federated_query()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
void TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::federated_query ( const CosTrading::LinkNameSeq & links,
const TAO_Policies & policies,
const CosTrading::Admin::OctetSeq & request_id,
TAO_Preference_Interpreter & pref_inter,
const char * type,
const char * constr,
const char * pref,
const CosTrading::Lookup::SpecifiedProps & desired_props,
CORBA::ULong how_many,
CosTrading::OfferSeq & offers,
CosTrading::OfferIterator_ptr & offer_itr,
CosTrading::PolicyNameSeq & limits_applied )
private

Perform and pass on a query over a set of links. Merge the results of the federated queries into a single set of results suitable for returning to the user.

◆ fill_receptacles()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
int TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::fill_receptacles ( const char * ,
CORBA::ULong how_many,
const CosTrading::Lookup::SpecifiedProps & desired_props,
TAO_Policies & policies,
TAO_Preference_Interpreter & pref_inter,
CosTrading::OfferSeq & offers,
CosTrading::OfferIterator_ptr & offer_itr )
private

This method takes the list of ordered offers and places a number of them in the sequence of returned offers and the rest into thr iterator. In addition, fill_receptacles uses the TAO_Property_Filter to ensure the returned offers contain the properties specified in the desired_props in parameter.

◆ forward_query()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
void TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::forward_query ( const char * next_hop,
const char * type,
const char * constr,
const char * pref,
const CosTrading::PolicySeq & policy_seq,
const CosTrading::Lookup::SpecifiedProps & desired_props,
CORBA::ULong how_many,
CosTrading::OfferSeq_out offers,
CosTrading::OfferIterator_out offer_itr,
CosTrading::PolicyNameSeq_out limits_applied )
private

If a starting_trader policy was specfied, foward the query to the next link in the sequence.

◆ lookup_all_subtypes()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
void TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::lookup_all_subtypes ( const char * type,
CosTradingRepos::ServiceTypeRepository::IncarnationNumber & inc_num,
TAO_Offer_Database< MAP_LOCK_TYPE > & offer_database,
CosTradingRepos::ServiceTypeRepository_ptr rep,
TAO_Constraint_Interpreter & constr_inter,
TAO_Preference_Interpreter & pref_inter,
TAO_Offer_Filter & offer_filter )
private

Traverse the type hierarchy to pull the matching offers from all subtypes of the root type.

◆ lookup_one_type()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
void TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::lookup_one_type ( const char * type,
TAO_Offer_Database< MAP_LOCK_TYPE > & offer_database,
TAO_Constraint_Interpreter & constr_inter,
TAO_Preference_Interpreter & pref_inter,
TAO_Offer_Filter & offer_filter )
private

Check if offers of a type fit the constraints and order them according to the preferences submitted.

◆ operator=()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
void TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::operator= ( const TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE > & )
privatedelete

◆ order_merged_sequence()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
void TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::order_merged_sequence ( TAO_Preference_Interpreter & pref_inter,
CosTrading::OfferSeq & offers )
private

Merge the results from a federated query into the collected results.

◆ query()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
void TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::query ( const char * type,
const char * constr,
const char * pref,
const CosTrading::PolicySeq & policies,
const CosTrading::Lookup::SpecifiedProps & desired_props,
CORBA::ULong how_many,
CosTrading::OfferSeq_out offers,
CosTrading::OfferIterator_out offer_itr,
CosTrading::PolicyNameSeq_out limits_applied )
virtual

◆ retrieve_links()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
CORBA::Boolean TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::retrieve_links ( TAO_Policies & policies,
CORBA::ULong offer_returned,
CosTrading::LinkNameSeq_out links )
private

Assemble a sequence of links that the federate_query method should follow. Use the starting_trader policy, if one's provided, otherwise use the Link interface to determine which of the registered links should be followed in this query.

◆ seen_request_id()

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
CORBA::Boolean TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::seen_request_id ( TAO_Policies & policies,
const CosTrading::Admin::OctetSeq *& seq )
private

Member Data Documentation

◆ IDS_SAVED

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
const unsigned int TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::IDS_SAVED
private

◆ lock_

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
TRADER_LOCK_TYPE TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::lock_
private

Lock to secure the set of request ids.

◆ request_ids_

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
Request_Ids TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::request_ids_
private

A list of recent request_id_stems.

◆ trader_

template<class TRADER_LOCK_TYPE , class MAP_LOCK_TYPE >
TAO_Trader<TRADER_LOCK_TYPE,MAP_LOCK_TYPE>& TAO_Lookup< TRADER_LOCK_TYPE, MAP_LOCK_TYPE >::trader_
private

A reference to the trader for obtaining offer maps.


The documentation for this class was generated from the following files: